This function converts the decimal representation of a number (or timestamp) into plain text


This is one of the most commonly used functions in JWT.

Whenever any type of list is returned by a field code or parser function (e.g. subtasks()) and you are using the advanced text parsing mode, the toString() function converts the output to a readable format.

This is especially helpful if you want to test your expression.

Syntax
 toString(number) #Output: Text
Parser expressionDescription
toString(3.141592)

This example returns the text:

"3.141592"

Parameters used in this function

ParameterInput (data type)Description
number

NUMBER

Any given number or numerical field code.

This function returns a TEXT


Variant where you can additionally define the number of decimal places.

Syntax
 toString(number, decimalPlaces) #Output: Text
Parser expressionDescription
toString(3.141592, 2)

This example returns the text:

"3.14"

Parameters used in this function

ParameterInput (data type)Description
number

NUMBER

Any given number.
decimalPlaces

NUMBER

Any positive number.

This function returns a TEXT


Number list

This function converts any number list into plain text.

A comma-separated text with the decimal representation of each numeric value will be returned.

Syntax
 toString(numberList) #Output: Text
Parser expressionDescription
toString([1, 2, 3, 4.0])

This example returns the text:

"1, 2, 3, 4"

Parameters used in this function

ParameterInput (data type)Description
numberList

NUMBER LIST

Any given number list.

This function returns a TEXT


Variant where you can additionally define the number of decimal places.

Syntax
 toString(numberList, decimalPlaces) #Output: Text
Parser expressionDescription
toString([1.123, 2.452, 3.64612], 2)

This example returns the text:

"1.12, 2.45, 3.65"

Parameters used in this function

ParameterInput (data type)Description
numberList

NUMBER LIST

Any given number list.
decimalPlaces

NUMBER

Any positive number.

This function returns a TEXT


Variant where you can additionally define a specific separator.

Syntax
 toString(numberList, decimalPlaces, separator) #Output: Text
Parser expressionDescription
toString([1.123, 2.452, 3.64612], 2, " : ")

This example returns the text:

"1.12 : 2.45 : 3.65"

Parameters used in this function

ParameterInput (data type)Description
numberList

NUMBER LIST

Any given number list.
decimalPlaces

NUMBER

Any positive number.
separator

TEXT

Any separator character.

This function returns a TEXT


Text list

This function converts any text list into plain text.

A comma-separated text with each value will be returned.

Syntax
 toString(textList) #Output: Text
Parser expressionDescription
toString(["Hello", " ", "world", "!"])

This example returns the text:

"Hello, , world, !"

toString(fieldValue(%{issue.reporter}, subtasks()))

This example returns the user names of all sub-task reporters, e.g.:

"b.smith, a.grant"

To achieve this the following functions are used:

Parameters used in this function

ParameterInput (data type)Description
textList

TEXT LIST

Any given text list.

This function returns a TEXT


Variant where you can additionally define a specific separator.

Syntax
toString(textList, separator) #Output: Text
Parser expressionDescription
toString(["blue", "red", "green"], "; ")

This example returns the text:

"blue; red; green"

Parameters used in this function

ParameterInput (data type)Description
textList

TEXT LIST

Any given text list.
separator

TEXT

Any separator character.

This function returns a TEXT


Issue list

Converts an issue list into a comma-separated text containing issue keys.

Syntax
toString(issueList) #Output: Text
Parser expressionDescription
toString(subtasks())

This example might return:

 "CRM-5, CRM-6 "

To achieve this the following functions are used:

Parameters used in this function

ParameterInput (data type)Description
issueList

ISSUE LIST

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).

This function returns a TEXT


Variant where you can additionally define a specific separator.

Syntax
toString(issueList, separator) #Output: Text
Parser expressionDescription
 toString(subtasks(), " ")

This example might return: 

"CRM-5 CRM-6 CRM-7"

 toString(subtasks(), ";")

This example might return: 

"CRM-5;CRM-6;CRM-7"

Parameters used in this function

ParameterInput (data type)Description
issueList

ISSUE LIST

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).
separator

TEXT

Any separator character.

This function returns a TEXT


Use cases and examples