Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,841
Community Members
 
Community Events
165
Community Groups

Pass info from jira description to label field

Hi Community,

I have below use case, could anyone advise how can I do?

I wanted to retrieve information (System Field) in the Jira Description field.

In jira ticket Description, it store information, System Field is part of the ticket Description. I would like to pass this System Field information to the Label field in the ticket.

I know script runner - groovy can do it. But I m not too sure, Can anyone advise? Thanks!

2 comments

Description is simple text, it does not have fields in it.

Do you mean you want to search the description for some arbitrary text and extract it and add a label depending on what you find?

Not sure why, I already posted two time (answer your question), but it didn't appear. Not sure if you can see my comment to your question? 

No, there's no comment I can see.

Hi @HP 

You can look for a specific keywords in your description and if found set the labels.

Groovy has very good methods like contains() to work with strings.

issue.getDescription.contains("keyword")

This will return true if the keyword is found, based on that you can do further things like update fields. You can find the script to update labels here. Code can further be modified to check for multiple occurrences of the keywords or variety of keywords.

I hope it helps.

Ravi

Like # people like this

Hi Ravi,

Thank you. I will have a try! thanks!

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

324 views 2 7
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