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

smart value match string vs. list

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)?

0 answers

Suggest an answer

Log in or Sign up to answer