I have a custom rally app that was developed using the Rally sdk 2.1. The app queries for Test Case Results from Test Cases that are link to a Test Set in the current sprint. There is a problem with the app not being able to pull some TC. The problem appears when you have a TS has TCs from multiple projects. The application context will kick in and only allow to query for TC from the current Project context, causing data gaps.
The code below is retrieving data for Test Case Results, but is being limited by the Project context.
var tsid = req.testsetid;
var ts = req.testsetname;
Ext.Array.each(data, function (testcase) {
var tcid = testcase.get('ObjectID');
Ext.create('Rally.data.WsapiDataStore', {
model: 'testcaseresult',
fetch: ['Verdict', 'Date'],
limit: Infinity,
autoLoad: true,
filters: [
{
property: 'TestCase.ObjectID',
operator: '=',
value: tcid
},
{
property: 'TestSet.ObjectID',
operator: '=',
value: tsid
}],
sorters: { property: 'Date', direction: 'DESC' },
listeners: {
load: this._testCaseResultDataLoaded,
itemname: ts,
scope: this
}
});
}, this);
From Rally Engineers:
When creating a Rally.data.wsapi.Store, you can give the 'context' into the config section. If you don't give one, it defaults to the current data context. The current data context is the project node you are in and the projectScopeUp and projectScopeDown.
To get the global context, you can provide this sort of thing into the config:
context: {
workspace: this.getContext().getWorkspaceRef(),
project: null
},