Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Send a list of issues in Slack with Jira automation’s newest action (Cloud)

Hey there, Atlassian Community! We’ve heard a lot of feedback from you over the years around the idea of automating actions on a group of issues. Here are some of the things we heard you wanted to do:

Well, we want you to know we’ve been listening.

Based on your feedback, we’ve added a new action called Lookup issues. Long story short, it allows you to search for a bunch of issues, save it as a list, and then do stuff with it.

Sound good? Let’s dive in and take a look!

 

Recap - What is an automation rule?

At a basic level, Automation rules in Jira consist of 3 types of components you can configure:

  • Trigger - the event that will make your rule start

  • Conditions - requirements that have to be met, for your rule to run

  • Actions - the things your rule will do, if it gets triggered and meets all the conditions

In this article, we’re focusing on a brand new action called Lookup issues.

 

What is the Lookup issues action?

Once your rule is triggered, the Lookup issues action will perform a JQL search that you enter. You can edit your JQL as much as you like so it only searches for the issues you want to include.

Lookup-issues.png

You can then access the resulting list using the {{lookupIssues}} smart value.

 

What could I do with this?

So in short, the Lookup issues action lets you search for issues, save it to a list, and then do stuff with that list. "Stuff" could mean sending an email, Slack, or MS Teams message. It could also mean commenting, transitioning, or updating every issue in the list. Magic!

Let’s look at an example in context.

 

Example: Print all the issues remaining in a sprint

Let’s say you’re a team lead, and you want to update your team every morning on how much work is remaining. Instead of doing this manually, you could set up an automation rule and let Jira automation handle it for you.

 

Step 1: Trigger

All rules start with a trigger; let’s set ours to trigger every day using the Scheduled trigger.

Lookup-issues-Trigger.png

Step 2: Use the Lookup issues action

This is where our new friend, the Lookup issues action, comes in handy. We can enter a JQL query to find all the issues that are in the sprint, and not Done. This list of issues will be saved to the {{lookupIssues}} smart value.

Lookup-issues-Lookupissues.png

Step 3: Have Jira send a slack message containing the list of issues.

Now, we can take that JQL search we just entered, and print the list of issues somewhere using the {{lookupissues}} smart value.

We’ll go with a Slack message for this example.

Lookup-issues-Slack-message.png

Cool! What else could I do with this?

Actually, there’s a lot you could do. For example, you could use Lookup issues to:

  • Take all the issues assigned to one person, and reassign them to someone else (handy for when team members go on holiday!).

  • Look up all the issues that are in a Review status, and add a comment to each one to remind the reviewer to look at them.

  • Compile release notes by finding all the issues in a release, and publishing the summary for each issue.

Really, listing out every possibility here would make this article super long - but I’m sure you’ve already got some ideas for your team! If you’re keen to hear from other ideas, check out our most recent webinar.

 

Where can I learn more?

If you’re excited to jump in and start creating your own rules, head to Project settings Automation to create project rules or Jira settings > System > Automation to create rules for your entire site

Or if you want to learn more:

51 comments

Hello

Thank for this wonderfull feature, but I can't find it ? (I have the automation v7.1.15 on Jira server 8.5.3)

2020-06-24_11h28_32.pngRegards

Hi @cendre ,

This new feature is unfortunately only available for the Cloud version of Jira automation right now (as opposed to the Automation for Jira app) 

John 

Hi,

I would like to send more information in my email, for example, Assignee or Status of the ticket. Is that possible

I tried this, but it didnt work. I only get URL for each ticket but not status

