I am trying to set the Resolution date for some issues using HAPI.
From the examples I found for updating other dates, I tried the following but it is not working
Issues.search(jqlSearch).each{ issue ->issue.update {setResolutionDate('2024-01-01')}}
I don't think the resolution date can be set this way. It's designed to be set automatically when a resolution value is applied.
There is a very lengthy discussion here: https://community.atlassian.com/t5/Jira-Software-questions/Scriptrunner-w-Automation-Set-Resolution/qaq-p/2076978
Hi @PD Sheehan
I understand that the resolution date should be set automatically when the issue is resolved but for some reason we have a couple of issues which do not have this set even though the resolution is set. These issues are messing up our reports and we want to set the resolution date to the date when the resolution was set. However, we still require to update the updated date so that internal tools can refresh the date regarding these issues. Hence why we are trying to avoid issue.store() as that does not update the date and does not record anything in the history (apart from the fact that Atlassian recommends against it).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Cristina Gatt ,
Have you run this script to check the expected format of the date?
import
com.atlassian.jira.component.ComponentAccessor
import
com.atlassian.jira.util.DateFieldFormat
ComponentAccessor.getComponent(DateFieldFormat).getFormatHint()
Kind regards,
Bobby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bobby,
Yes I did run the above and passed the date to the setResolutionDate() method in the formatting returned by the above script but it does not seem to update the date :(
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.