Hi,
I am trying to enforce some conditions for transitioning a JIRA issue in a workflow.
I have following transition steps in a Workflow named BugWorkflow
1. Open
2. In Progress
3. In QA
4. UAT
5. Close
I have several fields in my Bug Issue scheme. I want to check conditions on following non-mandatory custom fields a) SVN version b) Front End Code Reviewed c) Back End Code Reviewed
Here is what I want to do, When someone tries to transition a JIRA issue from UAT -> Close
I want to check
If SVN version field is empty - >Close the issue
Else check
If ( Front End Code REviewed is Empty OR BackEnd Code Reviewed) ->Close the issue
I know that I can add single condition but this is a bit complex. If you have any solution, please let me know
Thanks
Prashant
You can use value field condition and add any level of grouped conditions.
Thanks. Sorry for the late reply, I have tried your solution but its not working for me yet. I wanted to compare both NULL and not null condition at the root level.
If I can write some psudo code, I Here is what I am trying
If( SVN == NULL)
{
IF (Back End Code Reviewed == NULL OR Front End Code Reviewed == NULL)
{
Close JIRA issue
}
}
ELSE IF (SVN !=NULL)
{
IF (Back End Code Reviewed != NULL OR Front End Code Reviewed != NULL)
{
Close JIRA issue
}
}
I am not able to put the second condition somehow.
This image help you understand better. Appreciate your help in this regard.
Thanks
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I could change this a bit but still not able to achieve the expected outcome. Here is how it looks now. I guess the external nesting (pointed by red arrow) is causing the problem. Do you see any solution?
Thanks
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I suspect it's because your nesting is not doing anything.
At the top level, you have two condition groups joined.
The first group says "The field fixed in svn version # ... equal to null". The second says "The field fixed in svn version # ... not equal to null". As the join is "any", then you are going to find that every issue matches the joined condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Nic.
I am not able to put IF and ELSE IF condition here.
All I care is,
IF SVN# is null then at least one of BackEnd code reviewed and FrontEnd Code reviewed fields should be blank
ELSE IF SVN# is not blank then
At least one of BackEnd Code Reviewed and FrontEnd Code Reviewed fields should not be blank
Let's say, if I put only one outer condition, SVN# is blank, then it is always going to make sure that the condition is true. I am not able to achieve IF ELSE IF condition here :)
Please suggest.
Regards,
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If/then are another way to express the logic, they don't do much different.
A set of conditions should lead you to a simple boolean true or false. You can express them as if/then, or as and/or statements or a mix when you're coding, but for conditions in Jira transitions, you have to use and/or.
Look at the second layers of nesting in your conditions - they should be "and", not "or"
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.
@Nic Brough -Adaptavist- It worked :)
I have changed the conditions and now I am getting the expected result. Here is what I have changed based on your reply.
I thank you both @Sreenivasaraju P and @Nic Brough -Adaptavist- for the help.
Next: I want to display the error notifications to the user when the conditions do not allow to close the issue.
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.