Hi community
I'm having trouble with one of my Jira automation rules. It works correctly in some cases, but completely skips others that appear identical. I can't find any logical reason why it behaves differently.
My Automation setup:
Rule Name: Comment on the issue when notification received again
Trigger: When a work item is created
Condition:summary ~ "SUMMARY OF ISSUE"Actions:
Lookup work items:
JQL:summary ~ "SUMMARY OF ISSUE" AND STATUS NOT IN (Cancelled, Completed) AND key != {{issue.key}}Add value to the audit log:
Found {{lookupIssues.size}} issues: {{#lookupIssues}}{{key}}, {{/lookupIssues}}If: Compare two values
Condition:{{lookupIssues.size}} is greater than 0
Branch 1 – Similar work item description:
If: Work item matches JQL:key = {{lookupIssues.first.key}}
and Status is not one of (Cancelled, Completed)
→ Action: Add a comment
(e.g. “This notification occurred again at {{now.convertTimeZone("America/New_York").format("yyyy-MM-dd HH:mm")}} – related…”)Branch 2 – Current work item:
→ Action: Transition to Cancelled
Here are two identical incoming emails that this rule should group.
However, Jira created two separate issues instead of linking or commenting as expected.
From: noreply@email.com
Date: Mon, Nov 3, 2025, 1:05 AM
Subject: Notification: SUMMARY OF ISSUE
Body of email
From: noreply@email.com
Date: Mon, Nov 3, 2025, 1:35 AM
Subject: Notification: SUMMARY OF ISSUE
Body of email
After sending more identical messages, the rule started adding comments to the second issue, ignoring the first one, as if the earlier item stopped being recognized as a match.
I don't understand why it did not work with email #1, as all of the emails are identical, the only change is the date of receiving the email
Audit log for the first email shows that the following work items did not match the condition:
If Condition:{{lookupIssues.size}} is greated than 0
Hi @Uliana Komiakovych -- Welcome to the Atlassian Community!
There are several possible things which could cause this symptom, so let's fix some things in your rule and then you may re-test to see if is resolved...
#1) There is known racetrack timing defect with the Work Item Created trigger where the rule can start before all of the data is available. This can cause missed conditions and strange errors. Atlassian knows about the defect and is making architectural changes to fix it, although with no announced timeline.
The mitigation for this is: always add the Re-fetch Work Item Date action immediately after that trigger. It will slow the rule slightly, reloading the data before the steps proceed.
#2) Adding to the above item, there are some challenges with the new feature to add conditions directly to triggers. I recommend not using this feature yet until Atlassian solves those. Instead, add separate conditions after the above mentioned re-fetch action.
#3) The JQL in your Lookup Work Items action does not have an ORDER BY keyword, and thus the items are essentially returned in a random order. I recommend adding an order by to enforce the expected ordering.
#4) Your rule checks the lookup results using the size function, and there are some cases where that can collapse to null, preventing a comparison to the 0 value. To prevent that, always add a default value to that expression:
{{lookupIssues.size|0}}
Please make those changes and re-test. If those do not help, please post the following for more context:
Kind regards,
Bill
Hi Uliana - Welcome to the Atlassian Community!
The times I see this most often is with the summary ~ Condition. See if you can do that differently like populating the work item with a particular Component that would correspond to the condition related to the summary.
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.