Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 2.6.0


Section


Column
width600px


Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel1



Column




Status
colourYellow
titlesince version 2.6.0

Since version 2.6.0 it is now possible to store values. Having this capability makes it possible to reference these values later on in the expression.


Example

Before value storageAfter value storage
toNumber(
count(
issuesFromJQL("issue in linkedIssues('" + %{Issue key} + "','blocks','is blocked by')")
)
) > 5 ?
"<font color=\"red\">" + toNumber(
count(
issuesFromJQL("issue in linkedIssues('" + %{Issue key} + "','blocks','is blocked by')")
)
) + "</font>"
: "<font color=\"green\">" + toNumber(
count(
issuesFromJQL("issue in linkedIssues('" + %{Issue key} + "','blocks','is blocked by')")
)
) + "</font>"

setNumber("x",

toNumber(

count(

issuesFromJQL("issue in linkedIssues('" + %{Issue key} + "','blocks','is blocked by')")

)

)

) > 5 ? "

<font color=\"red\">" + getNumber("x") + "</font>"

: "<font color=\"green\">" + getNumber("x") + "</font>"



Expressions

FunctionReturned value
setNumber(string variable_name, number value) : numberReturns value and stores it into an internal numerical variable called variable_name.
getNumber(string variable_name) : numberReturns the numeric value stored into internal variable called variable_name.
setString(string variable_name, string value) : stringReturns value and stores it into an internal string variable called variable_name.
getString(string variable_name) : stringReturns the string value stored into internal variable called variable_name.
setNumberList(string variable_name, number list value) : number listReturns value and stores it into an internal numerical list variable called variable_name.
getNumberList(string variable_name) : number listReturns number list value stored into an internal variable called variable_name.
setStringList(string variable_name, string list value) : string listReturns value and stores it into an internal string list variable called variable_name.
getStringList(string variable_name) : string listReturns string list value stored into an internal variable called variable_name.
setIssueList(string variable_name, issue list value) : issue listReturns value and stores it into an internal issue list variable called variable_name.
getIssueList(string variable_name) : issue listReturns issue list value stored into an internal variable called variable_name.
setBoolean(string variable_name, boolean value) : booleanReturns value and stores it into an internal variable variable called variable_name.
getBoolean(string variable_name) : booleanReturns boolean value stored into an internal variable called variable_name.



Info

Note that every setter method always returns the stored value so that it can be immediately used for saving and calling the value in the expression (as seen in the example above).

The values are only going to be saved for the current expression and cannot be reused in another expression.