我有一个功能名称,例如:“这个/是/我的功能的/名称/”。当我尝试将此名称作为查询字符串提及时,Rally 会抛出一个错误。有没有办法解决这个问题?
问问题
92 次
2 回答
1
您还可以使用 html 替换这些字符。
于 2013-11-06T17:05:10.260 回答
1
你从哪里得到错误?我使用名为“feat/ure”的功能在WS API 、自定义网格和 Ruby 脚本中测试了这个查询
(Name = feat/ure)
并且查询在所有 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)
于 2013-11-05T22:37:57.023 回答