Include issue key/id in new webhook events

Description

Hi team,

I'm revisiting the new webhooks that will be replacing existing webhooks according to

https://developer.atlassian.com/static/connect/docs/latest/release-notes/deprecations.html

What I've found is that comment_created, comment_updated and comment_deleted doesn't have any reference to the issue. ideally in our case will be that the webhook contains the full issue information like the old jira:issue_updated webhook, but I can settle with at least the issue key or issue id so I can look up (extra cost) for the issue when webhooks are being processed.

This is how a comment_created webhook looks like

it doesn't contain any reference to the issue. Without the reference to the issue or (performant) workaround we cannot upgrade our addon.

worklog_created, worklog_updated and worklog_deleted do contain an issue id.

Workaround

As written in the Webhooks documentation page:

Variable substitution in the webhook URL

You can append variables to the webhook URL when creating or updating a webhook. The variables are listed below:

  • ${board.id}

  • ${issue.id}

  • ${issue.key}

  • ${mergedVersion.id}

  • ${modifiedUser.key}

  • ${modifiedUser.name}

  • ${project.id}

  • ${project.key}

  • ${sprint.id}

  • ${version.id}

You can use these variables to dynamically insert the value of the current issue key, sprint ID, project key, etc, into the webhook URL when it is triggered. Consider the following example:

Environment

None

Assignee

Eve Stankiewicz

Reporter

Fernando Boucquez (PPL)

Labels

None

Components

Configure