Get User Stories for each Release Feature Lookback API

798 Views Asked by At

I need to add some customization to BurnDownApp. and I want to retrieve all User Stories for Release from 'Release Combobox' + All Users stories which linked to Portfolio Item features which linked to release.

In default implementation I can retrieve only User Stories which linked to Release:

 find: {
    "_TypeHierarchy": { '$in' : [ -51038] },
    "Children": null
    } 

I tried to use this query:

find:{
$and:
[{"_TypeHierarchy": -51038, "Children": null},
{"_TypeHierarchy": { '$in' : [ -51038, -51006 ] },
"Children": null
"Feature.Release.Name": "%ReleaseName%"}]
}

but it doesn't work

How I should change query for get needed data?

Link to BurnDownApp on github: https://github.com/RallyApps/app-catalog/tree/master/src/apps/charts/burndown

1

There are 1 best solutions below

0
On

Even though a WS API query (Feature.Release.Name = "r3") will work:

https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/12345&query=(Feature.Release.Name = "r3")

This will not work in Lookback API.

This Lookback API query "Feature":7777 will work. In this example 7777 is ObjectID of a feature:

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/12345/artifact/snapshot/query.js?find={"_ProjectHierarchy":22222,"_TypeHierarchy":"HierarchicalRequirement","ScheduleState":"Accepted","Feature":7777,"_PreviousValues.ScheduleState":{ "$lt":"Accepted"}},sort:[{"ObjectID": 1},{_ValidFrom: 1}]&fields=["Name","ScheduleState","PlanEstimate","Release"]&hydrate=["ScheduleState"]

If you want to get features in the custom app dynamically based on a release combobox selection you may:

  1. Use wsapi data store to find those features (get their OIDs), and then
  2. Use snapshot to get historical data on stories that associated with features. Filtering them based on "Feature": {$in:[7777,8888,9999]} in the find should work.