Hi, when i click a button on my Issue the Issue creates another Issue Type that is then related to this Issue. I want Users to use this function only once so they cant create multible identical issues with this button. Can somebody help me with the condition so it checks if there is allready an Issue related to this?
Hi @GS1337 ,
Below snippets may work for you,
If you want to check at least one outward link with particular type, there is already example given by Adaptavist as a help note
issueLinkManager.getOutwardLinks(issue.getId())*.issueLinkType.name.contains('Duplicate')
If you want to check irrespective of outward link, below link condition will hide the transition if there is linked issue, will enable/display transition button only if there is no outward link
import com.atlassian.jira.component.ComponentAccessor
def outwardLinks = ComponentAccessor.getIssueLinkManager().getOutwardLinks(issue.getId())
return outwardLinks.size() == 0
Regards,
Leo
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.