I have 2 issues here:
1. How do I make sure that both the conditions run inside the branch or how do I restructure it?
2. If my lookup has 5 issues, it is creating 5 new tickets, but I want only 1 ticket to be created. this is because it is "for each issue". how do I solve this?
Let me explain my automation flow once:
Scheduled Trigger
└── Lookup recent issues
└── For each issue
├── Create firmId variable
├── Lookup 90-day issues for firmId
├── If > 4 issues
├── Lookup existing Tickets
├── If Ticket already exists for the firmID → Edit and link issues
└── If not → Create new ticket
So basically, I am running a scheduled JQL trigger, and storing firmID from those tickets. Then I am checking if the firmID is used for more than 4 issues in lookup.
if it is more than 4, then there are 2 conditions:
if ticket already exist, then link trigger ticket to existing ticket
if ticket doesn't exist, create a new ticket
I have 2 "IF" conditions in a single branch. Once the first "IF" condition fails, the second one is not even checked for. How do I make it to check for both if conditions?
this is the audit log. it exits after if lookup > 0. but my 2nd IF condition is IF lookup = 0.
What you see is expected, IF conditions are evaluated sequentially the way your rule is currently configured. Currently For each branches don't have access to IF/ELSE conditions, you you would need to reconfigure your automation. One way would be to call a second automation that does the actual work and use the IF/ELSE condition there.
Hi @Manav Shah
Adding to the suggestions from @Mikael Sandberg ...
If / Else Condition blocks cannot be used inside of branches, but branches can be used inside of If / Else blocks. Perhaps restructuring the rule will help, and...
What problem is your rule trying to solve? That is, "why do this?" If you explain your scenario that will help the community suggest alternatives. Perhaps like this:
GIVEN some initial condition
AND some other initial condition
WHEN I do this thing
THEN perform this action
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that additional information, @Manav Shah
You do not show your entire rule, and from what you describe, I wonder if you could use the Scheduled Trigger with JQL to find the "recent issues" rather than a lookup. Then the trigger would handle the iteration rather than branching.
For example:
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.
@Bill Sheboy @Mikael Sandberg thanks for your responses. I have updated my query in a bit detail now. Please let me know if you are able to understand my issue and help me out
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.