Reputation: 353
I am trying to use the Rally App SDK to show test cases on a cardboard. Here's the code I am using. The cardboard that appears has columns for the test case methods but no content despite the fact that there are records matching the criteria. If, as the only change, I comment out the test case types and attribute and uncomment those for task, I get tasks for the indicated owner in the cardboard just fine. The suggests to me that the var definition is correct. What extra magic do I need to get the test cases to show up? My ultimate goal is to display a cardboard (or some other container) with test cases from several user stories at once.
var testCaseCardBoardConfig = {
xtype: 'rallycardboard',
types: ['Test Case'],
attribute: 'Method',
//types: ['Task'],
//attribute: 'State',
storeConfig: {
filters: [
{
property: 'Owner',
operator: 'contains',
value: 'Anders'
}
]
}
};
Upvotes: 2
Views: 317
Reputation: 8410
This is actually a bug in cardboard which I will file. If you inspect the network tab in your browser you'll see the requests for TestCase.js come back with this error:
Cannot sort using unknown attribute Rank
The CardBoard's default sort is by Rank and it's currently not checking to make sure the type being displayed has that field. Tasks, stories, defects, etc. have it so that's why it was working for you with the commented lines.
You can add a different sorter to your storeConfig to work around the issue:
var testCaseCardBoardConfig = {
xtype: 'rallycardboard',
types: ['Test Case'],
attribute: 'Method',
storeConfig: {
//override default Rank sorters
sorters: [{property: 'ObjectID'}],
//A cleaner way to specify that they belong to you
filters: [
{
property: 'Owner',
operator: '=',
value: '/user/' + this.getContext().getUser().ObjectID
}
],
//Specify current project and scoping
context: this.getContext().getDataContext()
}
I also cleaned up your filter a little bit. Also it is good practice to always include the current context so your board is correctly scoped to your current project and up/down.
Upvotes: 2