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