You can temporarily store values through functions. Stored values can easily be retrieved or referenced later in the same expression.
Functions used to retrieve (get) values previously stored (set) can directly be used in the same expression.
The values can only be used for the current expression and cannot be reused in another expression.
Example:
You want to emphasize the importance of blocking issues by returning AND coloring the number of linked blocking issues.
If more than 3 issues are linked as blocking issues the exact number will be returned in red otherwise in green.
To achieve this the conditional operator will be used.
Before using a variable | After using a variable |
---|---|
count(linkedIssues("is blocked by")) > 3 ? "<font color=\"red\">" + count(linkedIssues("is blocked by")) + "</font>" : "<font color=\"green\">" + count(linkedIssues("is blocked by")) + "</font>" | setNumber("x", count(linkedIssues("is blocked by")) > 3 ? "<font color=\"red\">" + getNumber("x") + "</font>" : "<font color=\"green\">" + getNumber("x") + "</font>" |
All these functions are extremely helpful if you have rather large or complex expressions.
Available functions
Function | Short description | Output | Label |
---|---|---|---|
getBoolean() | Returns a value stored in a boolean variable. | BOOLEAN | |
getIssueList() | Returns values stored in an issue list variable. | ISSUE LIST | |
getNumber() | Returns a value stored in a number variable. | NUMBER | |
getNumberList() | Returns values stored in a number list variable. | NUMBER LIST | |
getString() | Returns the value stored in an text variable. | TEXT | |
getStringList() | Returns values stored in a text list variable. | TEXT LIST | |
setBoolean() | Creates a variable to temporarily store a boolean value | BOOLEAN | |
setIssueList() | Creates a variable to temporarily store an issue list. | ISSUE LIST | |
setNumber() | Creates a variable to temporarily store a number | NUMBER | STAFF PICK |
setNumberList() | Creates a variable to temporarily store a number list. | NUMBER LIST | |
setString() | Creates a variable to temporarily store a text. | TEXT | |
setStringList() | Creates a variable to temporarily store a text list. | TEXT LIST | STAFF PICK |
If you still have questions, feel free to refer to our support team.