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

Is it possible to use multiple lookup issues in the same automation rule?

Hi all,

I'm trying to get a list of several JQL results in one email.

I tried with a lookup issue and a smart variable to capture it, but it only returns the latest lookup issue and not all of them. Is it possible to get it working in one email?

3 answers

3 accepted

0 votes
Answer accepted
Tim Kopperud
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.
Oct 05, 2023 • edited

Hi @Shir Avtabi 

You might try something like this:

twolists.png

The rule is executed in the example above, and returns two variables representing two lists (split shown in yellow) that can be used in later JQL (see below).

The create variable step should look something like this:

variable.png

You might combine them and use them like this:

combined.png

TimK.

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.
Oct 03, 2023

Hi @Shir Avtabi -- Welcome to the Atlassian Community!

It is not possible to have multiple, active Lookup Issues results in a rule at this time.

A work-around is to use the new Lookup Table issue to store the results; the "value" field of a table is an object and may be referenced the same as the lookup.  For example...

  • trigger: some trigger
  • action: lookup issues with first JQL
  • action: create lookup table, storing {{lookupIssues}} as a row value, 
  • action: lookup issues with second JQL
  • action: send email:
    • {{lookupIssues}} and {{tblMyTable.get("myKey")}}

Kind regards,
Bill

Hi Bill, thanks so much for your response.

I tried your suggestion but unfortunately I could still only get the latest lookupissue result but nothing from the lookup table. 

Maybe you have another suggestion or maybe you know of a feature request that we can vote for? 

Thanks a lot!

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.
Oct 04, 2023

Interesting...I re-tested that approach before I posted this.  Would you please show the complete rule you are using, including details of the table creation and usage in your email?

Sure! 

The result I get by mail is the list of the second JQL and the word "and" at the end with nothing after it.

Thanks for looking into it! 

epiclists1.pngepiclists2.png

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.
Oct 05, 2023

Smart values are name, spacing, and case-sensitive.  When you created the table your smart value for {{lookupIssues}} has the wrong case, and so gets translated to null.

Please try changing that and observe the results.

And...

I suspect you want more details in your email, rather than just the issue keys.  And so both smart values can be iterated in the email, like this:

{{#lookupIssues}}
* {{key}} - {{summary}}
{{/}}

and

{{#EpicLists.get("DoneEpics")}}
* {{key}} - {{summary}}
{{/}}

Thank you for your response! It's been a huge help!

Like Bill Sheboy likes this
0 votes
Answer accepted
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 03, 2023

As far as I remember, the Lookup Issues action collects the resulted issues to the {{lookupIssues}} smart value or similar. But the point is that there is only one smart value (variable in this sense). Which ultimately means that it will always contain the the result of the very last Lookup Issues action.

What you could try is something like this:

  1. Execute your first Lookup Issues
  2. Using Create variable copy the value of the current {{lookupIssues}} to {{foo}}
  3. Execute your second Lookup Issues
  4. Using Create variable copy the value of the current {{lookupIssues}} to {{bar}}
  5. Now, you have the two result set in the two smart values, you can render the email!

I never tried it, but could work...

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.
Oct 03, 2023

Hi @Aron Gombas _Midori_ 

When I have tried that method in the past (for lookup issues and web response) the results were stored in the created variable as text, requiring more complicated parsing...and no smart value names unless the results were stored as JSON.

Please see my post for using lookup tables for another approach that preserves the object types.

Kind regards,
Bill

Like Aron Gombas _Midori_ likes this
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 04, 2023

@Bill Sheboy This is valuable practical insight, thanks!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events