Forums

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

Variables get out of scope on Lookupissue

Jonas August 8, 2024

I'm trying to send an email to the persons which have tickets that are 2 days within the duedate, for that i use the loopupissue. If I'm trying to create a list in an email with the lookupissue my variable will be "" inside the lookupissue scope.

{{#lookupIssues}}
  {{#if (equals(distinctAssignee, assignee))}}
    - {{key}} | {{summary}} | {{assignee.displayName}} | {{url}}
  {{/}}
{{/}}

The value for distinctAssignee ist "", but why is that and how can I make it work or find a workaround?

2 answers

1 accepted

0 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.
August 8, 2024

Hi @Jonas -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

 

Once inside of an iterator such as {{#lookupIssues}} ...inside... {{/}} no other data is visible.

 

Are you trying to send one email to each person with issues, or a single email for all of the people?

Sending one email per person can be done using branching on the distinct assignees.  That approach is described in this knowledgebase article: https://confluence.atlassian.com/jirakb/automation-to-send-email-only-once-per-assignee-1310985609.html

Sending only one email with all the people, such as with sections for each person is only possible if you have a known, small number of people.  The rule would need to gather / save the data for each person in a variable and then combine those in the email.  A rule like this could be very difficult to maintain.

 

Kind regards,
Bill

Jonas August 8, 2024

Hello @Bill Sheboy

Thanks for your answer the link helped me. My mistake was that i had a normal jql search instead of the second lookupissue and so I don't need the conditional logic inside the lookupissue smart value.

Regards,

Jonas

Like Bill Sheboy likes this
0 votes
Dick
Community Champion
August 8, 2024

Hi Jonas,

Your lookup receives over 100 initial values that only then are reduced by the assignee conditional. 

Find the exact issues using a  jql expression, in automation, then use the send email option with the required information. 

Regards,

Dick

Jonas August 8, 2024

Hello @Dick

I already filtered the lookupissue and there weren't that many issues so that wasn't the problem.

Regards,
Jonas

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events