Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,334
Community Members
 
Community Events
185
Community Groups

How can I update resolved date for Subtasks that are already closed

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

mutableIssue.setResolutionDate(new Timestamp(..))

but the resolved date is not updated. Nothing shows up in logs either.

 

3 answers

1 accepted

0 votes
Answer accepted
Max Lim _Adaptavist_
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.
Mar 18, 2021

Did you "save" it after you set it? Like:

import com.atlassian.jira.event.type.EventDispatchOption

mutableIssue.setResolutionDate(new Timestamp(..))

ComponentAccessor.getIssueManager().updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), issue, EventDispatchOption.ISSUE_UPDATED, true)

Hi @Max Lim _Adaptavist_ ,

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")

missue.setResolutionDate(targetDate);
issueManager.updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), missue, EventDispatchOption.ISSUE_UPDATED, true)

Max Lim _Adaptavist_
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.
Mar 23, 2021 • edited Mar 24, 2021

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.

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.

Thanks we are out of Ideas now.

what are the good reasons ?

How is csv import different ?

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 15, 2021

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:

  1. Issue Key
  2. Summary
  3. Resolution
  4. 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.

 

Cheers,
Dario

I am using Jira v8.4.2. CVS import does not work in that version, but Script Runner does.

Like Daniel Garcia likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 04, 2022

@Jeff Abbott ,

Please notice that this worked for a lot of other customers in all the linked threads (as well as for myself) and that it has been officially documented as the resolution of:

Saying this is not correct because it didn't work for you, without providing any further detail on what you tried and/or what failed is not really useful. 

Like # people like this

I think this question was about jira server

0 votes
KAGITHALA BABU ANVESH
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.
Mar 17, 2021

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.

 

Thanks,

Anvesh 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events