Versions Compared

Key

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


Page properties
hiddentrue
Status
Tech review

Status
titletodo

Style guide

Status
titletodo

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged

Page properties
hiddentrue
Short descriptionReturns a text listOutput Statussubtletruetitletext list UI Text Box
sizemedium
typeinfo

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

A common use case is returns text list representing each of the values selected in the fieldselected 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(multi-valued field fieldtext) #Output: Text list


UI Expand
titleExamples


components
Parser expressionDescription


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


This example returns a text list of strings 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
Fieldtext

Status
subtletrue
titledata typetext

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

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

Field code for a multi-value field in format %{...somefield}. Multi-valued fields are Multi-Select, Checkboxes, Components, Versions, Multi User Picker, Multi Group Picker, Issue Pickers, Attachments and Labels

.



UI Expand
titleOutput

The function returns a

Status
subtletrue
titletext list



UI Text Box
sizemedium
typeinfo

Variant where you can additionally define custom separators.

This function returns a text list with tokens in parameter s separated by characters in parameter separators.

Leading and trailing spaces around each

token

list element are automatically removed.


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


UI Expand
titleExamplesExample


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
stext

Status
subtletrue
titletext

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

Status
subtletrue
titletext

Parameter description

Any separator characters.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext list


Image AddedUse 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
The function returns a

Status
subtletrue
titletext list