Forums

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

Lookup issues: avoid multiple emails with a scheduled trigger

Roman Lopez Basurto
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 16, 2022

Hello people, 

I'm working on a automation that sends an email once a week to a stakeholder with a list of all undone issues but somehow, when I set de Scheduled trigger, the whole process won't return anything unless I add a JQL sentence in the trigger and plus, it sends multiple emails instead just one with a list of all the issues.

And as you can see in the automation log, it also returns twice the result.

In the example I have 5 issues and getting 5 emails. 

I really appreciate if someone can help me find what I'm missing or doing wrong.

 

Many thanks

 

 

image.pngimage.pngimage.png

image.png

image.png

2 answers

1 accepted

2 votes
Answer accepted
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 16, 2022

Hi @Roman Lopez Basurto -- Welcome to the Atlassian Community!

The cause of the multiple emails is that your scheduled trigger has JQL, and so the rule iterates over each of them.  

Please schedule the trigger without JQL, then use the needed JQL with your Lookup Issues.  The result will be just one email with the requested issues.

Kind regards,
Bill

Roman Lopez Basurto
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 17, 2022

Hi @Bill Sheboy , 

Thanks for your input. I removed the JQL from the trigger and worked just fine. 

Regards

Roman

Like Bill Sheboy likes this
1 vote
Piyush A (STR)
Community Champion
March 16, 2022

Hi, 

with the jql, that would eventually Send mail for each of the issues in jql. 

try with below as lookupissue

Step1: The first step in the automation is to use the new lookup issues action by adding a "component: new Action" and select "Lookup Issues". Inside the lookup issues construct, add the JQL query you need (e.g., Issuetype=Bug, Status = Open ...)

Step2: Send a simple email with the following in the body of the email:

List of issues:

{{#lookupIssues}}
<a>{{key}}</a>
{{/}}

 

The email provide a simple list:

TD-3099
TD-3064
TD-2970

 

alternative and simple:

Maybe better use subscription filter https://confluence.atlassian.com/jira064/receiving-search-results-via-email-720416706.html?_ga=2.265119887.1200879533.1569824481-1550874464.1561971593 ?

Suggest an answer

Log in or Sign up to answer