I have a few JIRA projects that were created without a workflow transition post function to set the resolution in the transition to the DONE status. I have corrected the problem by adding the post function for all transitions to DONE.
However, I now have a data integrity problem because all issues that were previously transitioned to the DONE status do not have a resolution or resolution date.
As an experiment on one of the issues, I was able to set the resolution just fine using Power Scripts. The resolution was set and the resolutionDate was set to the current date time as expected. However, I would like to set the resolutionDate to the changelog history record date when the status was changed to DONE.
I have read all questions regarding resolutionDate and understand that it is a read-only calculated field that looks up the last changelog history record. So I assume that I need to first add a resolution to all affected issues, then change the date of the changelog history record for the resolution change. This can't be done with Power Scripts because I cannot access the changelog history records. I am on JIRA Cloud, so I can't use SQL.
Am I on the right track? Can this be done with the REST API?