/
Add a web link to an issue

Add a web link to an issue

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:

    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);

With this, the URL "https://innovalog.atlassian.net/wiki" will be linked to the current issue, with the title "Innovalog" - modify them as per your use case.

 

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

References

Related content

Add a web link to an issue
Add a web link to an issue
More like this
Copy remote links of the current issue to a new issue in "Create issue(s) (JMWE app)" post-function
Copy remote links of the current issue to a new issue in "Create issue(s) (JMWE app)" post-function
More like this
How to copy remote links (Web Link) using Create / Clone Issue(s) Post-function
How to copy remote links (Web Link) using Create / Clone Issue(s) Post-function
More like this
Copy Confluence links of the current issue to the new issue in "Create issue(s) (JMWE app)" post-function
Copy Confluence links of the current issue to the new issue in "Create issue(s) (JMWE app)" post-function
More like this
How to add remote links to Jira issues using Jira Command Line Interface (CLI)
How to add remote links to Jira issues using Jira Command Line Interface (CLI)
More like this
createWebLink
More like this