Features Group Status transitions data not received in every case.

rreyes7 August 18, 2017

Hi guys, I'm querying the REST API for feature groups data with the following URL: 

http://work/jira/rest/api/2/search?maxResults=100&jql=project%3D%XXXXX%22+AND+issuetype%3D%22FeatureGroup%22

There are feature groups that contains data in the Jira Web UI as shows the following image, but those transitions in some cases are not present within the response of the feature group  (customfield_10201 is null)

transitions tab.png


This value is received for only in a few feature groups' response:
1_*:*_1_*:*_428390000_*|*_6_*:*_2_*:*_3099699000_*|*_5_*:*_1_*:*_345594000 

I need to get the transitions data from the response for every feature group.

Any help?

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 18, 2017

Sorry, it took me a while to work out what "feature groups" were and realise they're not really important here.  They are just something (a custom field, issue type or label, etc) that group together the issues you are interested in.

Now, for any issue, you are actually looking at two things here.

The picture you give us is a screenshot of a "transition history tab".  This is a display built by some code that looks back over the full history of an issue, pulls out the transitions and works out the time spent in each status and the number of executions.

The string of numbers, underscores and stars is the "time in status" field, from another (system) add-on.  It's gathering data for the time in status gadget.

I suspect you'll need to read and parse the history for yourself to do your reporting over REST.

rreyes7 August 18, 2017

Hi Nic, maybe I wasn't clear enough describing the problem. Yes, I need to read and parse the history to my report over REST, actually that is what I'm doing for some of the "time in status", having that context in mind the question is:

Why I don't get the "time in status"  value for every Issues REST's responses? 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 19, 2017

Some issues may not have any data for it - new issues for example, the "time in status" is not calculated because it's changing constantly until they move to a new status (created time is a fixed point, but "now" isn't).  The field might also not be valid for the issues too.

I'd be looking in the history for this stuff anyway.

rreyes7 August 21, 2017

I understand, but I have requested for "Issues" that have been moving through several statuses and still do not come with the "time in status field" then I'm not able to create my report from the REST response.


Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 21, 2017

You are guessing that the time in status field is gathering information for you.  It's not, it's gathering it for the time in status gadget, which may not have the same data requirements that you do.  You can't rely on this field because you don't really know what it is doing.

You will need to read the issue history.

rreyes7 August 21, 2017

So far the "customfield_10201" contains the data I need

e.g:
1_*:*_1_*:*_428390000_*|*_6_*:*_2_*:*_3099699000_*|*_5_*:*_1_*:*_345594000 
 
but not for all Issues, regardless of the statuses. Which is inconsistent. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 21, 2017

That's why I'm telling you to use the history.  The field is not designed for you to use.

rreyes7 August 21, 2017

Right, but it still does not answer my question about why the "customfield_10201" does not have value in some "Issues Fields" that share similar status transitions.

It's not ok to have to process the data from history's response to get data that came already processed for some Issues in "custom field 10201".

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 21, 2017

Because the gadget does not need the data, the code decides not to put anything in there.  As I said several times, this field is being calculated (or not) for a report, not for you.

You need the full set without that code doing things you don't need to know about, so you'll have to read the history.

Suggest an answer

Log in or Sign up to answer