Hi...I need a validator to allow a transition only if the epic has at least one child. I tried to use one of the examples under the simple scripted validator section in scriptrunner (Has at least one outward duplicate link) and adapted it to what I need but it does not seem to work:
issueLinkManager.getOutwardLinks(issue.getId())*.issueLinkType.name.contains('is epic of')
I also changed it from Outward to Inward to see if that made a difference but still no luck. Maybe it can not be done like that and it needs an actual script? If so, any ideas?
Thank you
Hi Tomas,
If there is at least one child in the epic then the following will return true
ComponentAccessor.getIssueLinkManager().getOutwardLinks(issue.id)?.find {it.issueLinkType.name == "Epic-Story Link"}
Which is similar to what you have with the only difference the epic link type name.
Hi Thanos....it works.
As always, thank you very much!
Please close the related request in you support site as well
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.