Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

This function converts a comma-separated text into a text list.

A common use case is a text list representing each of the selected elements of a selectable field like an issue picker.


UI Text Box
typetip

If you need the actual text instead of a list, wrap your expression in a toString() function.


Code Block
languagebash
titleSyntax
linenumberstrue
toStringList(text) #Output: Text list


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
%{toStringList(%{issue.components})}


This example returns a text list with each of the components selected in the current issue, e.g.:

ui,portal


Code Block
languagebash
linenumberstrue
%{toString(toStringList(%{issue.labels}))}


This example returns a text with each of the labels selected in the current issue, e.g.:

web, customer, mobile

To achieve this, the following functions are used:



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
text

Status
subtletrue
titletext

Any comma-separated text satisfying the format: "Element1, Element2".

This function is often used in combination with selectable fields like an issue picker.



UI Expand
titleOutput

The function returns a

Status
subtletrue
titletext list



UI Text Box
sizemedium
typeinfo

Variant where you can additionally define custom separators.

Leading and trailing spaces around each list element are automatically removed.


Code Block
languagebash
titleSyntax
linenumberstrue
 toStringList(text, separators) #Output: Text list


UI Expand
titleExample


Parser expressionDescription


Code Block
languagebash
linenumberstrue
%{toStringList("red, orange, yellow? green; blue; purple", ",?;")}


This example returns the following text list:

["red", "orange", "yellow", "green", "blue", "purple"]



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
text

Status
subtletrue
titletext

Any text with elements separated by one of the separators defined in the second argument.
separators

Status
subtletrue
titletext

Any separator characters.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext list


Use cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
cqllabel = "parser_func_tostringlist" and space = currentSpace()


Page properties
hiddentrue


Short descriptionConverts text to a text list.
Output

Status
subtletrue
titletext list