How to get resolutionDate from REST API?

djx May 15, 2023

I would like to pull the resolution date (and resolution) for issues from the REST API. How can I do this? I have seen other questions about editing these fields, but I just want to read them. From what I've seen they are not technically "fields", and I don't see any examples in the documentation about how to get this information.

3 answers

1 accepted

2 votes
Answer accepted
Karim ABO HASHISH
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 15, 2023

hi @djx 

That could be a tricky one. To solve it with the least effort, I would propose.

  • Create a new custom field "Resolution Date"
  • Configure the workflow to set it when the ticket go to done.
  • For historical tickets, try to copy the field resolved into the new custom field from within jira. there are various ways to achieve that, it depends on what plugins do you have.
  • Now you can do API calls to query new field "Resolution Date" just like any normal custom field.

Good Luck and let me know if you need further elaboration.

Cheers,

Karim

djx May 15, 2023

So this means the information is not available in the REST API?

David Bakkers
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.
May 15, 2023

Hello @djx 

In addition to @Karim ABO HASHISH 's suggested solution...

The record of an issue being completed / resolved / closed (whatever you want to call it) is recorded in the Issue's change log, which you can read via the Get changelogs endpoint.

Google 'jira cloud rest api closed date' to see where your question has been asked previously.

djx May 15, 2023

Thanks for this. I'm aware I can parse the data out from the ChangeLogs, but it seems strange that JIRA APIs don't consider it a field to be returned on the issue when it is stored directly on the issue in the database.

David Bakkers
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.
May 15, 2023

In Jira, there is more than one way for an issue to be considered complete / closed etc, which can also vary from project to project and issue type to issue type, so no singular field can ever be considered the source of truth.

Instead, the change logs are essentially saying "Whatever criteria you set for this issue type to reach what you said was the closed state for this project is recorded here".

1 vote
Mayuresh Sakharape January 26, 2024

You don't need any special implementation to get the resolved date.

In REST response, you can find field resolutiondate. This field has the same value as resolved.

I am not sure why it is named differently in UI and in REST response.

0 votes
Julien Guitton
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!
January 25, 2024

You could use the search endpoint and add the resolutiondate field:
${host}/rest/api/3/search?jql=issueKey%20in%20(${yourIssueKey})&fields=resolutiondate

Or if you're really adventurous, you could have a look at the calls in the Sprint Burndown report. 

Suggest an answer

Log in or Sign up to answer