Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get history of issue transitions via API

Florent Martineau
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 11, 2019

Hello,

I would like to compute a metric which can be defined as "median time between an issue's last IN PROGRESS status to its last DONE status". 

 

In order to achieve this, I must know what is the last time the issue was IN PROGRESS, and the time of the last transition to DONE.  Unfortunately, I can only find in the documentation how to get possibble future transitions, and not the transition history

 

Do you know if it is possible to get the transition history ? If not, would you see another/better way of computing it ?

 

Thanks a lot !

1 answer

1 accepted

4 votes
Answer accepted
Warren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2019

Hi @Florent Martineau

Using the REST API, you can pass in the parameter expand=changelog and then iterate over issues.changelog.histories. The return is usually in reverse chronological order, so the first transition to Done will probably be the one that you're after.

Hope this helps

Florent Martineau
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 11, 2019

Thank you very much !

Warren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2019

@Florent Martineau

Pleasure. Just to add, within each of the histories, you need to iterate through the histories.items as well - there is a possibility of having multiples of them

Like # people like this

Suggest an answer

Log in or Sign up to answer