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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much for giving me that detail, it works perfectly!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
well, code formatting kinda work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I saw Marek's picture above, I had exactly the same thought as Radu. What if you need to change one of the constant values, eg 3000. Painful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guys, unfortunately, it's not free and I do not have the technical skill set to install or create scripts like this, so I'd prefer to use the base features that come with JIRA or plug-ins that are open.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeap, as both of us suggested, there are free plugins out there. JJupin is not the way to go unless you have a huge WF, with many system interactions (additional databases, other Jira installs, exotic data sources, etc).
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.