Forums

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

Advanced Branching sends email each time a value was found

markus.neuwald@canon.at
Contributor
October 29, 2022

Hi!

i created a rule to send a list of issues to each mail address found in a customized detail field call "Mail Account Manager".

to get just one email send per found email address, i use Advanced Branching.

But instead of receiving just one email, i receive e.g. if my mail address will be found twice.

Example: 

  • my JQL find 4 issues.
    • 2 issues where in field "Mail Account Manager" the same value (e.g. mailA@domain.at) is stored.
    • 1 issue where mailB@domain.at is stored.
    • 1 issue where mailC@domain.at is stored.

mailA@domain.at receives two times the same email with the same list of issues.

i found AUTO-179 which seems to be my issue, but i'm not sure, because some users wrote that since 13th October it works again. But not in my case and so i will ask if something in my rule is wrong?

kind regards,

MarkusScreenshot 2022-10-29 211133.png

1 answer

1 accepted

1 vote
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.
October 29, 2022

Hi markus.neuwald@canon.at 

For a question like this, please post images of your complete automation rule and the audit log showing the details of the rule execution.  That will provide more context for the community to help.  Thanks!

Until that is shown...

For use cases like this, consider how to get a distinct list of the email recipients.  That can be done by using lookup issues with your JQL to find the users in your Mail Account Manager field, and then with advanced branching select the distinct ones.  For example:

  • trigger: whatever trigger you are using...
  • action: lookup issues with JQL to find the issues with the users of interest
  • advanced branch: using {{lookupIssues."Mail Account Manager".distinct}} as the source and perhaps varMailAccountManager as the variable name
    • action: lookup issues to gather the issues you want to send in a single email
    • action: email to {{varMailAccountManager.emailAddress}} with your list of issues from the lookup inside of the branch

Please adjust this as needed to match your field name and desired actions.

Kind regards,
Bill

markus.neuwald@canon.at
Contributor
October 29, 2022

Hi Bill,

thanks for your advise and your suggestion.

i missed to add ".distinct" to the advanced branching smart-value. -> {{lookupIssues."Mail Account Manager".distinct}}

Now the rule works.

many thanks,

Markus

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events