Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: comments twice

Sebastian Pechhold
Contributor
February 10, 2023

Hi,

i have the problem that my automation posts the same comment twice everytime. "prevent duplicates..." is checked

 

What is the problem? This is so annoying for our devs.. But we need that info because of our integration to an external tool which reads the comments.

And no - we do have only this automation running for comments :)

 

Screenshot 2023-02-10 at 13.45.43.pngScreenshot 2023-02-10 at 13.45.24.png

5 answers

1 accepted

2 votes
Answer accepted
Tony Langlet
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.
February 10, 2023

I'm just thinking could it be that your trigger reacts on updates and by adding a comment it updates the ticket again?

Could you add a condition where you only do the comment if the account is not your automation account? 

Jack Brickey
Community Champion
February 10, 2023

That was one of my theories in my first suggestion...


can you verify that the trigger does not have the following checked?

Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.


however, I wrongly assumed that was an option on the issue updated trigger. However, there are no configurations options associated with the trigger. The checkbox to prevent multiple comments should work, but doesn't appear to be.

Tony Langlet
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.
February 10, 2023

Not sure if possible in your environment but using the Field Value Changed trigger could be one thing to try but you'd have to define which values that should trigger and I would say this isn't the best way of doing it if you want to check all values.

Just trying to give you some options.

Sebastian Pechhold
Contributor
February 13, 2023

That worked for me

2 votes
Sebastian Pechhold
Contributor
February 13, 2023

Hey guys. Thanks for the contribution.

Atlassian has responded:

"Hi Sebastian,

When you added the issue to the sprint, the rule was triggered one time. However, when an issue is added to a sprint, the rank field will be updated automatically and this will be considered as another update to the issue. hence, the rule got triggered again for this update."

So i changed the trigger from ISSUE UPDATED to VALUE CHANGES FOR SPRINT

This works for me. Had to adjust the comment to a more general comment, but that is fine.

0 votes
Jack Brickey
Community Champion
February 10, 2023

Thanks Sebastian. I tested this very scenario just now and it works as expected, only one comment. Definitely something going on in your instance it appears. Keep me posted on what support I have to say.

0 votes
Vedant Kulkarni_Trundl
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.
February 10, 2023

@Sebastian Pechhold , 

For me, it is working as expected.audit_log_automation_latest.JPG

This must an instance specific, you can raise a request to Atlassian support for checking detailed logs.

Sebastian Pechhold
Contributor
February 10, 2023

Why does it pass 2 times? Ok will contact the support, thanks

Screenshot 2023-02-10 at 14.12.26.png

0 votes
Jack Brickey
Community Champion
February 10, 2023

Hi @Sebastian Pechhold , can you verify that the trigger does not have the following checked?

Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.

Also please check that there are no other automation rules. One quick test would be to change the comment in the rule that you are showing above. If you get two different comments that would indicate multiple rules.

Sebastian Pechhold
Contributor
February 10, 2023

Screenshot 2023-02-10 at 14.02.34.png

 

The same happened with another comment automation that made a comment by removing an issue from a sprint.

 

But i can do this. sure

Sebastian Pechhold
Contributor
February 10, 2023

Screenshot 2023-02-10 at 14.04.19.png

Jack Brickey
Community Champion
February 10, 2023

another suggestion - simplify the rule as below...

2023-02-10_08-04-36.jpg

Jack Brickey
Community Champion
February 10, 2023

quite odd... can you try the rule illustrated?

Sebastian Pechhold
Contributor
February 10, 2023

:D :D :D 

Screenshot 2023-02-10 at 14.10.07.pngScreenshot 2023-02-10 at 14.10.33.png

Sebastian Pechhold
Contributor
February 10, 2023

Filed a support ticket. keep you posted. Thanks and a nice weekend.

Like Jack Brickey likes this
Jack Brickey
Community Champion
February 10, 2023

quite odd for sure. I wonder if it is possible that you have some add on what is creating this conflict. I cannot reproduce it in my instance. Could you tell me what update you are performing on the issue that triggers the event so that I might test the same? Other ideas:

  • Test in another project
  • Contact Atlassian support as it might be regression
Sebastian Pechhold
Contributor
February 10, 2023

This happens in all projects.

We move an issue from the backlog to a sprint. Then the comment is placed by the automation if sprint field is not empty.

 

That's it.

Suggest an answer

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

Atlassian Community Events