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.
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.
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.
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
Best,
Gustavo
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
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.