Hello,
I'm cloning an issue with the built-in Scriptrunner Clone script during a post-function in JIRA Cloud.
My main need is to clone the epic link, but I didn't figure it out.
I also need to set a new fixVersion in the new issue.
I've looked scriptrunner docs, but I didn't find anything.
Hi Hashpreet,
Thank you for your question.
I can confirm that we have the sample code snippet located here which shows on line 15 a line of code that can be placed in the Additional Code box to clone the Epic Link field.
This code will take the value from the issue being cloned which is stored in the issue map and will clone it to the IssueInput map which is used to create the cloned issue.
You will be able to take this code and update it to point to your Epic Link field and use it clone the Epic Link.
You have also mentioned wanting to set a Fix Version on the Issue, and can confirm that we have the example script located here which shows how to set a fix version and you can use this a reference to help create the script that you require.
If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.
Regards,
Kristian
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.