Hello!
I am trying to make my custom field mandatory on transition if issue has not link type "included in the package".
There is my code:
def xlink = issueLinkManager.getOutwardLinks(issue.getId())*.issueLinkType.name.contains('included in the package') if (xlink < 0) { return cfValues["Opportunity ID"] as boolean } true
Seems this not working.
Help me please to solve it.
Thank you a lot!
sms
Hi Sergey
First of all, I see a problem with the condition check
if (xlink < 0)
xlink can be equal to 0, but cannot be less than 0. Hence this will always be false.
So, I believe the condition should be
if (xlink == 0)
Hope this helps.
Thanks
@Arun Thundyill Saseendran
If you need to validate links added this transition, you will need the method described here: https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/validators/validate-attachments-links-in-transition.html#_validating_links_added_this_transition
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.