Versions Compared

Key

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


UI Text Box
sizemedium
typeinfo

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


UI Text Box
typetip

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.


Code Block
languagebash
titleSyntax
linenumberstrue
 toString(number) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
toString(3.141592)


This example returns the text:

"3.141592"



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
number

Status
subtletrue
titlenumber

Any given number or numerical field code.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext




UI Text Box
sizemedium
typeinfo

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


Code Block
languagebash
titleSyntax
linenumberstrue
 toString(number, decimalPlaces) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
toString(3.141592, 2)


This example returns the text:

"3.14"



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
number

Status
subtletrue
titlenumber

Any given number.
decimalPlaces

Status
subtletrue
titlenumber

Any positive number.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext



Number list

UI Text Box
sizemedium
typeinfo

This function converts any number list into plain text.

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


Code Block
languagebash
titleSyntax
linenumberstrue
 toString(numberList) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
toString([1, 2, 3, 4.0])


This example returns the text:

"1, 2, 3, 4"



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
numberList

Status
subtletrue
titlenumber list

Any given number list.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext




UI Text Box
sizemedium
typeinfo

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


Code Block
languagebash
titleSyntax
linenumberstrue
 toString(numberList, decimalPlaces) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
toString([1.123, 2.452, 3.64612], 2)


This example returns the text:

"1.12, 2.45, 3.65"



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
numberList

Status
subtletrue
title number list

Any given number list.
decimalPlaces

Status
subtletrue
titlenumber

Any positive number.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext




UI Text Box
sizemedium
typeinfo

Variant where you can additionally define a specific separator.


Code Block
languagebash
titleSyntax
linenumberstrue
 toString(numberList, decimalPlaces, separator) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
toString([1.123, 2.452, 3.64612], 2, " : ")


This example returns the text:

"1.12 : 2.45 : 3.65"



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
numberList

Status
subtletrue
titlenumber list

Any given number list.
decimalPlaces

Status
subtletrue
titlenumber

Any positive number.
separator

Status
subtletrue
titletext

Any separator character.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext



Text list

UI Text Box
sizemedium
typeinfo

This function converts any text list into plain text.

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


Code Block
languagebash
titleSyntax
linenumberstrue
 toString(textList) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
toString(["Hello", " ", "world", "!"])


This example returns the text:

"Hello, , world, !"


Code Block
languagebash
linenumberstrue
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:



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
textList

Status
subtletrue
titletext list

Any given text list.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext




UI Text Box
sizemedium
typeinfo

Variant where you can additionally define a specific separator.


Code Block
languagebash
titleSyntax
linenumberstrue
toString(textList, separator) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
toString(["blue", "red", "green"], "; ")


This example returns the text:

"blue; red; green"



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
textList

Status
subtletrue
titletext list

Any given text list.
separator

Status
subtletrue
titletext

Any separator character.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext



Issue list

UI Text Box
sizemedium
typeinfo

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


Code Block
languagebash
titleSyntax
linenumberstrue
toString(issueList) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
toString(subtasks())


This example might return:

 "CRM-5, CRM-6 "

To achieve this the following functions are used:



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
issueList

Status
subtletrue
titleissue list

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



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext




UI Text Box
sizemedium
typeinfo

Variant where you can additionally define a specific separator.


Code Block
languagebash
titleSyntax
linenumberstrue
toString(issueList, separator) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
 toString(subtasks(), " ")


This example might return: 

"CRM-5 CRM-6 CRM-7"


Code Block
languagebash
linenumberstrue
 toString(subtasks(), ";")


This example might return: 

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



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
issueList

Status
subtletrue
titleissue list

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

Status
subtletrue
titletext

Any separator character.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext



Use cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_tostring" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloud
Map(question)
Notes

Workaround

Code Block
languagebash
%{union(linkedIssues("is blocked by", linkedIssues("is blocked by")), linkedIssues("is blocked by"))}

Using our General parser we can access the current issue's linked issues and theirs linked issues.




Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

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



Page properties
hiddentrue


Short description

Converts numbers and lists into plain text.

Output

Status
subtletrue
titletext

Available since
Label

Status
colourRed
titlestaff pick