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:
<span>summary ~ "SUMMARY OF ISSUE" AND STATUS NOT IN (Cancelled, Completed) AND key != {{issue.key}} </span>
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.
Email #1
<span>From: noreply@email.com <br>
Date: Mon, Nov 3, 2025, 1:05 AM <br>
Subject: Notification: SUMMARY OF ISSUE
Body of email </span>
Email #2
<span>From: noreply@email.com <br>Date: Mon, Nov 3, 2025, 1:35 AM <br>
Subject: Notification: SUMMARY OF ISSUE
Body of email </span>
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<br><br><br>