How to change context of a Project Cumulative Flow chart in Rally?

user2258468 picture user2258468 · May 27, 2016 · Viewed 8.5k times · Source

I am using the Project Cumulative Flow chart to show Rally defects over time. In this example, the project is chosen by the default context of the app:

_ProjectHierarchy: this.getContext().getProject().ObjectID

Where 'this' is the instance of the App.

What I'd like to do is change the context but nothing I've tried was successful. I have tried changing the context property of the storeConfig from:

context: this.getContext().getDataContext()

to:

context: {
    project: '/project/123456'
}

with my real project object ID but this doesn't make a difference. Please help me change the context of my App instance or change the context of SnapshotStore so that I can search within my desired project.

Answer

Kyle Morse picture Kyle Morse · May 27, 2016

The Lookback API and the SnapshotStore behave a bit differently than the standard Web Services API and Store. You'll want to leave the context on your storeConfig as you had it, mostly so it gets the correct workspace.

_ProjectHierarchy is the correct place to do this. If you just edit the settings on your app and scope it to the desired project the code above will already work. Otherwise, you can just hardcode in the ObjectID of the desired project.

enter image description here

enter image description here

Also, may I suggest starting with the most recently released version of the SDK: https://help.rallydev.com/apps/2.1/doc/