oslc REST API: get the Rank of items
![]()
Hello!
I'm working on a python script to generate some information and reports from our Team Concert. I'm using the oslc REST API of RTC. The relevant projects in RTC have a Scrum process and therewith are heavily organized by using the "rank". Installed RTC version is 4.0.1.
I am already able to get all work items and the iterations (Product Backlog and Sprint Backlogs). The only thing that is still missing for my purpose is the order (ranking) of the items within their iterations.
So the question is:
For a given work item, how can I get the rank via REST?
Or a possible alternative:
For a given iteration, how can I get a list of the assigned work items, ordered by the items rank?
|
Accepted answer
![]()
No as of today we do not have an api that fetches the rank values. The current design of ranking is such that only the sequence value is stored in the repository. The calculation of an integer ranking is done at the client side.
Thanks,
Sharoon
Ralph Schoon selected this answer as the correct answer
Comments Hello Sharoon,
thanks for your comment.
I found a curious "custom attribute" in the reporting API's work itm representation with the key "com.ibm.team.apt.attribute.planitem.priority...". Beside a priority literal, it contains a character string whose order seems to correspond to the ranking.
Is this the "sequence value" you mentioned? If not, where can I found that?
It's no problem not to have an integer ranking as long as I can reproduce the ranking order.
The attribute you see is the Ranking attribute which by default is configured to be a priority attribute but can be any enumeration attribute. Ranking in RTC works based on stack based ranking. The coarse grained stack is defined by the Ranking attribute which is configured in the process spec editor of the project. Within each stack you have absolute ranking which is based on the position of the work item in the plan which is the order or sequence of the work item.
You can read more details in the article https://jazz.net/library/article/1033, if you have not yet seen it.
The sequence value is an internal attribute so you might not be able fetch those values, please open an enhancement request if you need the support to get the ranking order as an api.
Thanks,
Sharoon
Hmm... maybe we have a little misunderstanding. :)
I give you an example:
When I ask for a work item via the Report REST API, I get an XML response that includes the following extension element:
<allExtensions>
<helperId>_jZiMQHUEEeKvMP-wL7rdmQ</helperId>
<key>
com.ibm.team.apt.attribute.planitem.priority._pm7NmRYUEd6L1tNIGdz5qQ
</key>
<type>smallStringValue</type>
<booleanValue/>
<integerValue/>
<longValue/>
<doubleValue>0.0</doubleValue>
<smallStringValue>priority.literal.l01 O00003<</smallStringValue>
<displayValue>priority.literal.l01 O00003<</displayValue>
<mediumStringValue/>
<largeStringValue/>
<timestampValue/>
<decimalValue/>
</allExtensions>
The value is "priority.literal.l01 O00003" where the part before the white space decodes the enumeration element of the priority (none, low, medium, high). The string after the white space is the "character string" I mentioned in my last post. So, at a first glance, it seems that an two-step-order - first by the priority category and secondly by the curious string after the white space - leads to a complete ranking.
Is that possible? If not, what is meaning of that "extension" node?
Thanks!
The value that you see here is what is stored as it is in the repository. It needs to be processed and presented in a representation that can be understood and interpreted by the user. Currently since we do not officially support an api to fetch the Rank values, its missing. There is an existing enhancement to view the rank values in a query in eclipse client which also has the same underlying reason for not being supported.
Thanks for that info.
Given that I think you're saying the ability to get/set rank isn't supported in the rest (or Java) api right now (even though it's a very essential part of the model of an agile plan), I think we'd be really interested to know if there's ANY way to do this - even if it's 'unsupported': is there some way to use today's RTC 4.0.1 to get and/or set the rank of work items (within each priority bucket), e.g. by changing those mysterious strings after the priority.literal.101 string above. Is it ok to set them to any arbitrary value so long as the relative lexical order of those strings indicates the rank order of the items, or do they have to be set to something special that lines up with other data in the repository?
To re-iterate, I'm not at all asking for a way to get/set user-friendly consecutive integers for rank (like in the web UI) - any of us could write some code to simulate that if we need it - I just need some way to get and set the relative rank of items, even if not officially supported. Is this possible? Thanks!
Any info on this (however informal/unsupported) would be hugely helpful...I really need to be able to get/set rank from the API
Many thanks
Ben
see my post below.... :)
showing 5 of 7
show 2 more comments
|
Comments
Hi all,
always about RANK values, is it this value stored in db or dw?
If yes, where?
I need to get this value and use in one custom BIRT report based on one JDBC data source.
Thanks in advance
Andrea
Andrea, Did you find a solution how to present the RANK value in a BIRT report?
Hi Liora
no, I did found no solution for that :(
At the moment, we use a custom attribute in order to sort our stories/epics.
Ciao
Andrea