Forums

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

Parsing a text field

Dolly Kirubavathi
Contributor
October 28, 2021

I have a text field that has multiple values separated by commas. Is there a function in Jira to read that text field and output the values as multiple rows?

Eg:

Text1 = " ABC, DEF, GHI"

output desired:

ABC

DEF

GHI

 

Thank you!

 

1 answer

1 accepted

0 votes
Answer accepted
Avinash Bhagawati {Appfire}
Community Champion
November 1, 2021

Hi @Dolly Kirubavathi ,

Can you let us know what is the complete use case here? Please note that you will be able achieve the requirement to using groovy script.

def value = "ABC,LMN,XYZ"
return value.replaceAll(",","\n" )

Thanks,
Avinash

Dolly Kirubavathi
Contributor
November 1, 2021

Use Case:

Our Jira Project has a text field called ECU. This holds multiple values separated by commas per task. Can I do an advanced search to show the values of this string by removing commas and showing them as rows? So one task will be displayed multiple times depending on the number of values separated by commas? 

Not sure if this helps!

thank you!

Avinash Bhagawati {Appfire}
Community Champion
November 1, 2021

I guess you can try out "Labels" type custom field instead of text field. In this way, you will be able to search the values as per your requirement.

2021-11-01_18-33-18.pngThanks,
Avinash

Dolly Kirubavathi
Contributor
November 1, 2021

Maybe....but this field has been in use for sometime now, so its hard to make that change now....thank you for the answer!

Mayank Chandra
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 25, 2022

@Dolly Kirubavathi How did you achieve it? Could you please share ?

Dolly Kirubavathi
Contributor
May 25, 2022

There is no function available to parse the string for commas or any special characters.

I used a separate table to store the values and did a search using the Like statement with a wild card(%) before and after this new table's values so it would match to my original table's values and that's how I separated them.

Suggest an answer

Log in or Sign up to answer