儿童项目没有出现在拉力赛中

时间:2016-08-04 21:02:47

标签: rally

我有这段代码:

 var projectStore = Ext.create('Rally.data.WsapiDataStore',{
        model: 'project',
        fetch: ['Name','ObjectID'],
        autoLoad: true,
        context:{
            project: '/project/33086603461',
            projectScopeDown: true,
            projectScopeUp:false
        },

            listeners:{
            load: function(store,records,success){
                console.log('store ',records);
            },
            scope: this
        }
});

当我打印商店时,它会显示所有项目,而不仅仅是具有给定对象ID及其子项目的项目。如何仅访问给定项目的子项?

1 个答案:

答案 0 :(得分:0)

WSAPI中的项目端点略有不同,因为它不遵守project / projectScopeUp / projectScopeDown参数。

您应该只是在引用父项目的商店中添加一个过滤器:

var projectStore = Ext.create('Rally.data.WsapiDataStore',{
    model: 'project',
    fetch: ['Name','ObjectID'],
    autoLoad: true,
    filters: [{
        property: 'Parent',
        operator: '=',
        value: '/project/33086603461'
    }],
    listeners:{
        load: function(store,records,success){
            console.log('store ',records);
        },
        scope: this
    }
});