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

Anastasiya Lebedev March 19, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 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. 

Anastasiya Lebedev March 21, 2021

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.

Anastasiya Lebedev March 22, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2021

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

Anastasiya Lebedev March 22, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 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? 

Anastasiya Lebedev March 22, 2021

Nope, standard Jira issue labels in classic projects. 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 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? 

Anastasiya Lebedev March 22, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 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:

https://support.atlassian.com/jira-software-cloud/docs/automation-actions/

Anastasiya Lebedev March 23, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 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
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events