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

Are transition-triggered webhooks efficient?

Tim H_
Contributor
August 8, 2024

I was looking for a way to use post functions to trigger automation rules. I don't want event-based listeners but use pre-specified transitions within defined workflows. (Unfortunately, automation does not support this. See the linked discussion for details.)

As mentioned in the discussion, I found a way to do this with webhooks. Those web-hooks don't listen to events but are fired explicitly by post functions of certain transition. Technically, it works as expected and I'm happy.

However, Atlassian's document Best practices on working with WebHooks in Jira says that you actually should avoid webhooks if possible and use for example automation rules instead. They say that webhooks may slow down the system. Especially, as they have a global scope whereas automation can be done on a project level.

Unfortunately, I couldn't find any information if this is also true for my use case. I don't use event triggers for the webhooks. Instead, I fire them from pre-defined transitions.

Can anyone comment on this? Any help is greatly appreciated! I don't want to find it out the hard way *after* defining like 50 webhooks for certain transitions ;-)

Best regards,

Tim

2 answers

0 votes
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 8, 2024

Hi

 

Webhook are indeed slow on my side and can see lot of slow query in the log related to webhook that never trigger.

Could you create a custom event and trigger it in the transition instead ? Then catch the custom even with automation ?

 

Regards

Tim H_
Contributor
August 8, 2024

Hi @Florian Bonniec,

thank you for this suggestion. I couple of thoughts:

- Which logs do I have to look at in order to examine the webhook activity?

- Do transition-fired webhooks cause the same load that event-fired webhooks do?

- I could surely create a custom event. But aren't they actually for sending e-mails?

- Is it possible to pass an issue to the event? In the automation rule, I need to know the issue that triggered the rule. I do that by adding the issue.id to the webhook URL. I can then use it in the rule to copy values from.

Best regards,

Tim

Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 8, 2024

Actually I have a lot of JQL slow query displayed in my atlassian log and it's almost everytime related to a webhook even if the action is not related to the project the the action is triggered from.

ex  [c.a.j.p.webhooks.matcher.JqlEventMatcher_SLOW] JQL query '{project = "ABC"} AND {key in ("DEF-123")}

 

For the email, it has to be configured in the Notification Scheme but you could keep the generic event and add a second one using Fire Event post-function.

In automation, select Multiple issue events trigger and select your custom event. Then you can use the usual smartvalue.

 

Regards

 

 

0 votes
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 8, 2024

Hi

 

It's indeed slow, on my side I see lot of slow query in the log that are related to webhook check that never trigger.

As you want to trigger it on a specific transition, could you create a custom event, trigger this event in the postfunction then catch it in Autoamtion ?

 

Regards

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12
TAGS
AUG Leaders

Atlassian Community Events