Rally Lookback API filter on Ready and Recycled

谁说胖子不能爱 提交于 2019-12-11 06:16:32

问题


I am trying to use the lookback api to get stories that have the Ready flag set to true. I appear to be able to output the ready flag but not filter on it.

I do not appear to be able to filter or output the recycled flag.

Curious if these fields are not available to the lookback api as filters.


回答1:


Nick is right about the Recycled artifacts. I'm wondering though if you are quoting the Ready values and treating them like a String. This field is actually a Boolean and can be queried like this:

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/12352608129/artifact/snapshot/query.js?find={"Ready":true}&fields=true

This doesn't work (since it's matching on the string "true" instead of the Boolean true).

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/12352608129/artifact/snapshot/query.js?find={"Ready":"true"}&fields=true

It's also listed as #1 in the Tips and Tricks section of the documentation: https://rally1.rallydev.com/analytics/doc/Analytics2.0LookbackAPIUserManual.html#h.ce80nb6raonb




回答2:


I believe you're correct. In LBAPI documentation examples that illustrate the temporal data model show a gap when artifacts were moved to a recycle bin and later restored, or display no data after artifacts were moved to recycle bin and never restored.

Per this SO post, Lookback API doesn't provide anything along the lines of tracking entries in the Recycle Bin.

As far as Ready flag, a query like this will return the field value:

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/12352608129/artifact/snapshot/query.js?find={"ObjectID":{$in:[16483705391,14167827399]}}&fields=["Name","Ready"]

e.g.

{
Name: "my story",
Ready: false
},
{
Name: "my story",
Ready: true
},

and this query will return results if value true is treated as Boolean, not string, as SRMelody pointed out:

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/12352608129/artifact/snapshot/query.js?find={"Ready":true}&fields=true


来源:https://stackoverflow.com/questions/21740230/rally-lookback-api-filter-on-ready-and-recycled

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!