1

当我为用户故事制作一个快速的 wsapidatastore 时,它​​可以工作:

Ext.create('Rally.data.WsapiDataStore', {
            model: 'User Story',
            autoLoad: true,
            listeners: {
                load: this._onArtifactsLoaded,
                scope: this
            }
        });

但是,如果我将其更改为 Artifact,则会收到错误消息:

Ext.create('Rally.data.WsapiDataStore', {
            model: 'Artifact',
            autoLoad: true,
            listeners: {
                load: this._onArtifactsLoaded,
                scope: this
            }
        });

控制台说:

Uncaught TypeError: Cannot call method 'replace' of undefined sdk-debug.js:104071
Ext.define._buildTypeInfo sdk-debug.js:104071
Ext.define.getModels sdk-debug.js:104025
Ext.Array.each sdk-debug.js:956
Ext.define.getModels sdk-debug.js:104024
Ext.define.getModel sdk-debug.js:103985
Ext.define.load sdk-debug.js:104379
(anonymous function)
4

1 回答 1

0

看起来模型工厂有错误。

如果您需要解决方法,您可以使用这行代码将工件添加为合法类型。

Rally.data.ModelTypes.types.artifact = 'artifact';
于 2012-06-19T21:36:05.347 回答