Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article provides the code snippet to add a web link to an issue, using Scripted (Groovy) operation on issue (JMWE app) post-function.

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 and click Add post function.

  4. Add the “Scripted (Groovy) operation on issue (JMWE app)” post-function.

  5. Add the below Groovy script:

    Code Block
    languagegroovy
    import com.atlassian.jira.issue.link.*
      
    RemoteIssueLink link = new RemoteIssueLinkBuilder().issueId(issue.getId()).url("https://innovalog.atlassian.net/wiki").title("Innovalog").build();
    ComponentAccessor.getComponent(RemoteIssueLinkManager.class).createRemoteIssueLink(link, currentUser);

...

Info

If this post-function is added on the create transition, move it below “Creates the issue originally.” built-in post-function.

References