Jira project administrators changed the Subtask workflow and somehow ended up closing Subtasks without resolution date set.
I tried setting up resolution date in Scriptrunner console with the code
but the resolved date is not updated. Nothing shows up in logs either.
Did you "save" it after you set it? Like:
ComponentAccessor.getIssueManager().updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), issue, EventDispatchOption.ISSUE_UPDATED, true)
Thanks for the update.
We did try with the below code and it doesn't work
IssueManager issueManager = ComponentAccessor.getIssueManager()
DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss");
Date date = dateFormat.parse("03/23/2021 06:00:00");
long time = date.getTime();
Timestamp targetDate = new Timestamp(time);
MutableIssue missue = (MutableIssue) issueManager.getIssueObject("SARTRACKER-946")
issueManager.updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), missue, EventDispatchOption.ISSUE_UPDATED, true)
This is one of the fields that can't be modified in newer version of API, for good reasons.
My guess is that it was modifiable with MutableIssue.store() and it is now deprecated.
Use the Object's Service or Manager to save values. Since v5.0. DO NOT USE THIS as it overwrites all the fields of the issue which can result in difficult to reproduce bugs Prefer to use QueryDslAccessor to change only needed fields
I do not recommend it.
The only way to change the resolution date to already resolved issues is by using the CSV import method described in below links:
As per the "Is there a way to change the "Resolution Date" thread in the Atlassian Community, in order to update the resolution dates you need a CSV file with at least the below 4 fields:
- Issue Key
- Resolved (to be mapped to "Date Resolved")
However, please notice that this only works when using External System Import (in the administration section of your Jira instance), as documented in: Importing data from CSV
Performing the CSV import from the issue search page, as explained in: Creating issues using the CSV importer, does not work.
Hello @Swati_Mathapati ,
Resolved date will be appeared based on the resolution chosen date.
Create a self transition on "Closed" status. and Edit Transition and place "Resolution" field on that Transition.
Select all the issues and Bulk Transition is the option to choose the resolution.
As of my knowledge , we can't edit resolution date for past date.
Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events