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!
Community moderators have prevented the ability to post new answers.