Rally sdk - 从故事对象中获取任务列表

时间:2016-09-01 13:40:09

标签: sdk rally

知道如何从Rally故事对象中获取任务列表?任务是故事中的列表。我尝试了story.get(“任务”)和story.getCollection(“任务”)。但是这两种方法都在调试器中抛出了未定义的错误

    Ext.Array.each(stories, function(story){
        var storyTasks = ***story.get('Tasks');***

        storyTasks.load({
            fetch: ['Owner', 'FormattedID'],
            callback: function(records, operation, success){
                Ext.Array.each(records, function(record){
                    taskOwners.push({owner: record.get('Owner'),
                        points: story.PlanEstimate});
                }, this);
            },
            scope: this
        });         
    });

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

这是一个用promises做的例子:

$('.service1').mouseover (function() {
    //check if current service shown is not the same - this avoids sliding to same content
    if(inside_div.attr("current-service")!="1"){
    //slideUp current content
    inside_div.slideUp(function(){
        //once slideUp is finished, change the content of the inside div...
            inside_div.html('<h3>Heading 1</h3><p>Paragraph of first service</p><ul><li>Heading 1 list 1</li><li>Heading 1 list 2</li></ul><div class="button">Service 1</div>');
      // ... then tell the div what service content it now has, and slide it back down
      inside_div.attr("current-service","1").slideDown();
        });
  }
});