我正在使用诸如US1, US4
. 但是,当客户尝试使用字母查询功能F
时,检索到具有相同编号的用户故事。
然后我测试了一个缺陷查询DE1
检索US1
。而且,查询任何字母XX1
也会检索美国和给定的#。我的查询代码是:
public HierarchicalRequirement getUserStoryById(string _formattedID)
{
// I created this class with only the properties (bellow) I'm using
HierarchicalRequirement userStory = null;
Request storyRequest = new Request("hierarchicalrequirement")
{
ProjectScopeUp = false,
ProjectScopeDown = true,
Fetch = new List<string>()
{
"Name",
"ObjectID",
"FormattedID",
"LastUpdateDate",
"Owner",
"Children",
"Description",
"RevisionHistory",
"Revisions"
},
Query = new Query("FormattedID", Query.Operator.Equals, _formattedID)
};
try
{
QueryResult queryStoryResults = m_rallyApi.Query(storyRequest);
if (queryStoryResults.Results.Count() > 0)
{
var myStory = queryStoryResults.Results.First();
//Recursively gets a HierarchicalRequirement and its child by the reference value
userStory = GetUserStoryByReference(myStory["_ref"]);
}
}
catch (...){
}
return userStory;
}
我在这里错过了一些非常明显的东西吗?为什么我不能查询除用户故事之外的任何内容?当我第一次创建Request
对象时,它应该不同于new Request("hierarchicalrequirement")
(可能是“缺陷”或“功能”)吗?
谢谢