Scheduling a weekly summary status report via slack

Dana Weinbaum
Contributor
April 30, 2024

Hi,

I'm trying to create an automation to run weekly, that will provide a summary of customer-initiated bugs for the team. The ideal slack message will look like this:

- Total number of open bugs: ## (Jira chart that shows the total number sliced by domain)

- Bugs that were created in the past week: ## (Jira chart...)

- Bugs that are not assigned to any sprint: ## (Jira chart...)

- etc.... 

I know I can create multiple automations for that, each having a lookup issues rule and a slack automation action, but I wonder if there's a more elegant way of using a single automation for that. 

I asked GPT and it suggested to use multiple lookup issues with a single slack message,  but that didn't work.

It than suggested to create branching and put the different lookup issues + slack message in each branch but that didn't work.

Any ideas?

BTW is it possible to reference a chart and to send it? wouldn't that be amazing?? but obviously I'm willing to give that part up :-) 

 

Appreciate any help

 

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.
April 30, 2024

Hi @Dana Weinbaum 

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

Without seeing your rule specifics, I hypothesize you may use one single lookup issues action, list filtering, and math expressions to put the counts / information in a single Slack message.  Or, you could use multiple lookups and save the results with Create Variable or Create Lookup Table, and use those later in your message.

Regarding sending charts, that is not possible with built-in features of rules.  For existing Jira users, you could send them a link to a dashboard page with this information visualized.  It is also possible to build a histogram using characters...although that can be a bit complicated in a rule.

Kind regards,
Bill

Dana Weinbaum
Contributor
May 2, 2024

Thanks for replying Bill. Maybe I wasn't clear, I don't have an automation as I don't really know how to approach it. 

The filtering link you shared seems to be the solution, but I couldn't find in it or in the documentation any filtering option. 

The way I envision it is something like:
Trigger: scheduled

Then: lookup issues (with a query to find all open bugs)

Then: send a slack message:

_*Updated status of customer-initiated bugs:*_
- Total number of bugs: {{lookupIssues.size}} {{/}}

-->> problem starts from here:
if issue priority is critical -> {{lookupissues.size}} for that condition only
If issue was created within the past week -> {{lookupissues.size}} for that condition only

etc

 

What should be the action?

 

Thanks

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.
May 2, 2024

You could perform multiple calls to Lookup Issues with different JQL, saving the counts in Created Variables, and using those in the message.  This may be easier to read in the rule, but will run more slowly.

 

Or...use one lookup with smart value, list filtering to get the issues you want from the Lookup Issues result, and that can be combined with a math expression.  For example...

Medium count: {{#=}}0{{#lookupIssues}}{{#if(equals(priority.name,"Medium"))}}+1{{/}}{{/}}{{/}}

 How that works:

{{#lookupIssues}}do something{{/}}
  • for your case, that do something is filtering for any issues with a priority name of "Medium"
{{#if(equals(priority.name,"Medium"))}}when true return this{{/}}
  • when an issue matches, we add +1
  • around that, we wrap a math expression, with a 0 default value at the front, to sum the count

To find other priority counts, change the filter value.

Similarly, the created date could be checked if it is within this week using logical functions and the date / time functions: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events