Issue create webhook triggers attachment create webhook

Mateusz Skiba
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 14, 2024

Hi. I have jira <-> web api integration using global webhook to communicate between those 2 services. Ive created 3 webhook for 3 api endpoint.  First one is triggered when issue is created, second one when comment is created and third one when attachment is created. When I create issue only webhook for issue creation is triggered and it is working as intended but after switching integration for production(client created webhooks in prodcution environment where I dont have acces but as instructed) after creating Issue attachment create webhook is triggered. I tried to invoke same logic in test env during creation of issue Ive added few attachment either  in dropbox or in description but only issue created webhook is triggered. Is there a way to turn off triggering attachment create webhhook when issue is created or filter out those webhhooks ? 

1 answer

0 votes
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.
May 18, 2024

Hi @Mateusz Skiba -- Welcome to the Atlassian Community!

Without seeing any of your rules or knowing the problem you are trying to solve, I suspect the answer is, "no, that is not possible."

When the issue is created, it is likely the Jira application code makes a second REST API call to add any attachments after the newly created issue exists, leading to the additional events which are triggering your webhook.  To do the same thing with no additional rule triggering, you would need to write your own application to call the REST API functions, one after the other, and not use automation rules.

Kind regards, 
Bill

Doug Bass May 21, 2024

I have a similar situation where I have a webhook for created issues and a webhook for created attachments.

Previously (like a year ago) if an issue was created with the attachment added on the create issue screen, the issue created webhook was fired AND the attachment webhook was fired.

Today I tested it and the issue created webhook is fired but the attachment created webhook is NOT.

Is this an Atlassian bug that was introduced lately, or is this a design chnage on purpose in the webhook architecture?

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.
May 22, 2024

Thanks for that information, @Doug Bass 

I removed my suggested workaround as that may no longer work based on what you observed.  Perhaps there was a change to the REST API for issue create when an attachment is added at the same time.

 

Suggest an answer

Log in or Sign up to answer