How to import epic link during Scriptrunner issue clone in Jira cloud?

Hashpreet Singh August 13, 2019

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.

 

 

 

1 answer

1 accepted

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 13, 2019

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

Hashpreet Singh August 16, 2019

Hi Kristian,

Thank you, I've resolved my problem.

Suggest an answer

Log in or Sign up to answer