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
Community Members
Community Events
Community Groups

Multi-line text field parsing

I will preface this with saying I am not a savant when it comes to script languages. I can fumble through on a good day.

With that being said, I think I am looking for some form of scriptrunner script to help me with my task.

I have a ticket with a multi-line text field that contains a list of information. This information can be formatted as just a big long string, can be separated by a new line/carriage return, comma separate, etc. Basically in whatever format will work best.

I am trying to take each item in that field and compare it to an Insight object. If it gets a match, I would like to select that Insight object in my Insight custom field on the same ticket. If there isn't a match, it just moves onto the next item in the list until it gets to the end.

This multi-line field with the list can vary in size depending on the ticket. Sometimes it will just have one item, sometimes it could have 10 items.

Example of the field: Item A, Item B, Item C, Item D

If Item A and Item D happen to exist as objects in a specify objectype in Insight, I would like to have those two items selected in my Custom Insight field in my ticket.

Anyone know of a way to make that possible?

Using an Insight Post Function, I am able to get the desired results if my multi-line field only contains one item. But it fails to work if there are more than one.

Thank you in advance to any and all suggestions!

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Service Management

Jira Service Management Documentation Opportunities

Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...

201 views 0 5
Join discussion

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