I need to extract some information from description and put it in summary:
{{issue.description.match("foo (xxx-[0-9]*)"}}
This works ok, but sometimes there are just too many results and it breaks the char limit for summary. I tried this:
{{issue.description.match("foo (xxx-[0-9]*)".join(", ").abbreviate(100)}}
Also works correct if there are more than one result. My problem is handling of only one result. match() gives a string if there is only one result and therefore join() doesn't work anymore and outputs an empty string.
Is there any way to check if the result is a list and behave differently? Or is there any way to abbreviate the whole default string match() gives as result (element1, element2, element3)?