Hi there,
I have a situation where the customers want a "Blocked" status for issues. Whilst I have advised that this will often lead to orphaned or forgotten issues sitting in this status, we have come to a compromise.
In order to transition an issue to a blocked status there must be at least one linked issue that "blocks" the issue, and it must be un-resolved. On those issues being resolved I will set up automation to "un-block" the issue.
Looking at: https://docs.adaptavist.com/sr4jc/latest/features/workflow-extensions/jira-expression-examples#linked-issues
I've come up with the following script runner validator that I think should serve:
issue.links
.filter(l => l.type.inward == 'is blocked by')
.some(l => l.linkedIssue.resolution == null)
However always returns false
I've also tried l.type.outward and "blocks" variations of the validator to no success.
Any help would be greatly appreciated, thank you.
Hi Sandy,
I believe you may want to update your code to be similar to the example here on line 81 as this should validate that the issue has at least one issue linked to it with the link of 'is blocked by' and does not have the resolution set.
I hope this helps.
Regards,
Kristian
Success thank you so much. I was also missing a capital "I" in "Is blocked by". But is now working.
issue.links.some(l => l.type.inward == 'Is blocked by' && l.linkedIssue.resolution == null)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandy,
I am glad you got your validator working
Regards,
Kristian
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.