Forums

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

How to access the "Labels" field in jira post functions (condition)

Lakshmi CH
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.
September 25, 2024

Hi Team,

I need to access the value of the "Labels" field in the workflow post function. My requirement is to create a ticket from one project to another when both the "Components" and "Labels" fields have some value. I've added the condition for components, but I'm unable to access it for labels. Can you please provide suggestions on "Labels"


 

Component : 'jira' in issue.components*.name

1 answer

0 votes
Shawn Doyle - ReleaseTEAM
Community Champion
September 25, 2024

Hi @Lakshmi CH 

Since you tagged 'scriptrunner' in this question I will assume you have it.

A similar question was answered about a year ago here:  

https://community.atlassian.com/t5/Jira-questions/Scriptrunner-condition-if-value-is-present-in-labels-field/qaq-p/2398520

Please review @Evgenii 's answer and if that solves your issue.

Lakshmi CH
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.
September 26, 2024

Hi @Shawn Doyle - ReleaseTEAM ,

Thank you for your prompt response. It seems that the current solution is not working for me. I need to add a condition where if the ticket label has a certain value, it should create a ticket in another project. Please refer to the screenshot for clarification.

labels.png

Shawn Doyle - ReleaseTEAM
Community Champion
September 26, 2024

Looks like you have some type checking errors to resolve.  

Suggest an answer

Log in or Sign up to answer