Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

When using Create / Clone Issue(s) Post-function, there is no option to copy the remote links to the newly created issues. This article explains how you can copy over remote links (Web Links) from the source issue to the target issue(s) using the Groovy script.

Instructions

  1. Navigate to the intended workflow to make the necessary changes in the edit mode.

  2. Select the required transition.

  3. Select the Post functions tab.

  4. Select Create / Clone Issue(s) Post-function from the list of post-functions.

  5. Click on Edit to edit the post-function on the transition.

  6. Check the Run a Groovy script after the issue is created parameter under the Post-creation script

  7. Add the following code in the Post-creation script:

    import com.atlassian.jira.bc.issue.link.RemoteIssueLinkService
    import com.atlassian.jira.issue.link.RemoteIssueLink
    
    RemoteIssueLinkService remoteIssueLinkService = getComponent(RemoteIssueLinkService.class);
    List<RemoteIssueLink> remoteLinks = issue.getRemoteLinks();
    for (link in remoteLinks)
    {
      newIssue.addRemoteLink(link);
    }
  8. Save the post-function.

  9. Publish the workflow.

  10. Trigger the post-function, and now you can see that newly created issue(s) will have your remote links copied over from the source issue:

  • No labels