You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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?
Hi @Shir Avtabi
You might try something like this:
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:
You might combine them and use them like this:
TimK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
{{/}}
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.
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:
I never tried it, but could work...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy This is valuable practical insight, thanks!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.