user1605665
user1605665

Reputation: 4161

Using a custom grid how do i show userstories with defects or failed test cases

I want to create a custom grid and only show userstories that have failed test cases. I checked the API docs and could not work it out.

I tried (TestCaseStatus < Complete) but did not get any results i also tried the same thing with defect status.

What is the specific syntax that i need to use?

Upvotes: 0

Views: 130

Answers (1)

nickm
nickm

Reputation: 5966

In WS API documentation

TestCaseStatus attribute on HierarcicalRequirement object shows allowed values:

"NONE", "NONE_RUN", "SOME_RUN_SOME_NOT_PASSING", "SOME_RUN_ALL_PASSING", "ALL_RUN_NONE_PASSING", "ALL_RUN_ALL_PASSING"

If for example your custom app extends Rally.app.TimeboxScopedApp, and filters user stories by iteration, you may add another filter to exclude ALL_RUN_ALL_PASSING as follows:

onScopeChange: function() {

    var filter = this.getContext().getTimeboxScope().getQueryFilter();
    filter = filter.and({
        property: 'TestCaseStatus',
        operator: '<',
        value: 'ALL_RUN_ALL_PASSING'  
        });


        Ext.create('Rally.data.WsapiDataStore', {
            model: 'UserStory',
            fetch: ['FormattedID','Name','TestCases', 'TestCaseStatus'],
            pageSize: 100,
            autoLoad: true,
            filters: [filter], 
            listeners: {
                load: this._onDataLoaded,
                scope: this
            }
        }); 
    },

The full code is available in this github repo.

Upvotes: 1

Related Questions