{{#lookupIssues}}
https://stptech.atlassian.net/browse/{{key}}- {{issue.status}}
{{/}}

 

Thanks

Neetu

How can I check for the returned list being empty and then abort the action? I want to remind people about open issues and it doesn't make sense to interrupt their workflow with a message saying that there is nothing to do...

@Neetu Verma You can do something like this:

 

{{#lookupIssues}}
{{url}} {{status}}
{{/}}
Like Jibu Chacko likes this

Thank you for getting back to me, But when I add status it comes with status id. I need a status name in the email. How can we do that?

 

for example , 10415 is "status"

https://stptech.atlassian.net/browse/TECH-11504 10415 TECH-11504 STP - Report Builder - ControlOps Datasource 

@Neetu Verma Can you try this?

{{status.name}}
Like Neetu Verma likes this

This is working well. Where can I find the rest of the fields (i.e., summary)?

Thank you, it worked.. Thank you so much 

| https://stptech.atlassian.net/browse/TECH-11504 | TECH-11504 | STP - Report Builder - ControlOps Datasource | In Release Env

@darrin - Here is how I have my rule

{{#lookupIssues}}
{{issueType}} | {{url}} | {{key}} | {{summary}} | {{status.name}}
{{/}}

@Darrin Lange You can find a short list here and additional fields here (see "issue").

Hey @Kevin Bui 

I'm unable to print custom fields in a slack message from the lookup issues action is this a limitation?

I've tried the following combinations following {{#lookupissues}}

  1. {{Story Points}}
  2. {{customfield_10022}}
  3. {{issue.customfield_10022}}
  4. {{issue.customfield_10022.value}}
  5. {{issue.fields.customfield_10022}}
  6. {{issue.fields.customfield_10022.value}}

other info - single project rule, custom field is a numerical field, all fields returned in the lookup issues function have the custom field and its not empty. 

Thanks

T. 

Hey @Tom Williams ,

At the moment, unfortunately you can't use custom fields with the lookup issues action though there is an issue to make this possible. I'll make sure to update this post once that is shipped :)

Cheers,

John 

Like # people like this

Could you please explain how to achieve one of your example : "Compile release notes by finding all the issues in a release, and publishing the summary for each issue."? Without the ability to use smartValues in the JQL, I cannot see how to achieve that...

 

Without that ability, this seems almost useless. Currently, the JQL must be a constant, which I guess is the reason why the example listed on this page is based on a Scheduled trigger : this is the only one that makes sense with a constant JQL... :(

 

And it cannot be achieved by branch rule given that https://confluence.atlassian.com/automation/bulk-handling-of-issues-993924653.html#Bulkhandlingofissues-Bulkhandlingofrelatedissues does not seems to be possible on Jira Cloud :/ 

Hi,

I’m having problems with some smart fields when using “Send email”.

This

{{#lookupIssues}}{{key}}, {{/}}

 provides a list of issue keys as expected.

But this

{{#lookupIssues}}{{priority.name}}, {{/}}

provides a list of blank values (“, , , , , , , , ,”). The same thing happens with {{priority.iconUrl}}, {{duedate}} and {{duedate.jiraDate}}.

Does anyone know what the problem may be? I’m using Jira Cloud.

Thanks,
José

Also looking for same thing as Sven..
How can I check for the returned list being empty and then abort the action?
Want to skip sending out message if nothing is in list.  This is awesome!
Have this message going into slack now!!

Release Completed {{version.name}}
{{version.description}}


{{#lookupIssues}}
* {{issueType}} <{{url}}|{{key}}>: {{summary}} [{{assignee.displayName}}]
{{/}}

When will this feature be released for Jira Server?

Hi @Tom Wilson and @Sven Bendel

You can avoid sending the message by adding an If Condition before the Send Message block. Choose "Advanced compare condition" within the "If block" and set the condition {{lookupIssues.size}} greater than 0.

Best regards,
José

Like # people like this

That works perfectly, many thanks @José Blanco Villalba !!!

@José Blanco Villalba - that's great!

Now we'd just like to be able to print the {{lookupissues.size}} in the Slack message. Has anyone found a way to do this? 

@José Blanco Villalba 

How do use the `{{lookupIssues}}` to output the release changelog given that you cannot filter on the version just released as lookup issue doesn't support smartValues ?

 

Release Completed {{version.name}}
{{version.description}}


{{#lookupIssues}}
* {{issueType}} <{{url}}|{{key}}>: {{summary}} [{{assignee.displayName}}]
{{/}}
Sam Harding Atlassian Team Jul 29, 2020

@blemasle You can use smart values in JQL queries, including the JQL used in lookup issues. So to achieve what you are wanting is a case of using the JQL 'fixVersion = {{version}}' in lookup issues (if you are using a version related trigger), and then your template you are using should be as you are expecting.

Sam Harding Atlassian Team Jul 29, 2020

@Tom Williams Hi, you can't use the {{lookupIssues.size}} inside the {{#lookupIssues}}{{/}}, but you can use it outside of the list iterator, so you could include the size in your slack message along the lines of

Number of lookup issues: {{lookupIssues.size}}

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

The inability to push the {{lookupIssues.size}} inside the iterator is a limitation at the moment, but something we are looking at solving. 

Hi @José Blanco Villalba the fields priority and duedate aren't currently included in the supported fields for lookup issues (see https://support.atlassian.com/jira-software-cloud/docs/automation-actions/#Automationactions-Lookupissues for the available fields). As we go forward, we are adding more fields into this list, and will update the community as we release more functionality.

Like José Blanco Villalba likes this

Hey @Sam Harding 

I was using {{lookupissues.size}} outside of the iterator function and this doesn't work for me. Whats also strange is that  @José Blanco Villalba  solutions below is also not working now when it was before. Has the {{lookupissues.size}} value changed recently? 

You can avoid sending the message by adding an If Condition before the Send Message block. Choose "Advanced compare condition" within the "If block" and set the condition {{lookupIssues.size}} greater than 0.

Sam Harding Atlassian Team Jul 30, 2020

Hi @Tom Williams , it looks like there might be a typo in your smart value there, the 'i' in lookupIssues needs the be capitalised, whereas in your comments here it is not. Could you verify if that's also the case in your automation rule configuration? Thanks

Like Tom Williams likes this

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Jira Automation

Announcing the Jira automation template library!

Hi all,  After many months of work, I am delighted to announce the launch of the Jira Automation Template Library!  The Template Library is a new website dedicated to all things Jira au...

1,031 views 19 26
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you