ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Agile Central - LookBack API: How many times was a user story blocked?

book

Article ID: 112264

calendar_today

Updated On:

Products

CA Agile Central On Premise (Rally) CA Agile Central SaaS (Rally)

Issue/Introduction



How can we use the API to how many times and all instances where a user story was Blocked?

Environment

Release:
Component: ACSAAS

Resolution

Since this request is for historical data of the artifact we will have to use the Lookback API.
Here is an example Lookback API query you can use:

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/<<Workspace Object ID>>/artifact/snapshot/query.js?find={$and: [{"FormattedID":<<Artifact FormattedID>>}, {"Blocked": true}, {"_PreviousValues.Blocked": false}]}&fields=["_SnapshotDate","_SnapshotNumber","Blocked","Blocker","BlockedReason"]

This query is requesting all snapshots of the artifact where the Blocked state was 'true' along with a _PreviousValue of the Blocked state be 'false'. This combination suggests this was a snapshot where the artifact was set to be blocked. 

Here is a screenshot of the JSON output:

<Please see attached file for image>

User-added image

In above JSON you see this artifact was blocked 3 times in snapshotNumbers 1, 5 and 10. You can see the timestamp of each block and the user (objectID) who blocked it.

Note:
The BlockedReason field might not necessarily conform to the same snapshots of the Blocked state. Reason may or may not have been given, and unnecessarily in the same snapshots. Therefore, if you needed to make certain of the BlockedReason that correspond to Block, you may need to run subsequent queries to find the change in the BlockedReason field subsequent to each of these snapshots.

Additional Information

More on Lookback API: https://rally1.rallydev.com/analytics/doc/#/manual

Attachments

1558696750006000112264_sktwi1f5rjvs16inx.png get_app