Forums

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

automation / list of tasks with status in the email

Andrzej Hull
Contributor
April 4, 2022

Hi.

 

I was trying to follow the below automation template but it doesn't work for me.
It does send the email but the body is empty.
https://www.atlassian.com/software/jira/automation-template-library/send-slack

 

But anyway, could someone be so kind and help me build a rule which would create, based on status, certain summary email like:

List of issues to do:
*
*
*

List of issues in progress:
*
*

List of issues done:
*
*
*

P.S. Please do not send me to the documentation. I don't know how to read it to find answers to my questions. There are no examples.

2 answers

1 vote
Trudy Claspill
Community Champion
April 4, 2022

Is there a reason that you are trying to do this with an automation rule rather than using a saved filter and a Subscription to generate the email?

What information from each issue do you want to include in your email?

Andrzej Hull
Contributor
April 5, 2022

Well I am kinda new to setting up Jira, I didn't know I could use saved filter.

What I'm trying to get at the end of each day a summary email of what was done, what is in progress and what still wasn't started.
That's because I run multiple projects and having that organized like that would help me a lot.

Trudy Claspill
Community Champion
April 5, 2022

You can do this with a Saved Filter and a Subscription. You don't need an Automation rule.

Go to Filters > Advanced Issue Search and construct a filter to select the issues you want to review. If you want the output grouped by issue Status then use "Order By Status ASC". Here the home page for documentation on performing a search.

https://support.atlassian.com/jira-software-cloud/docs/search-for-issues-in-jira/

 

If you click on the button on the right (shown below) and select List view, that will show the output in Columns. Then you can click the button below it labeled Columns and select which fields you want to see in the output.

This page has information about setting up columns.

https://support.atlassian.com/jira-software-cloud/docs/work-with-search-results/

Screen Shot 2022-04-05 at 7.48.22 AM.png

When you have the search criteria and the Columns set the way you want, click the Save As button, and provide a name for this filter.

Screen Shot 2022-04-05 at 7.50.18 AM.png

Here is a reference document about saving filters.

https://support.atlassian.com/jira-software-cloud/docs/save-your-search-as-a-filter/

Then you would set up a Subscription to the field. A subscription will run the filter on a schedule you set and email the results. This page has information about setting up a Subscription for a Filter.

https://support.atlassian.com/jira-software-cloud/docs/work-with-search-results/

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 4, 2022

Hi @Andrzej Hull 

When you have a question about an automation rule, please post images of your complete rule, the audit log details showing the execution, an explanation of what you expected to happen, and what you observed.  That information will provide context for the community to help.  Thanks!

Without seeing your rule, I hypothesize that: the JQL for your lookup issues actions are incorrect, the JQL is correct/returning no issues, or your use of the smart values from the lookups is incorrect.  From what you have posted I believe it is the last one.

Kind regards,
Bill

Andrzej Hull
Contributor
April 5, 2022

I tried to recreate the example from the link above. The log says 'success', please see the attachment.

But anyway, I would need that automation rule a bit altered.
I tried to describe it in the original post.
Is it even possible?

 

 

jira1.PNG

 

 

jira2.PNG

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 5, 2022

Yes, it is the third thing I noted: smart values...

When using Lookup Issues, the scope is the lookup, and so you do not use the {{issue... or {{triggerIssue... prefix.  Instead just reference the attributes like this:

{{#lookupIssues}}
* {{url}}
{{/}}

Please adjust that to the format/markup you wish.

Andrzej Hull
Contributor
April 5, 2022

Is it possible to create separate lists for many statuses within the same email?
If so, how the rule should be modified?

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 5, 2022

Yes, and there are at least two ways to do this with automation rules:

1) Use Lookup Issues and change the JQL to filter on the desired status, and store the pre-formatted results in a created variable...including line breaks.  Repeat that, making multiple Lookup Issues calls to store the results in different variables.  Then reference the created variables in the email for each status section.

B) Use one Lookup Issues action and use smart value, list filtering to select the desired status values for each section in your email.  Please look here to learn more about that technique: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588

Andrzej Hull
Contributor
April 6, 2022

@Bill SheboyI don't understand this expression from example 1.

Which part of the line

Sprint in openSprints() and statusCategory != Done 

is a variable holding values?

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 6, 2022

Hi!

What I meant was to use the Create Variable action to store your formatted output, and then use that in the email.  Please look here for information about that action: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-variable

Andrzej Hull
Contributor
April 7, 2022

Right.
I feel like I'm getting close but still not quite there yet...

So I create variable:
name: issuesTodo
smart value: {{#issue.key}}*{{key}}{{/}}

Then I call it in the email:
{{issuesTodo}}

Nothing.

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 7, 2022

Try using the lookup for the source for the issues and then put the result in the created variable.  For example:

  • trigger: some trigger...
  • action: lookup issues with JQL to find Todo issues
  • action: create variable
    • name: issuesTodo
    • smart value: {{#lookupIssues}}*{{key}}{{/}}
  • action: lookup issues with JQL to find In Progress issues
  • action: create variable
    • name: issuesInProgress
    • smart value: {{#lookupIssues}}*{{key}}{{/}}
  • action: lookup issues with JQL to find Done issues
  • action: create variable
    • name: issuesDone
    • smart value: {{#lookupIssues}}*{{key}}{{/}}
  • action: send email, containing the variables in the body as {{issuesTodo}}, {{issuesInProgress}}, and {{issuesDone}}

 

I also noted you can do this with one lookup issues action and conditionals.  For example:

  • trigger: some trigger...
  • action: lookup issues with JQL to find your issues
  • action: send email, parsing the issues by status filtering (Note: please update for your status names)
Todo:
{{#lookupIssues}}{{#if(equals(status.name, "To Do"))}}
* {{key}}
{{/}}{{/}}

In Progress:
{{#lookupIssues}}{{#if(equals(status.name, "In Progress"))}}
* {{key}}
{{/}}{{/}}

Done:
{{#lookupIssues}}{{#if(equals(status.name, "Done"))}}
* {{key}}
{{/}}{{/}}
Mustafa Aydemir July 18, 2022

Hi @Bill Sheboy 

I followed your last steps you wrote. But I can't get the right status under the right "status header" and I can't show more than one issue on one specific status...

Report automation.png

I saw this get() method but didn't help me because it looks at the index of my filter.

 

Report mail.png

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.
July 18, 2022

Hi @Mustafa Aydemir 

First thing, get() returns a specific single entry from a list.  With your get(0) that would only look at the first issue in the Lookup Issues result (if there are any issues), so it is unclear what you are trying to do.

Next, please look at the example I posted and look at this post on filtering.  Your expression does not match either for filtering a list.

https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588

Kind regards,
Bill

Mustafa Aydemir July 18, 2022

HI @Bill Sheboy 

I tried that from the link you send, but it only gave one issue and after I wrote I tried the example above in the post for the second time and it worked well. 

Thanks for the input :)

Kind regards
Mustafa

Suggest an answer

Log in or Sign up to answer