1

I had been pulling some scope data by Feature out of Rally and putting it into a spreadsheet. This got to be too much trouble so I decided to build an App to collect all the data for me.

In testing though all of the data reported by the SnapshotStore was significantly off of what I had actually collected on the dates in question. So I built a very small demo app to simply count the number of user stories associated with a specific feature right now using both the SnapshotStore and the wsapi.Store and the results were that the SnapshotStore found 102 User Stories for this feature while the wsapi.Store found 120. The actual number of US is indeed 120 and the actual US count hasn't changed for a couple of weeks.

I then tried with a different US and the results were the SnapshotStore found 17 US while the wsapi.Store found 24. Again the US count hasn't changed in weeks.

So why is the SnapshotStore not finding all of the Stories? I know it can be off by a few minutes from current, but this count hasn't changed in weeks.

Here is the code for the demo app. Am I doing something wrong here?

Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
    this._getUS() //This counts the stories using wsapi.Store
    this._lookBacktest1() //This counts the stories using SnapshotStore
}, //End Launch Function

_getUS: function(){
    Ext.create('Rally.data.wsapi.Store',{
        model: 'PortfolioItem/Feature',
        autoLoad: true,
        context: {
            project: '/project/33969809027',
            projectScopeUp: false,
            projectScopeDown: false
        },              
        filters: [  
            {           
                property: 'FormattedID',
                value: 'F21876'
            }
        ],
        fetch: ['UserStories'],
        listeners: {
            load: this._countUS,
            scope: this
        } //End Listeners
    }); //End Ext.create        
}, //End _getUS 

_countUS: function(store, records){
    var record = _.first(records);
    console.log('Store US= ', record.raw.UserStories.Count);
},  

_lookBacktest1: function(){
    this.snapshot = Ext.create('Rally.data.lookback.SnapshotStore', {
        autoLoad: true,
        pagesize: 200,
        params: [removeUnauthorizedSnapshots = 'true'],
        find: {
            FormattedID: 'F21876',
            __At: "current"
        },
        fetch: ['UserStories'],
        hydrate: ['UserStories'],
        listeners: {
            load: this._countLBUS,
            scope: this
        } //End Listeners
    });//End snapshot create

},//End _lookbackRelease

_countLBUS: function(store, records){
    var record = _.first(records);
    var usArr = record.get('UserStories');
    console.log('LookBack US count = ', usArr.length)
},  

}); //End APP
Maverickz
  • 81
  • 1
  • 6
  • To make it clear what my goal is: I am making a report to show weekly scope change BY FEATURE. Essentially it will be an expandable Grid showing all features for the current release. Expanding a Feature will show a line for it's baseline (Story Count, Plan Est, Task Est, To Do) and a line for every Friday that has passed since the Release started. – Maverickz Mar 17 '17 at 20:22
  • It could be that the Lookback hydrate query is only returning direct children, whereas the WSAPI and _ItemHierarchy Lookback query are returning a tree of stories. Can you verify this? – William Scott Mar 22 '17 at 17:42

1 Answers1

0

I haven't used lookback to query collections in the manner you are doing. Just for giggles, what if you flip your query around and search for stories beneath that feature:

find: {
    _TypeHierarchy: 'HierarchicalRequirement',
    _ItemHierarchy: 12345, //objectid of F21876
    __At: 'current'
}
Kyle Morse
  • 8,390
  • 2
  • 15
  • 16
  • Sorry for the delay in responding...Sprint planning week and all. Oddly enough that DOES return the correct number of records, but I am afraid I won't be able to use that method. I would need to call that for 15+ features, for up to 8 different dates for my report. That is potentially 120+ calls to the API. The way I was trying would only require up to 8 calls total. One for each Friday of the release. – Maverickz Mar 17 '17 at 20:14
  • I have added a comment to my original question to explain my goals. So maybe that helps. – Maverickz Mar 17 '17 at 20:22
  • ok, cool- that helps. sounds like a great app! let me think about this one a bit more... – Kyle Morse Mar 18 '17 at 19:39