Hi.
Could anyone provide a working groovy (or any other Script Runner-supported language) script to change the created date of a given issue (ISSUE-ID)?
Thanks in advance
Ok, I ended up stopping the database and runnin a SQL script to correct dates. The donwtime was only 2 minutes. And then I reindexed the project using Script Runner as suggested by Henning Tietgens [CTS Eventim AG]
Have you tried called
issue.setCreated(timestamp)
in a transition?
hm, that means I have to edit the workflow right?
We have like 35 issues re-entered manually to the new project, they obviously have created dates much later then the original was. I just want to run a script for each of them to change the createddate to the original one. else, I would have to stop the DB which is not a very good thing.
So you can try this from the Script Runner console... use componentManager.issueManager to get a MutableIssue object for each of the 35 issues and set the created date and store() the issue. Maybe you have to run a reindex on these issues after that, you can use the builtin reindex script from Script Runner for that.
Would have been good if you had given the background in the question.
It looks like you're new here. Sign in or register to get started.