Forums

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

Use the API get the sum of the remaining estimate for all issues in with a fixed version of x

Steve Wright
Contributor
April 29, 2020

Basically what I need is a way to provide a project manager with the following:

  1. the sum of the remaining estimate for all issues in with a fixed version of x
  2. the start date of version x

I've been reading the API documentation here, and this other API documentation here. I've gone through posts, dating back to 2013.

I cant find a single API endpoint that provides that information.

The ones related to project versions dont present that information either. For instance all I know from the following is the state of it's issues and whether its released or not.

curl --request GET \
--url 'https://<domain>.atlassian.net/rest/api/3/version/17632?expand=issuesstatus' \
--user 'user:token' \
--header 'Accept: application/json'

{"self":"https://domain.atlassian.net/rest/api/3/version/17632","id":"17632","name":"1.0.0","archived":false,"released":false,"projectId":12018,"issuesStatusForFixVersion":{"unmapped":0,"toDo":9,"inProgress":2,"done":90}}

 

Any advice on how get what I am looking for would be appreciated.

 

1 answer

1 accepted

1 vote
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2020

Hello @Steve Wright ,

To get the start date of version x you can run a call on the endpoint for a "GET /rest/api/3/version/{id}"  and it will contain a startDate element like this:

Screen Shot 2020-04-30 at 3.23.45 PM.png

To get the sum of the remaining estimate for all issues in with a fixed version of x, you would need to do some scripting to first collect all issues in that version, the time estimate field data can be found in a "GET /rest/api/3/issue/{issueIdOrKey}"  as the Worklog is stored on the issue level at the endpoint GET /rest/api/3/issue/{issueIdOrKey}/worklog and the sum would need to be generated manually off the  independent issue data.

However, a shortcut you could use would be the JQL search endpoint for this, with a filter like the following to get all the issues at once:

/rest/api/3/search?jql=project%3DEXE%20and%20fixVersion%3DX&fields=timetracking

This will give you the issue data and the estimates can them be summed via your script pulling the elements and the time tracking details will look something like this:

Screen Shot 2020-04-30 at 4.00.10 PM.png

the data will still need to me manually summed via a script locally, but an example of a summation process on a per user basis instead of the version level that could be used as a starting point as well as an alternate solution can be seen in the following thread I answered noting how to pull this data into a google sheets using the free Jira Cloud for google sheets  extension to pull the desired data into the sheet and run your summation formulas based on the imported data:

Regards,
Earl

Steve Wright
Contributor
May 1, 2020

You rock Earl, thank you very much.

Like Earl McCutcheon likes this
Vinod Kotiya
Contributor
February 1, 2023

Nice solution

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events