Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,564
Community Members
 
Community Events
184
Community Groups

"Prevent duplicates by only adding this comment once to a particular issue" not preventing duplicate

I have an automation like the below where I only want it to trigger once when first assigned.

  • When: Issue Assigned
    • Rule is run when issue is assigned to a user.
  • If: Matches
    • Issue type equals (Internal issue type)
      • Then: Add comment to the issue
      • "Please blah blah blah"
      • Prevent duplicates is turned "ON"

Why is it duplicating when I reassign?

Test.jpg

2 answers

2 accepted

0 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 25, 2022

Hi Dylan - Welcome to the Atlassian Community!

Jira doesn't know when an issue is assigned if it is the first time or 20th time. So you need something else there to check it. 

Maybe try creating a new custom number field and set the default to 0. 

Then add another Condition to check if the value of the custom field is 0. If so, they it would fire.

But you also need add an Edit Issue action at the end to set the value of the custom field = 1. 

So the first time it is assigned, then the custom field is 0. The trigger passes the condition, adds the comment. And at the end of that, it updates the custom field to 1. 

The next time the issue is assigned, it checks the custom field, which is now 1. So it fails the condition check and does not fire. 

I'll try the workaround but curious why there is a feature to prevent duplicates when it doesn't seem to be able to prevent them

Like John Funk likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 27, 2022

That's probably a question for Atlassian Support. 

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jul 25, 2022 • edited

Hi @Dylan Alperin -- Welcome to the Atlassian Community!

The option to prevent duplicates detects if the comment text (body) is exactly the same.  Does that match your use case?

If not, you will need another way to detect duplicates, such as:

  • check if the previous value of the assignee was empty with an Advanced Compare Condition:
    • first value: {{#changelog.assignee}}{{fromString}}{{/}}
    • condition: equals
    • second value: empty
  • or...check if any prior comments (or fields) have some pattern you can detect

Kind regards,
Bill

Yes it is exactly the same, its just the one automation to add the comment so strange it doesn't detect it.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jul 27, 2022

Awesome; you have definitely found a bug.  I recommend working with your site admin to submit the defect here: https://support.atlassian.com/contact/#/  I was able to reproduce this symptom as follows:

Steps to reproduce:

  1. create a manually triggered rule, with a single action to add a comment with some text, such as "Here is a simple comment which would should not duplicate!"
  2. confirm the add comment option is "Prevent duplicates..."
  3. publish the rule
  4. open an issue in the same project as the rule
  5. run the rule from the issue
  6. run the rule a second time
  7. disable the rule
  8. enable the rule
  9. run the rule a third time

Expected results:

Step 5 adds a comment and Steps 6 and 9 do not add duplicate comments

Actual results:

Step 5 adds a comment and Step 6 does not.  However toggling the rule off/on leads to Step 9 adding a duplicate comment.

Work-around:

Add other fields/values to detect that the comment was added earlier and check for the condition created to prevent duplicate comments.  Apparently making a change to the rule changes the thing preventing duplication.

Like Dylan Alperin likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 27, 2022

Dang - I'm worn out just reading that.  :-)  Thanks for all of the hard work, Bill!

Like Bill Sheboy likes this

Is there a bug ticket somewhere for this? I still have this issue

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events