Send Slack Message based on Child Ticket Fields

Edwin Andrew January 30, 2025

I'm working on creating a manual trigger for Epic Tickets to send out an a web request to slack where it would print all child tickets related to that epic and one customfield associated to each child ticket. Here is what i have currently. 

Screenshot 2025-01-30 at 11.09.23.png


Web Request (POST) 


{ "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "{{#lookupIssues.summary}} {{/}}" } } ] }



End goal to have it print in this format: 

- Child Ticket 1
- - Customfield value for child ticket 1

- Child Ticket 2

-- Customfield value for child ticket 2

 

Currently its printing out nothing. My current dummy ticket has one child ticket associated it to but can't get anything to print out. 

 

3 answers

1 accepted

2 votes
Answer accepted
lily jon
Banned
January 30, 2025

 

Your Web Request isn't properly iterating through child tickets. Try this:

 {
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "{{#lookupIssues}}- {{summary}}\n - {{customfield_XXXXX}}\n{{/}}"
}
}
]
}

Visit https://chipotlmenu.com/chipotle-catering-menu/

0 votes
Edwin Andrew January 30, 2025

Hey @Bill Sheboy  i am using the cloud instance. 

Sorry if I understood correctly, would this be what i should be doing instead?


{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "{{#issues.summary}} {{/}}"
}
}
]
}

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.
January 30, 2025

No, as the plural {{issues}} smart value is used with Jira Server / Data Center automation.  For Jira Cloud, the Lookup Issues action or Send Web Request is how issues are handled in batches.

FYI...when asking questions it helps to include information about your Jira version and project type.  That will help the community provide better suggestions.

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.
January 30, 2025

Hi @Edwin Andrew -- Welcome to the Atlassian Community!

What version are you using: Jira Cloud or Server / Data Center?

Based on what you describe, I hypothesize you are using the Server / Data Center version.  Automation for that version does not yet support custom fields with the Lookup Issues action, and here is the suggestion to add those: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877

For your scenario, you could use the bulk-handling feature of a branch rather than the Lookup Issues action: https://confluence.atlassian.com/automation/run-a-rule-against-issues-in-bulk-993924653.html

With that, you would replace the {{lookupIssues}} smart value with the plural {{issues}} one.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events