Pass info from jira description to label field

HP December 27, 2020

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

Comment

Log in or Sign up to comment
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 28, 2020

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?

HP January 3, 2021

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? 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 4, 2021

No, there's no comment I can see.

Ravi Sagar _Sparxsys_
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.
January 3, 2021

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
HP January 3, 2021

Hi Ravi,

Thank you. I will have a try! thanks!

TAGS
AUG Leaders

Atlassian Community Events