Hi,
I know we can enable a transition if a record as at least one outward link is present, using Script Runner's post function.
Is there any work around to BLOCK a transition if the record has at least one inward link is present ?
Can Script Runner help on this ?
Thanks, Vishnu.
Work out what the code is to allow it, then put an exclamation mark on the front to negate it. Eg:
! issueLinkManager.getOutwardLinks(issue.getId()).any {it.issueLinkType.name == "Escalated From"}
Thanks a lot Jamie.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Vishnu,
See the documentation at https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Simplescriptedcondition
Use a condition like
issueLinkManager.getInwardLinks(issue.getId()).size() > 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhushan
Thanks for the suggestion.
Will this condition allow the transition or block it ? I think it allows.
Also, can I specifically check for a link type not present, say 'Escalted from' ?
issueLinkManager.getOutwardLinks(issue.getId())*.issueLinkType.name.contains('Duplicate')
Basically, I am looking for something like "issueLinkType.name.NOTcontains" operation. Is is available ?
Thanks, Vishnu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline 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.