Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hello everybody,
I'm trying to use JIRA webhooks, I need to get the JSON body send by JIRA when when an issue has been updated and get the field which is updated.
is it that possible ?
This is a snippet of my descriptor.json
"webhooks": [ { "name": "Hello webhook", "event": "jira:issue_updated", "url": "/test", "excludeBody": false } ]
Best regards
Hi @Brahim ESSALIH,
If you hadn't found it already this page is useful: https://developer.atlassian.com/jiradev/jira-apis/webhooks#Webhooks-Example:callbackforanissue-relatedevent
What that page says is that during an issue_updated event you should receive a changelog property in the JSON body that contains the description of what changed most recently. The example on that page shows the changelog property looks like:
"changelog": { "items": [ { "toString": "A new summary.", "to": null, "fromString": "What is going on here?????", "from": null, "fieldtype": "jira", "field": "summary" }, { "toString": "New Feature", "to": "2", "fromString": "Improvement", "from": "4", "fieldtype": "jira", "field": "issuetype" } ], "id": 10124 },
I guess if more than on field changed, then the "items" array will contain more than one entry.
Hope that helps, Jon
Thanks @Jon Bevan [Adaptavist]. Can I tell JIRA to send me the key or id of the field too because the name is not very significant. I need to khow what is the id/key of custom field which is has been updated
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The "field" property contains the field's key if I remember right. So for a custom field it'll be something like "customfield_10931" but for system fields its "summary" or "issuetype" etc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is the response when I update a costom field
"changelog": { "id": "27368", "items": [ { "field": "Adresse de facturation", "fieldtype": "custom", "from": null, "fromString": "8 lotissement Darbousson", "to": null, "toString": "8 lotissement Darbousson\r\nhdfgf" } ] }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's annoying! In that case you'll need to use the fields REST API (https://docs.atlassian.com/jira/REST/cloud/#api/2/field-getFields) to retrieve the available fields and then filter through those for the one that matches the name (assuming you don't have duplicate field names).
Here is Atlassian's publicly visible bug report to fix this which you can vote on and watch: https://ecosystem.atlassian.net/browse/ACJIRA-955
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.
I am using jira-python in windows, and I want to try to set up the webhook. Do you have any tutorial that can guide me through? thanks!!
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.