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
Hi @mrollf
Remove the JQL from the Scheduled trigger.
In effect, that JQL is running the rule once per result.
Ste
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..
So not sure why. Apologies.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.