Hi everyone
I have a string (Jira Summary) that might look like this
<Some text> - <some more text> - <ID>
OR
<Some text> - <ID>
I basically want to get the value of the ID after the last '-'.
If I use split() function, how can I reference the last occurrence/item in the returned list?
Thanks in advance
Lisa
Community moderators have prevented the ability to post new answers.
Have you tried using the substringAfterLast() function?
Kind regards,
Bill
Thank you, I managed to get this working using {{issue.summary.split("-").Last().trim()}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As you solved this one yourself, I recommend adding another answer to the question and then accepting it. That will help others with a similar need find solutions faster.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.