Rally SDK2.0 RC3 Query

Miguel I

I'm having a hard time figuring out how to retrieve a set of stories using a tag name (TagName) as a filter. I have tried the following, but it always returns an empty store (the alert at the bottom returns []). Can someone help me figure out what I'm doing wrong?

    var storyStore = Ext.create('Rally.data.wsapi.Store', {
        model: "User Story",
        fetch: true,
        filters: [
            {
                property: 'Tags.Name',
                operator: '=',
                value: 'TagName'
            }
        ]
    });

    storyStore.load({
        callback: function(records, operation) {
            if(!operation.wasSuccessful()) {
                //process records
            }
        }
    });

    alert(JSON.stringify(storyStore.getRecords()));

Any help would be greatly appreciated!!!

Kyle Morse

This is due to the asynchronous nature of the store.load call. Your store and filters look totally right. Try putting your alert inside of the if statement within your callback. I bet you'll find there is data in there then:

 storyStore.load({
    callback: function(records, operation) {
        if(operation.wasSuccessful()) {
            alert(JSON.stringify(storyStore.getRecords()));
        }
    }
});

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Rally SDK2 how to override the row CSS

From Dev

Rally Query in the SDK 1 vs Store in the SDK 2

From Dev

Angular 2 rc3 - unresolved dependencies

From Dev

Angular 2 rc3 Router subscribe

From Dev

Angular 2 rc3 - unresolved dependencies

From Dev

Rally API 2 query historical velocity

From Dev

Angular2 CanActivate from beta to current RC3

From Dev

Angular 2 rc3 router-deprecated package issue

From Dev

angular 2 rc3 router default routes

From Dev

Where can I find Angular 2 RC3 bundles?

From Dev

Angular 2 RC3 "No provider for RouterOutletMap!" error

From Dev

Rally app SDK 2.0rc1 - Uncaught ReferenceError: rally is not defined

From Dev

Multiple "_TypeHierarchy" in rally query?

From Dev

Slashes in Rally Query

From Dev

Rally SDK 2 custom sorters

From Dev

Pulling custom field into Rally Query

From Dev

How do you inject an angular2 service into a unit test? (RC3)

From Dev

angular2 rc3 router alpha 3.0.0.7 default route

From Dev

How to handle hash fragments from oauth redirect urls in Angular2 rc3 routing

From Dev

Is there a more comprehensive way to handle authentication in Angular2 rc3 than guards?

From Dev

The data returned from Angular2 RC3 http service is undefined

From Dev

Ionic 2 RC3 iOS 8 custom font letter spacing issue

From Dev

Rally SDK external development Rally.environment undefined

From Dev

Rally: Creating a multiple query based filter

From Dev

Rally - Dashboard Apps -Defect App Query

From Dev

Query Rally Lookback API with owner name in output

From Dev

Uncaught reflect-metadata shim is required when using ES6 with Angular2 rc3

From Dev

Upgrading my Rally app from rally SDK 1.32 to rally SDK 2.0p5

From Dev

GuafretteBundle with Aws SDK2

Related Related

HotTag

Archive