Can you send a summary slack that is made up multiple lookupIssues calls?

Brandon Leong
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!
March 11, 2024

I am trying to create an automation that will send a weekly summary slack. It will contain multiple lookupIssues calls that will have something like this:

New Issues: XX

Open Issues: XX

Closed Issues: XX

Out of SLA: XX

List of issues:

XX-1234 ABCDEF

XX-5678 GHIJKL

 

Right now I have multiple lookupIssue actions and then multiple Send Message to Slack actions and they all get sent a separate which makes it hard to forward the summary to another slack channel.

1 answer

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.
March 11, 2024

Hi @Brandon Leong -- Welcome to the Atlassian Community!

Based upon what you are showing, I can think of two ways to do this:

 

Better way for rule performance: use one call to Lookup Issues to gather all the relevant issues, and use smart value, list filtering and math functions to report what is needed: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588

For example, to count your completed issues, that would be this:

{{#=}}0{{#lookupIssues}}{{#if(equals(status.statusCategory.name,"Done"))}}+1{{/}}{{/}}{{/}}

How this works:

  • iterate over the lookup results
  • filtering on issues which are in a status category of "Done"
  • adding +1 for any found
  • wrapping that up with a math expression to sum the count, with a default value of 0 at the front of the expression

 

Better way (maybe) for others to understand the rule: use multiple calls to lookups issues and save the intermediate results in created variables.  Then use the variables in your Slack message.

 

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events