I have an automated form where different tickets are created in 2 different Jira Cloud instances based on Else/If statements. When I run this 2 stories are created in the Health project. I've reviewed the conditions and they appear to be exclusive. Can you help me figure out why 2 tickets are created for 1 entry? Here's my query and conditions for the 2 statements that are creating 2 different tickets.
Hello @Glenell Rosburg
With an If/Else block every set of conditions is evaluated. The block isn't exited when the first set of matching conditions is encountered.
An issue with these values:
Issue type: Value Prop VPE/VPA: Value Prop Add Resource Allocation: Implementation
…will match the first Else block on all three criteria. It also matches the second Else block because the two criteria in the block match the issues.
If you want the second Else block to not create an issue when Resource Allocation = Implementations, because that is handled by the first Else block, then you would need to add criteria to the second Else block such as:
JQL Condition "Resource Allocation" != Implementations or "Resource Allocation" is empty
The first Else block would create the issue when all three conditions match included Resource Allocation = Implementations
The second Else block would only create an issue if Issue Type and VPE/VPA match and if Resource Allocation is either empty or not set to Implementations.
I simplified my query immensely but I'm still getting 2 Health stories created. UGH!
@Glenell Rosburg
For the second version of your rule:
Hi Glenell, before you simplify any further, I tested an If/else block yesterday with two else-if branches whose conditions both matched the same work item, and only the first matching branch ran, so I doubt tighter conditions inside one block will stop the second story. Two separate blocks did both run in my test, so if your version still has them as separate blocks, I'd merge them into one block with else-if and see whether the duplicate goes away.
If they're already in one block, I'd start with Trudy's audit log question and look for two executions from a single entry. I'd also check for a second rule doing the same job, for example one on the form being submitted and another on the work item being created, since a single entry would fire both. That would fit what you're seeing.
I'm not quite sure what you mean by blocks. I believe they are in 1 block with an else-if. I have reviewed and confirmed that there is not a second rule doing the same job. Thanks for that advice!
Hey @Glenell Rosburg, one block with else-if is what I meant, so that part's fine, and thanks for ruling out a second rule.
Your scope answer gives me another idea. The setting Trudy asked about sits in the rule's details panel (Atlassian now calls it Flow details, the same panel where you rename the rule), as a checkbox reading "Check to allow other rule actions to trigger this rule". If that's ticked and your rule is triggered by a work item being created in a scope that includes Health, the story the rule creates in Health could start the rule a second time, and that second run would make the duplicate. I'd untick it and try one entry, keeping the scope as it is so the rule can still create in Data and Health. If the audit log then shows a single execution, that was it.
I found the rule's details panel. (It is now under Settings.) This is what I have set.
What is the scope of your rule? Is it scoped to a single project or multiple projects? Are the Data or Health projects within the rule scope? Multiple projects. The form is in 1 project (space), Data is a separate project (space), Health is a separate project (space).
What exactly do you have for rule scope? Are the Data or Health projects listed in the rule scope?
In the rule Settings did you choose "Only user actions…" or "Allow other automations…" for what can trigger the rule. I can't file the rule Setting. Where can I find that?
See the image below. I should have said "Flow" Settings. This option is in the same location as the Project scope for the flow.
@Trudy Claspill Yes, this is the flow that I have set. Yes, DATA and Health are included in the scope. I have additional rules that create tickets in both spaces and this rule creates tickets in both spaces based on the answers. In this case, the only space that gets 2 tickets added is the Health space.
I see the settings panel you posted in your other reply.
The radio button setting rules out that this flow is being triggered by another automation event.
The Scope confirms that this flow is triggered only when an issue is created in the Data project.
So, this flow is not the culprit creating two new items in the Health space.
For the two new Health items being created, look at the details of each one. On the right side is an Automations panel. In that panel click the Refresh button. That will show recent automations run for that issue. What does it say for each one?
It looks like you're new here. Sign in or register to get started.