Forums

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

Can you use group by in a send email in automation

Ste404
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.
October 15, 2024

Hi there,

Now I know this isn't correct as I am just basically bashing this together trying to see how it might hang together.

I have a scheduled task that is filtered by a JQL statement.

What I am trying to do is send an email that has a heading for each status then the issues at that status under each heading and then loop through.

Is something like below possible in the send email body

 

 

Hi Team, Here are the open issues grouped by status: 

{{#issues.groupBy("fields.Status")}}
**Sector: {{key}}**
{{#issues}} - [{{key}}]({{url}}): {{summary}}
{{/}}
{{/}}

1 answer

0 votes
Alex Ortiz
Community Champion
October 15, 2024

@Ste404 

In your JQL statement, have you tried putting ORDER BY in your JQL?

Also, instead of doing an automation and since you are JQL, have you tried doing a filter subscription?  

A Filter Subscription will email the results of your JQL to a group of users on a schedule.

Ste404
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.
October 15, 2024

yeh I have those working fine, there was just an ask to have the output in specific groups.

Grouping seems to be a big miss for filters.

Alex Ortiz
Community Champion
October 15, 2024

But, wouldn't ORDER BY essentially give you a group by?  It's going to display the issues "grouped" by their issue type.

Hex.Persephone February 28, 2025

encountering same need as Ste404 @Ste404  @Alex Ortiz 

I have 2-3 teams getting a single release notes email automation, and leaders are insistent, it needs to be a single email with each team getting their issues in it's own group (by component). 

the orderby isn't satisfying the business need

Hex.Persephone March 7, 2025

@Alex Ortiz Hi Alex,

I'm trying to use ORDER BY for an automation email 

the ORDER BY is in the filter I'm referencing.

the lookup references results from this filter

I'm not having the issues looked up populate in the email with smartvalues I'm using. 

can you please advise? 

jira order by filter experiment.png

what I'm using in the email template:

{{#lookupIssues}}
{{lookupIssues.key}} {{summary}}
{{/}}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events