Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation - Is it possible to send a list of issues, to a cf user picker, and only send 1 email

mrollf April 9, 2024

Hello fellow Atlassian users and admins! I had a request from one of my team leads to automate an email for one of their boards so that stake holders can be notified of QA activity on a card ever so many days. 


My issue is that I when I test the blow automation, It sends me 4 emails all with the same list, I only want it to send the end user 1 email with only their issue data. What am I doing wrong?

Thanks for the help in advance!

I have:

When: Scheduled, every 2 days.

Then: Look up issues
JQL: project = DA and status = QA and statusCategoryChangedDate > 1 and cf[10601] is not empty

Advanced branching:
smart value {{lookupIssues.stakeholder.distinct}}
Variable name: DStake

Then: Look up Issues: 
JQL: project = DA and status = QA and statusCategoryChangedDate > 1 and cf[10601] = {{DStake}}

AND: Send Email

DSTAKE.emailAddress

Hi {{stakeholder}},

Here is the list of issues that have you as the stakeholder:

{{#lookupIssues}}
- Issue Key: {{key}}
- Summary: {{summary}}
- Status: {{status.name}}

{{/lookupIssues}}

Best regards,
Admin

1.PNG

4 answers

3 accepted

2 votes
Answer accepted
Ste Wright
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 9, 2024

Hi @mrollf 

Remove the JQL from the Scheduled trigger.

In effect, that JQL is running the rule once per result.

Ste

1 vote
Answer accepted
Kalyan Sattaluri
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 9, 2024

Hello @mrollf 

Can you please log {{lookupIssues.stakeholder.distinct}} and show/share what is the output?

<EDIT>

Never mind, reviewed this article and seems like your rule is correct..

https://confluence.atlassian.com/automationkb/automation-rule-to-send-single-email-for-all-issues-per-assignee-due-next-week-1130727622.html

So not sure why. Apologies.

 

0 votes
Answer accepted
Joseph Chung Yin
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 9, 2024

@mrollf -

Your rule seems OK.  Can you confirm that you are getting multiple emails coming from multiple active scheduled triggers rules?  Also, if there is only one scheduled trigger rule, can you verify the CRON expression/schedule setup are configured properly?

@Kalyan Sattaluri 's referenced link was an excellent one.

Please advise.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

mrollf April 16, 2024

Once I removed the JQL from the trigger it corrected itself. Which was odd seeing as I tried it with out it, and was still getting the multiple emails. It has all worked out now. Thanks @Joseph Chung Yin , @Ste Wright , and @Kalyan Sattaluri  for all your assistance helping me.

0 votes
mrollf April 9, 2024

@Joseph Chung Yin , @Kalyan Sattaluri , Thank you both for your reply, To answer Joseph's question, I have 4 cards/issues with myself as the stakeholder custom field. When I run the trigger, it sends 4 emails to me, even when I use the .distinct on my Smart Values. Also Thanks for posting that article @Kalyan SattaluriThat is the exact one I used when I made it. 

I was wondering if it had to do with it being a custom field or not. I wasn't sure but you never know some times.

Suggest an answer

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

Atlassian Community Events