When trying to create a new rule using a "user condition"
The logic only allows for AND statements, so all conditions must be true, but I need to be able to use IF, ELSE type statements in this automation. Will this work?
If not, what is the supported way of using this kind of logic structure?
Thanks
Jira does not support nested if/then statements within a single branch of automation rules. For example, you cannot have a structure like this:
To work around this limitation, you can create multiple branches, each with one condition that effectively functions as part of the "if/then" logic. The structure would look like this:
This workaround achieves the same result as the unsupported nested structure. The only downside is that the automation rule may have to execute multiple passes, one for each branch, which could impact the automation rule performance depending on the complexity and number of conditions/actions.
Hope this helps!
Seem this still not available using "If-Else" block in Branch, which surprising why it's not implemented what the harm to have this normal if/else conditions!
Anyway, question to @andreas what is the workaround that works in a lot of cases you mentioned earlier?
The following link doesn't work:
https://docs.automationforjira.com/components/conditions/conditions.html#if-else-block
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anthony,
Sorry for the slow response on this. We don't fully support this yet (see https://codebarrel.atlassian.net/browse/AUT-42), but there is a workaround that works in a lot of cases.
EDIT: This is now available - see https://docs.automationforjira.com/components/conditions/conditions.html#if-else-block
Cheers,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The If-Else block does not appear to be available within a branch. Disappointing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill I was stuck with this too, but I did the if condition outside the branch stuff. In my case, it worked, I just changed my logic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everybody, where are we with this feature? It is said it is implemented, but I can't see it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any updates on this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
2023 and we still can't use if/else inside a branch
Is atlassian still working on Jira?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Work Around for this issue using Web hooks
In my case, whenever Epic's Due Date was modified I had to recalculate the dates for all of its children and calculation logic varied based on the Summary of the Child Issue present.
having if/else on Branching option to run the date calculation based on if, else would be best option, but since it is not there. I have used following approach.
Step 1 - Setup a trigger on the parent/epic that will call a web hook and pass the Issue Key to the service.
Step 2 - Setup an incoming web hook with setting ► "Issues provided by running the following JQL search" and now use the smart value to generate the JQL like below
issuefunction in issuesInEpics("key={{webhookdata.key}}")
Now you can add IF/Else without a branch option and every issue from the JQL will iterate through it and control can be sent back to the calling service if required.
outgoing side
Incoming Side
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.