Rally 反弹查询中的斜杠

Rally 反弹查询中的斜杠,rally,Rally,我有一个功能名称,例如:“This/is/the/name/我的功能”。当我试图将此名称作为查询字符串提及时,Rally抛出了一个错误。有没有办法解决这个问题?你从哪里得到的错误?我使用一个名为“feat/ure”的特性在一个自定义网格和一个Ruby脚本中测试了这个查询 这一查询在所有3种情况下都有效 以下是Ruby代码,该代码查询名称中带有正斜杠的功能,并为其指定一个新故事: require 'rally_api' #Setup custom app information headers

我有一个功能名称,例如:“This/is/the/name/我的功能”。当我试图将此名称作为查询字符串提及时,Rally抛出了一个错误。有没有办法解决这个问题?

你从哪里得到的错误?我使用一个名为“feat/ure”的特性在一个自定义网格和一个Ruby脚本中测试了这个查询

这一查询在所有3种情况下都有效

以下是Ruby代码,该代码查询名称中带有正斜杠的功能,并为其指定一个新故事:

require 'rally_api'

#Setup custom app information
headers = RallyAPI::CustomHttpHeader.new()
headers.name = "My Utility"
headers.vendor = "Nick M RallyLab"
headers.version = "1.0"

# Connection to Rally
config = {:base_url => "https://rally1.rallydev.com/slm"}
config[:username] = "user@co.com"
config[:password] = "secret"
config[:workspace] = "W"
config[:project] = "P"
config[:headers] = headers #from RallyAPI::CustomHttpHeader.new()

@rally = RallyAPI::RallyRestJson.new(config)

obj = {}
obj["Name"] = "new story efd3"
new_s = @rally.create("hierarchicalrequirement", obj)

query = RallyAPI::RallyQuery.new()
query.type = "portfolioitem"
query.fetch = "Name,FormattedID"

query.workspace = {"_ref" => "https://rally1.rallydev.com/slm/webservice/v2.0/workspace/111" } 
query.project = {"_ref" => "https://rally1.rallydev.com/slm/webservice/v2.0/project/222" }


query.query_string = "(Name = \"feat/ure\")"


result = @rally.find(query)
feature = result.first
puts feature

field_updates={"PortfolioItem" => feature}
new_s.update(field_updates)

您还可以使用html替换这些字符。

我想修改我的问题,并想知道如何处理故事名称中的双引号,因此我的查询字符串包含
“(name=\”此故事有“双引号”),
我在此类查询中遇到解析错误。
require 'rally_api'

#Setup custom app information
headers = RallyAPI::CustomHttpHeader.new()
headers.name = "My Utility"
headers.vendor = "Nick M RallyLab"
headers.version = "1.0"

# Connection to Rally
config = {:base_url => "https://rally1.rallydev.com/slm"}
config[:username] = "user@co.com"
config[:password] = "secret"
config[:workspace] = "W"
config[:project] = "P"
config[:headers] = headers #from RallyAPI::CustomHttpHeader.new()

@rally = RallyAPI::RallyRestJson.new(config)

obj = {}
obj["Name"] = "new story efd3"
new_s = @rally.create("hierarchicalrequirement", obj)

query = RallyAPI::RallyQuery.new()
query.type = "portfolioitem"
query.fetch = "Name,FormattedID"

query.workspace = {"_ref" => "https://rally1.rallydev.com/slm/webservice/v2.0/workspace/111" } 
query.project = {"_ref" => "https://rally1.rallydev.com/slm/webservice/v2.0/project/222" }


query.query_string = "(Name = \"feat/ure\")"


result = @rally.find(query)
feature = result.first
puts feature

field_updates={"PortfolioItem" => feature}
new_s.update(field_updates)