Pls show me how to send one email with a list of resolved issues....

Gena Welk April 4, 2023

I have created an automation (which will run once per day) to resolve issues that have a status of Done and have not been touched in 15 or more days.

status = "Done" AND updated < -15d AND resolution = Unresolved

Now I want to send one email with a list of all of the issue keys that were changed as a result of the automation.

I was advised to enter this:

{% for is in issues %} {{issue.key}} {% endfor %}

 That did not work - instead it resulted in 200 individual emails with one issue key listed in each.

What code should I try instead?

Thanks in advance for your help.

2 answers

0 votes
Esther Strom
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2023

Hi, @Gena Welk - can you share a screenshot of your rule setup? I'm assuming it's the one you showed in your linked post, but I'd specifically like to see the configuration screen of the Send Email step.

ETA that as Trudy mentioned (and Nicolas in your previous post), a saved filter with a subscription would definitely be the simpler route, but if you have undisclosed reasons for doing this with automation we do need to see the entire configuration.

Gena Welk April 14, 2023

The saved filter and subscription was useful, but it didn't go to the address I was hoping.  I only saw how to enter the subscription for a registered user (ie me).

 

My intention with this question was to "log" what was being changed by the automation which runs every day at 4am.  I didn't solve that, but I did create a subscription that runs every day at 5am, so it sort of had the same effect (but didn't go to the email address I am using for logs...)

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2023

Hello @Gena Welk 

Is there a reason that you are not using a Saved Filter with a Subscription to deliver that information, rather than an Automation Rule?

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

If you decide you want to continue to use an Automation Rule, please show us the entire automation rule. That is critical for us to understand the context under which the various steps are executing. For instance, are you using a JQL in a Schedule trigger to get those issues? If so, the definition of a Schedule trigger is to execute every action for each issue that it retrieves, which could be why you got 200 emails.

I would instead recommend that you pull the JQL out of the trigger and use a Lookup Issues action to retrieve the issues. The documentation shows how to insert the list of all issues retrieved by that action into an email.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2023

You can also iterate through the results set of a Lookup Issues action to make changes to each issue in it.

There is an example of that in the answer on this post.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events