Hi,
Looking for a way to automatically link any issue that is mentioned in a comment, in any thread across all projects.
E.g. User 5 comments on a Jira Issue with a link to Jira Issue 101A
Issue 101A is then linked from the original Issue
Hello @Nick,
You can use script listener with MentionIssueCommentEvent. Let me know if you need more detail or help.
Regards,
Orkun Gedik
Thanks Orkun, and what code in the inline script part to add it as a Link?
Hello @Nick
The approach suggested by @Orkun Gedik is useful for newly added issues in comments, but not if you want to link issues which are already added in the comments. Because the listener will be triggered based on the event MentionIssueCommentEvent only for new scenarios and not for existing tickets if you wish to link them.
You are welcome @Nick.
You can use the following line to create link between issues.
ComponentAccessor.getIssueLinkManager().createIssueLink(Long sourceIssueId, Long destinationIssueId, Long issueLinkTypeId, Long sequence, ApplicationUser remoteUser)
Source issue and destination issue are depends on how you want to link issues.
Thank you - what do you mean by "Source issue and destination issue are depends on how you want to link issues.
Simply want a "relates to" link between Issues
Thanks Tarun
Can you please paste the complete code which you are using currently in your instance.
Hey @Tarun Sapra
Code is:
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.user.ApplicationUserComponentAccessor.getIssueLinkManager().createIssueLink(Long sourceIssueId, Long destinationIssueId, Long issueLinkTypeId, Long sequence, ApplicationUser remoteUser)
@Tarun Sapra any ideas?
Any @Tarun Sapra @Orkun Gedik any ideas so we can close this?
It looks like you're new here. Sign in or register to get started.