Hi,
I have created a checkbox customfield where multiple options can be selected. I have tried to create an automation rule that checks for each options if it is selected, and if so creates a specific issue (see below).
Now In the below example, if I select both 'UK' and 'ES' cultures, both issues are created. But if I only select the second option (ES), nothing happens as the automation does not get past the first validation. It must be because these IF statements are actually nested and not validated separately. If it doesn't pass the first IF, the second is never reached. This forces me to create separate automation rules per culture. Is there anything that I can do to perform this automation in a single rule?
Hi, @Ivo_de_Vries -
I just encountered a similar issue while working for a customer. My co-workers and I figured out that if you embed each separate If statement in a Branch, they will all be validated separately. Here's what we came up with:
I hope that helps you (belatedly).
This is perfect! This worked for me, and I believe this would help the OP in the situation they were having. This solution should be at the top.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @David VanDyke that helped me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Fantastic! This has been annoying me for hours. It's so annoying that when an IF is true it ignores all the others :/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you also!!! Works fine for me. Wish there was a better way though, or a simple scripting language (would be quicker to write more complicated checks)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this case all branches run simultaneously. Is there a way to have them run one by one?
In for example the next use case: if it passes some condition > field A is fetched and some data is appended to this field. Same thing for the next branches.
Due to all the branches running simultaneously though, it is not possible to have multiple additions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ivo,
I'm Ilenice, from Automation for JIRA Support team.
Thanks for your question!
Well, what is happening to your rule is that, since “ES” option is selected, the first JQL condition doesn’t match, and then the rule stops executing, not even checking the next condition.
To your use case, I would suggest you use an IF/ELSE block condition:
You can configure your two JQL conditions inside this IF/ELSE block condition. I’ll show you how.
Please set your rule using the structure described below:
It’ll look like the following:
So, please note that when using an IF/ELSE block condition, if the first condition doesn’t match, Automation will check the next condition. :)
I hope it helps!
Let me know if there is anything else I can help with.
Cheers,
Ilenice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ilenice,
Thanks for your elaborate and quick answer. This also is not a solution for the current use case as the IFs are not mutually exclusive, I will explain a bit more on the context and the current (not ideal) workaround I have for it.
Our company serves about 18 countries and whenever we send out a communication, an issue of this type is created first. Whilst creating the issue, the cultures are selected that the communication applies to. Per culture that is selected, I want to generate a ticket for that specific department to handle the translation and sending of the communication. On the creation screen, the reporter also selects one of the predefined 'e-mail templates'.
Ideally, I would like to create a single automation rule per e-mail template, with an IF for every culture. IF checkbox culture is selected for UK, ES, NL and FR, the automation rule should create 4 issues respectively for each country. Using multiple IF's or an IF/Else structure does currently not work as explained above.
I would like to have a single automation rule per e-mail template as it is much more efficient to copy a rule for a new template (with all the IFs per culture) each time we introduce a new one (and make small adjustments to it). Currently my workaround is not to create automation rules per template but per culture (18 rules). Every time a new template will be added, I will have to add another IF statement to each of the 18 rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ivo,
thanks for replying and I’m sorry for my late response.
I’ve discussed this point with the dev team and, unfortunately, at the moment it’s not possible to achieve the result you want at the moment. For now, it indeed demands you to configure the 18 conditions, that is, one condition to each country available on the checkbox field.
However, through AUT-81 https://codebarrel.atlassian.net/browse/AUT-81 (You may need to open in an incognito window) we’ve been tracking an improvement which could help you on this, so we might have good news in the future. :)
In case you have any other questions or doubts, please feel free to make a new contact.
Cheers,
Ilenice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Do you know why i cant see if-else block while adding new component condition in Branch rule in second screen shot with red pen?
thanks
Milan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @[deleted]!
Yes, you're right, this is indeed not available. :(
By now, it was restricted to prevent performance issues.
There's an AUT raised for this, through which this point is being tracked: https://codebarrel.atlassian.net/browse/AUT-1005 - you might need to open this on incognito.
Let me know if there is anything else I can help with.
Cheers,
Ilenice
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.