2014-10-20 59 views
1

我需要以下代碼的幫助。未註釋的代碼工作正常,但我需要讓註釋的代碼才能工作。請參閱下面我的代碼中的// value:releaseStartDateISO。具體來說,filter-2不起作用。我想要顯示活動的缺陷(即過濾器1未關閉)或關閉日期大於發佈開始日期(過濾器2)的缺陷。這會給我所有活躍的缺陷加上當前衝刺期間關閉的任何缺陷。我試圖將發佈開始日期轉換爲ISO,但這不起作用。看來拉力賽並不承認ReleaseStartDate,我不知道爲什麼。注意:這是rally git的代碼。我添加了「或過濾器」https://github.com/RallyApps/app-catalog/tree/master/src/apps/defectsummarymatrix 感謝您的幫助!拉力賽或過濾器發佈開始日期sdk

 _showComponentIfNeeded: function(component) { 
     if (component && component.isHidden()) { 
      component.show(); 
     } 
    }, 

    _initializeAllDefectStore: function(release) { 
      //var releaseStartDate = release.get('ReleaseStartDate'); 
      //var releaseStartDateISO = Rally.util.DateTime.toIsoString(releaseStartDate,true); 
      var filter = Ext.create('Rally.data.QueryFilter', { 
       property: 'State', 
       operator: '!=', 
       value: 'Closed' 
      }); 
       filter = filter.or({ 
       property: 'ClosedDate', 
       operator: '>', 
       //value: releaseStartDateISO 
       value: '2014-09-10' 
      }); 
       filter.toString(); 
      if (this.releaseFilter && this.defectModel) { 
      this.allDefectStore = Ext.create('Rally.data.wsapi.Store', { 
       model: this.defectModel, 
       fetch: ['State','Priority'], 
       autoLoad: true, 
       limit: Infinity, 
       context: this.getContext().getDataContext(), 
       filters : [this.releaseFilter,filter], 
       listeners: { 
        load: this._onAllDefectStoreLoaded, 
        scope: this 
       } 
      }); 
     } 
    }, 

    _onAllDefectStoreLoaded: function(store, records, successful, eOpts) { 
     this._initializeMatrixTable(); 
     this._populateMatrixTable(records); 
     this._createPriorityRecords(records); 
     this._updateMatrixGrid(); 
     this.setLoading(false); 
    }, 

回答

0

release.get('ReleaseStartDate')的值是什麼?是否有可能你的發行記錄沒有填寫該字段?

+0

我確認了ReleaseStartDate已填充。謝謝。 – Ted 2014-10-20 11:26:19

+0

我確認ReleaseStartDate是從另一個應用程序填充的。但是,我想我可能需要添加UserStory模型,但是我在幾個地方嘗試過,並且語法錯誤或者位置錯誤。謝謝你的評論。 – Ted 2014-10-20 11:41:53