i have a business need in my workflow to allow a JIRA to Move from an Awaiting Approval Stage to an Approved Stage using a transition called 'Approve Issue'. But I have a few conditions that need to exist that limits who can see the Approve Issue Transition link.
There are two fields that need to be referenced in this case - Field A and Field B.
When the JIRA is in the Awaiting Approval stage the link will appear for differnt groups depending on the value in Field A:
i have been trying to figure out how to do this under the one transition and have been trying the Value Field Condition with the User Is In Group Condition, but I'm having troubles getting these rules straight.
Is anybody able to help me build these rules?
You have to make the condition in the right order. You have to start with the user is in group conditions and swith to OR. Than "add grouped condition" to each existed condition and than "add grouped condition" to them.
See the picture.
Is this the solution?
I understand exactly what you are saying, but I can not get the conditions to be grouped as you have them in the image. I tried multiple times and the conditions keep getting bumped out of the groupings and I end up with a slightly different set of conditions.
Why does JIRA make this so....painful when it's a simple Boolean logic we are attempting?
You have to create the conditions in the right order (from the top to the bottom):
The last condition is the same as the condition for Group 1. I hope this will work.
My 2 cents: For this kind of logic you should use some plugins, because this tends to explode in some hard-to-maintain installation.
with my baby (JJupin), this is only one condition and is written directly as:
return ( (userInGroup("Group 1", currentUser()) and (A < 1000 or B < 1000))
or (userInGroup("Group 3", currentUser()) && (A > 3000 || B > 3000))
or (userInGroup("Group 2", currentUser()) and ((A >= 1000 and A <=3000) or (B >= 1000 and B <= 3000)));
Note: this is untested, and only for illustation purposes; normally these values should be defined as constants somewhere, some checks should be added ....
You can try Jamie's Script Runner (same idea, groovy, free), or any other one that fits to this purpose.
It's very easy to edit the values within an existing condition, less than 2 minutes, same as it would be to change in a formula that Radu has listed. If I ever get the conditions to line up, they would work, but I can not get them to line up...2 hours in and I'm still trying every method under the book to create this Boolean logic...lol
In some scripting plugins the logic can be in a file outside the workflow, so you don't even need to create a draft and all that. Plus you could apply the same logic to multiple workflows, and only change the parameters in one place. It's not so much that it's tedious and manual, but also error prone. Given that in the picture above the same value is used about 3 times, and I assume you'd want that to be consistent.
I completely understand the sentiment of someone not feeling they have the technical skills to go this route, and your current issue is probably not reason enough to go down that avenue. However most of the scripting plugins (groovy, python) are free and OSS.
It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs