我有一个功能名称,例如:“这个/是我的功能的/名称/”。当我尝试将此名称作为查询字符串提及时,Rally会抛出一个错误。有办法解决这个问题吗?
答案 0 :(得分: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)
答案 1 :(得分:1)
您还可以使用这些字符的html替换。