-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
High
-
Affects Version/s: 10.3.16, 10.3.19
-
Component/s: Rule execution (engine)
-
Severity 3 - Minor
Issue Summary
"Prevent duplicates by only adding this comment once to a particular issue." in automation rule blocks non-duplicated comments
Steps to Reproduce
- Set Up Issue Links:
- Create two issues and link them using using a link type like "relates to"/ any other issue lins
- Configure the Automation Rule:
- Trigger: Issue commented.
- Condition: Project equals SCRUM/any
- Branch: For Linked issues (Type: "relates to")/any
- Action: Add comment.
- Comment Body: Use a template that includes the trigger issue's last comment, for example:
{{now}} {{triggerIssue.key}} -{{triggerIssue.comments.last.author}} ____________________________________________________________________________ {{triggerIssue.comments.last.body}}{{ * *Crucial Setting:* Enable (tick) the checkbox *"Prevent duplicates by only adding this comment once to a particular issue."}} # *Trigger the Rule Multiple Times:
- Comment Body: Use a template that includes the trigger issue's last comment, for example:
- Comment 1: Add a comment to SCRUM-28 (e.g., "test comment 1").
- Result: The rule succeeds, and the comment is copied to SCRUM-29.
- Comment 2: Add a different comment to SCRUM-28 (e.g., "test comment 2").
- Result: The rule may intermittently fail here or on subsequent unique comments.
- Observe the Failure:
- Check the Audit Log for the rule.
- You will see a "Success" status for the rule execution, but the Action details for the "Comment on issue" step will show:
"No new comment was added since this issue has been commented on before: SCRUM-29"
Expected Results
All subsequent comments that are not a duplicate should also be copied over to the linked issue
Actual Results
- Looks like the "Prevent duplicates" logic is intended to stop the exact same comment from being posted twice. However, in this scenario, even though the source comment is new and unique, the automation engine's duplicate check incorrectly identifies it as a match to a previous execution, likely due to a race condition or a failure in how the comment body is evaluated when using complex smart value templates.
- so only the first comment is copied over and the the remaining comments are not copied to the linked issues
Workaround
Only workaround is to uncheck the "Prevent duplicates by only adding this comment once to a particular issue."
However this may cause duplicate comments to be added to the issue makes issue history long
- links to