We sync our JIRA Worklogs to an external tool. Whenever a worklog is deleted we need to submit its id to the other tool to delete it there as well. I created an automation rule that calls a webhook on worklog delete events. But if I use custom content for the POST value and enter {{worklog}} the rule fails.
If I post the default issue data it works but then it doesn't contain information about the deleted worklog.
Any idea how to solve this?
@Barbara Theiß @Alex Ziegltrum did you try using System Webhook instead of automation?
https://[Your Domain].atlassian.net/plugins/servlet/webhooks#
You can configure it to be send on Worklog delete.
You can also include {worklog.id} as a variable in the URL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Lior Pinelis great idea, thank you. My external tool used to not accept url parameters but that was changed recently. So: yes, that worked! Still don't understand why automation fails but as long as there ist a solution, I am fine :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Alex Ziegltrum ,
I finally ended up sending the worklog as an email to mailparser.io using the worklog id as mail subject. Mailparser then passes the mail to my webhook.
Maybe there is a better solution out there but at the moment it works for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Barbara Theiß
thanks for your reply.
I created three automation rules, for workog created, edited and deleted. The first two work as expected. With {{issue.worklog.Id}} e.g. I can pass the value to the webhook of our external tool.
That does not work with the deleted event. The deletion event itself is recognized as expected, but there is ID with {{issue.worklog.Id}}, the audit log is empty.
How did you manage to get the ID of a deleted worklog at all?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't know why but with the email action {{worklog.id}} works perfectly fine as a subject.
I just retested it within a webhook - but that's still not working there.
By the way: I have a webhook posting to my external tool whenever an issue gets deleted - that is not a problem at all...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found two things :)
First, in the automation, where I catch the deleted event of a worklog, I can now process the {{worklog.id}} normally, can audit log it and that is the most important part, hand it over to the webhook of our billing application.
Why this wasn't working from the beginning, I don't know, now it does.
Second, with the system webhook, it seems that I can't hand-over values in a web request body. Furthermore, the endpoint that is called needs a header with an X-Action, that also cannot be handed over.
So that seemed like a nice alternative solution, but lacks of the other options. And since the {{worklog.id}} parameter is now magically available in the automation, it solves what we need sufficiently.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.