Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with incoming webhook combined with issue lookup

Jeff Moy
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!
July 26, 2023

Hello everyone,

I am reaching out to you today as I am facing some limitations (and what may actually be a bug) when using `Incoming webhook` as a trigger.

In our company, we have projects and services that we deploy that may be managed through multiple jira projects (teams). The idea behind the automation is to send a notification to a Slack channel for a given release, and in that notification include the list of all tickets (across all Jira projects) that belong to that release.

We are using a webhook from our CI pipeline as a trigger. This webhook includes the list of issues (as per the documentation) + the fix version name as `releaseName` in the `data` property.

The first attempt we did was to simply trigger a slack notification following the reception of the webhook. This works, but it triggers one notification per issue in the payload - we haven't found a way to group all the issues and issue a single notification that would have access to all issues unfortunately - if we could make this work, this would be the best case scenario.

As the first attempt was failing, we decided to use the `releaseName` included in the webhook to pull all issues that belong to this `fixVersion`. The lookup works and the audit log includes the corresponding tickets, but the Slack notification does not contain them: it's blank.

 

rule-details.png

rule-notification.png

Please note, the same slack message template works if trigger is not `Incoming webhook`.

 

Slack template

```

:ship: Release *{{webhookData.releaseName}}* is ready to ship:

:ticket: Tickets:
{{#lookupissues}}
- <{{url}}|{{key}}>: {{summary}}
{{/}}

```

I suspect that this is a bug as the audit log properly shows the looked up issues as shown in the screenshot.

rule-audit.png

Would anyone have an idea to solve our issue? Whether to be able to trigger a single slack notification with all issues directly from the payload of the webhook, or make the lookup work.

Many thanks.

2 answers

0 votes
Gustavo Saborio
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!
November 7, 2023

Hi @Jeff Moy

Instead of using the Lookup issues component, you can do the JQL search right in the Incoming webhook trigger, then you can access the issues down the road with the {{issues}} smart value. You could even add logic for the next steps to run only if there are any issues, you would use {{issues.size|0}}, see screenshot.x

image.png

 

Best,
Gustavo

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.
August 1, 2023

Hi @Jeff Moy -- Welcome to the Atlassian Community!

Smart values are name, spacing, and case-sensitive.  I wonder if the issue is the name for the smart value is {{lookupIssues}} so perhaps try this:

:ship: Release *{{webhookData.releaseName}}* is ready to ship:

:ticket: Tickets:
{{#lookupIssues}}
- <{{url}}|{{key}}>: {{summary}}
{{/}}

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events