Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to get JIRA Automation to return list of labels in lookupIssues and need help

joe bednarz May 13, 2025

I am trying to create some automations based upon labels found within the Lookup Issues action.

My Lookup JQL is simple:  summary ~ \"{{issue.summary.substring(1,6)}}\" and issuetype = Initiative

I can correctly return data such as {{lookupIssues.summary}} however, when I try to access {{lookupIssues.labels}} I get nothing. 

I'm just trying to query the Initiative associated with the current issue, and branch based upon certain labels.

 

Any thoughts or help?

 

2 answers

1 accepted

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.
May 13, 2025

Hi @joe bednarz 

For a question like this, context is important for the community to help.  Please post the following:

  • what version of Jira are you using: Cloud, Server, or Data Center
  • for Cloud, what type of project is this: company-managed, team-managed, JPD, etc.
  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution

Until we see those...

 

If you are using Jira Server or Data Center, the Lookup Issues action only returns a limited set of fields, and Labels is not in there: 

https://confluence.atlassian.com/automation/jira-smart-values-issues-993924860.html#Jirasmartvaluesissues-lookupissues-properties

 

Kind regards,
Bill

joe bednarz May 14, 2025

Thank you for your reply Bill!  Truly appreciate it!

I've actually managed to create a work-around... since I was trying to branch based upon a label being present, I simply added the "labels in (...)" to my JQL, and then checked for {{lookupIssues}} not being empty.

0 votes
Dilip
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2025

To list all labels for each issue found by your Lookup Issues action you can try using this smart value

{{#lookupIssues}}
Issue {{key}}: {{#labels}}{{.}}, {{/}}
{{/}}

Suggest an answer

Log in or Sign up to answer