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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,457,020
Community Members
 
Community Events
176
Community Groups

1 Notification per assignee via Automation on Jira

If I make a JQL query "Sprint in openSprints() and statusCategory != Done" and there are for example 10 Issues found. -> Now I split the query again so that I only have the tickets with the assignee XYZ, let's say 5 of 10 issues are assigned to XYZ. -> Assignee XYZ should now be notified that these 5 tickets are still open via MS Teams or mail.

Now my problem:
{{#lookupIssues}}
* {{url}}
{{/}}
With this smartvalue I get a list of all issues in the above query, BUT assignee XYZ now gets 5 messages with the same content.

Can this be reduced so that he is notified only once?

1 answer

1 accepted

1 vote
Answer accepted

Hi @Nicolas Zuderell -- Welcome to the Atlassian Community!

For a question like this, please post images of your complete automation rule and of the audit log details showing the run of the rule which does not work as expected.  That will provide context for the community to offer suggestions.  Thanks!

Until we see that information, I suspect your rule has a scheduled trigger on JQL, leading it to run for each issue in the trigger set.  The solution may be to remove the JQL from the trigger and just run on a scheduled...using the JQL exclusively for your lookup issues action.  Then only one email will be sent.

Kind regards,
Bill

Thanks Bill to your answer it helped me with my MS Teams notification.
On the Mail i will get this message:

2022-03-21_Audit_log-Jira.png

 

This is my rule:

2022-03-21_rule-settings-Jira.png

Do I need a step more or do I something wrong?

Best Regards
Nicolas

Once you removed the JQL from the scheduled trigger, the Send Email now needed another source for that issue information: Lookup Issues.

Please try using {{lookupIssues.size}}

I have removed all JQL from the trigger and i still get the error from above in the audit log.
I deleted the JQL before i unchecked the box:2022-03-22_triggered_scheduler.png

 

also i removed the smart value in the subject of the mail. the content is still to the assignee of the ticket:
{{#lookupIssues}}
* {{url}}
{{/}}

Would you please post images of:

  • the details of your send email action
  • the details of the audit log showing the error after you made the changes to the rule

That may indicate what is happening.

 

The other possibility with Jira Cloud automation rules is they sometimes get "glitched" by changing the components to many times.  The way to test that is to disable this rule and re-create it as a new rule and see if that works.

Email action:

2022-03-23_sendMail-settings.png

 

And here the log between the changes:

2022-03-23_auditlog.png

 

i have recreated the rule with the same actions and triggers it dont works neither.

 

if i put my own mail adress in the "to-section" it works. If i put the assignee (like the first screenshot in this comment) it brings the "some errors" warning

Ah...got it.  Assignee in that context for the to-email-address is undefined, as there is no issue.  They are all in the Lookup Issues result.

The way to solve this is to get the email address from the lookup, and add a safety check  condition with this:

  • trigger: scheduled...
  • action: lookup issues...
  • advanced compare condition...
    • first value: {{lookupIssues.size|0}}
    • condition: greater than
    • second value: 0
  • action: send email with the to-email-address of {{lookupIssues.first.assignee.emailAddress}}

For the email address, type/pasted that smart value into the field and it will appear below it, then you can select it.

Like Nicolas Zuderell likes this
Like Bill Sheboy likes this

@Bill Sheboy Thanks for the steps, i tried the same but in my case one assignee received a mail but another did not. could you please suggest? please see attached screenshot

Image-1.png

Email:

Image-2.png

Also i don't want to send other assignee's tasks details in mail body, both assignee should receive only their own task details in mail body.

Hi @vdhanorkar 

Your use case is different as there could potentially be multiple different assignees.  As a result you need a different rule, as what you posted references only the first assignee from the lookup issues result.

One possible way to do that is:

  • trigger: scheduled
  • action: lookup issues with JQL
  • condition: check if there were any results before proceeding
  • advanced branch on smart values: on the distinct assignees found, using the lookup issues as a source from {{lookupIssues.assignee.accountId.distinct}} and a loop variable named varAccountId
    • action: lookup issues with the same original JQL, plus the clause assignee = {{varAccountId}
    • action: send your email

Kind regards,
Bill

Ohai Bill!

So as I laid out in my answer to @vdhanorkar's standalone question over here, I actually branched on {{lookupIssues.assignee.distinct}} in the "For each" so that I could access {{thisassignee.accountId}} for the nested JQL lookup and also use {{thisassignee.emailAddress}} for the To: in the email.

Like Bill Sheboy likes this

@Bill Sheboy Thanks, The solution you suggested working to me

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events