Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs DirectChildrenCount Rally JS SDK查询_Extjs_Rally - Fatal编程技术网

Extjs DirectChildrenCount Rally JS SDK查询

Extjs DirectChildrenCount Rally JS SDK查询,extjs,rally,Extjs,Rally,我查看了之前发布的一些其他问题,但找不到相关的答案。所以我在这里再次发帖:这是我的代码: Ext.create('Rally.data.WsapiDataStore',{ autoLoad: true, model: 'HierarchicalRequirement', limit: '500', fetch: ['ObjectID','DirectChildrenCount','FormattedID'], fil

我查看了之前发布的一些其他问题,但找不到相关的答案。所以我在这里再次发帖:这是我的代码:

Ext.create('Rally.data.WsapiDataStore',{
        autoLoad: true,
        model: 'HierarchicalRequirement',
        limit: '500',
        fetch: ['ObjectID','DirectChildrenCount','FormattedID'],
        filters:[{property: 'DirectChildrenCount', operator: '=', value: 0}], //tried both "0",'0'
        listeners: {
            load: function(store,data,success){
                var data_length = data.length;
                console.log("Number = ", data); 
            }
        }
    });

结果是一个空数组。此外,结果根本不包含字段“DirectChildrenCount”,即使我正在获取它

我在没有任何更改的情况下尝试了您的代码,它返回了300多个项目。结果中包括DirectChildrenCount。对“2.0rc2”和“2.0rc1”进行了测试,结果相同。以下是Chrome开发工具的屏幕截图:

这是另一个简短的应用程序,其中构建了自昨天以来更新的故事网格,并按相同条件进行过滤

{property: 'DirectChildrenCount', operator: '=', value: 0}
js文件如下:

Ext.define('CustomApp', {
                extend: 'Rally.app.App',
                componentCls: 'app',

                launch: function() {
                    var millisecondsInDay = 86400000;            
                    var currentDate = new Date();
                    var startDate = new Date(currentDate - millisecondsInDay);
                    var startDateUTC = startDate.toISOString();

                    Rally.data.ModelFactory.getModel({
                        type: 'UserStory',
                        success: function(model) {
                            this.grid = this.add({
                                xtype: 'rallygrid',
                                itemId: 'grid',
                                model: model,
                                columnCfgs: [
                                    'FormattedID',
                                    'Name',
                                    'Owner',
                                    'LastUpdateDate'
                                ],
                                storeConfig: {
                                    filters: [
                                        {
                                            property: 'LastUpdateDate',
                                            operator: '>',
                                            value: startDateUTC
                                        },
                                        {
                                            property: 'DirectChildrenCount',
                                            operator: '=',
                                            value: 0
                                        },
                                    ]
                                }
                            });
                        },
                        scope: this
                    });
                    console.log('items updated since', startDateUTC);
                }

            });

我使用的是2.0p5 sdk,这有什么关系吗?是的,它落后两个版本。相关因素是底层WS-API的版本。AppSDK2默认为rc1中当前的WS-API v2.0。