Something like this:
! issueLinkManager.getInwardLinks(issue.getId()).any { it.issueLinkType.name == "Blocker" && ! it.sourceObject.resolution }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's throwing error at &&
how do I resolve this?
Both my workflows (parent and linked issues) have Done state as the green (resolved group one?) state last one
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ratna
It seems like the formatting got messed up. It should look like this.
! issueLinkManager.getInwardLinks(issue.getId()).any { it.issueLinkType.name == "Blocker" && ! it.sourceObject.resolution }
BR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Its still not working for me :(
Should it be "is blocked by" or "blocks" (those are the types I see under issue links). I tried both and it still lets me close the item. I added the code into the simple scripted validator option as shown
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ratna
Neither of those will work. You have to use the name of your link. For me, that was Blocker.
Please check under Issue Links what it says under the column Name. It should be the first column.
BR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It should be "is blocked by" for me correct? It does not work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ratna
No, that's just your inward description. Please check the column Name in your settings under issue links.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! I got it right now!! I was using the description showing on the issue instead of the actual name of the link type fro admin panel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I recently was looking for a way to prevent open tasks from being closed when they are being blocked by other tasks and saw this example.
I've added the code as a validator into the closing step of our workflow. This works great so far. However, when the blocker is resolved and closed, we're not able to close the main task.
How can I connect this example with checking whether the blocker is resolved or not?
Thanks for your help.