嗨,我正在使用以下代码获取特定迭代的当前用户故事
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch:function(){
me = this;
combo = window.parent.Ext4.ComponentQuery.query('rallyiterationcombobox')[0];
var iterationObjectID = combo.getRecord().data.ObjectID;
var query1= { _ProjectHierarchy: me.getContext().getProject().ObjectID, Iteration : iterationObjectID , _TypeHierarchy:"HierarchicalRequirement"};
var fields = ["ObjectID","FormattedID","Name","Parent","Release","Tags","PlanEstimate","ScheduleState","_ValidFrom","_ValidTo"];
var hydrate = ["Tags","ScheduleState"];
var post = { find :query1, fields : fields, hydrate : hydrate, pagesize : 10000 };
var wsid = this.context.getWorkspace().ObjectID;
var url = "https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/"+ wsid +"/artifact/snapshot/query.js";
console.log("snapshot url:",url);
Ext.Ajax.request({
method: 'POST',
url: url,
jsonData : post,
success: function(res) {
res = JSON.parse(res.responseText);
console.log("The final results are",res);
},
failure: function(failure) {
console.log("snapshot query failed!",failure);
}
});
问题是当我在查询中指定父项目时,我无法获取子项目的用户故事。例如,如果我有这样的层次结构
Project 7890
User Story 55
User Story 56
Project 6543
User Story 57
Project 3456
User Story 777
理想情况下,如果我查询 _ProjectHierarchy: 7890 我应该得到用户故事 55、用户故事 56、用户故事 57、用户故事 777,因为查询检索了自身及其子项目的多个工作项,但在这里我只能获得用户故事 55、用户故事 66(它们是项目 7890 的用户故事)但不是用户故事 57、用户故事 777,因为这些是子项目的用户故事。我还想检索所选项目及其子项目的所有用户故事(即范围缩小)。