Update Resolved Date in REST API

Is there a way to update the Resolved Date for a jira issue?

REST API or any other way?

I have two stories that were done in 2017 but because of the holidays were not closed until the new year.  Problem is those two stories are badly distorting some reports and I have been asked to set the resolved dates to a date in the past.

2 answers

1 accepted

1 votes
Alexey Matveev Community Champion Jan 24, 2018

If you have Power Scripts add-on you could write a job with the following script

for (string iKey in selectIssues("your jql query to get issues")) {
    %iKey%.resolutionDate = "your date";

You can read more about Power Scripts here:


If you have ScriptRunner add-on you could write a scirpt with the following method:

MutableIssue.setResolutionDate(Timestamp resolutionDate) 

Thank You Alexey,

I do have ScriptRunner, but only used it once while an Atlassian expert was helping to add a script to increment a value in a counter field.

I have probed a bit and think I have built the script I need to update my issue field.


The Timestamp value I want is  "12/22/2017 11:11:11:11" and it should be updated on an Issue with a certain Key (EM-412).  

Is this script correct to perform the desired action? 


import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.resolution.Resolution


//retrieve a specific issue
IssueManager issueManager = ComponentManager.getInstance().getIssueManager()
MutableIssue myIssue = issueManager.getIssueObject("EM-412")

//update the resolution date
MutableIssue.setResolutionDate("12/22/2017 11:11:11" resolutionDate)

I think I missed this line ...

import com.atlassian.jira.ComponentManager 

I think your script would look like this

import com.atlassian.jira.component.ComponentAccessor
import java.sql.Timestamp
import com.atlassian.jira.issue.MutableIssue

MutableIssue issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("EM-412")
Timestamp time = new Timestamp(117, 11, 22,11, 11, 11, 0)

Console is not liking the issue.store() line because it is deprecated.  It says to use the Object's Service or Manager to save values.

Alexey Matveev Community Champion Jan 24, 2018

it is a warning, not a error. Just run it.

LOL,  As you can see, I am a little skittish because it is so new to me.


But that worked perfectly.  Thank you so much for the help!

0 votes
Warren Levy Community Champion Jan 24, 2018

Hi Joe

Generally, you can't do anything with the REST API that you can't do within Jira.

Within Jira, the Resolved Date is a readonly field, so I don't think you can change it in Jira or via the API.

If you have a server version of Jira, you could write some SQL or go directly into the database and change it, but I WOULDN'T RECOMMEND DOING THIS.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,958 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot