Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Is it possible to create an automation rule with conditions based on issues found in LookupIssues?

Hi, I'm trying to figure out if the following is possible:

I want to schedule a daily Slack message that will include a digest of issues that changed status today.  If any of these messages have specific labels, I want to tag specific Slack users.

I.e., 10 issues progressed to done, 1 had the label "Purchases" (relevant for Bob), 2 had the label "Marketing" (relevant for Alice), none had the label "Books" (relevant for Sylvia).  Therefore, I want to post the list of the issues to Slack (this works), followed or preceded by messages that will tag Bob and Alice, but not Sylvia, all of this executed in one rule.   Is this possible?

Thanks in advance for any help!

1 answer

1 accepted

0 votes
Answer accepted
John Funk Community Leader Mar 19, 2021

Hi Anastasiya - Welcome to the Atlassian Community!

I have not tried this but it might be possible to do the Slack post with multiple issues using the lookupIssues function. and then add a Branch after that based on JQL that would then send separate messages. 

Again, I haven't done that, but that's the path I would go down to try it. 

Hi John,

Thank you for your answer!  I guess what I'm having difficulty with is, the branch conditions seem to refer more to trigger issues, which wouldn't be the case for a scheduled rule with lookupIssues.  So trying to figure out how I would do that and whether it's possible.

Spent too much time today trying to base additional issues on labels, eventually had to just make a new JQL request for each label, because there seems to be no way to parse the labels from lookupIssues using smart values functions.

John Funk Community Leader Mar 22, 2021

Why don't you just use the same JQL in the Branch that you use in the Scheduled trigger? 

I can't find a way to evaluate the labels of the issues, they don't seem to be accessible.  I need to compare list A (the labels of the issues retrieved by JQL) with list B (my list of labels that are relevant to particular users), and I can't access this list A in any way.

John Funk Community Leader Mar 22, 2021

Is this labels field a custom field that you created in a Next-gen project? How many different labels fields are you using? 

Nope, standard Jira issue labels in classic projects. 

John Funk Community Leader Mar 22, 2021

The labels field is a universally available field with the same values showing for every project. So I am confused now as to the question as there are not separate values in the labels field that are associated with certain users. 

Can you provide more details? 

The association is not in Jira, it must be made with the help of automation.  (IF any labels in the issues retrieved with lookupIssue have label "Marketing", ping Alice on Slack when outputting the list of issues).  However, I have not been successful in accessing the labels field of issues in lookupIssue.

John Funk Community Leader Mar 23, 2021

Sorry, I understand better now. No, the labels field is not available using the lookupIssue function. See the document for the list of available fields under the section on lookupIssue:

Thank you :) most importantly, I figured out how to get what I want, even if it's more or less brute force.

Like John Funk likes this
John Funk Community Leader Oct 26, 2021

Hi @Anastasiya Lebedev  - If this took care of your question - can you click the Accept Answer button to close this one out? Thanks!

Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Jira Software

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

647 views 21 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