Context Variables
The execution or evaluation context of a unified expression contains the following objects:
Object
Type
Comment
user
UserDto
The current user who executes or evaluates the expression.
project
ProjectDto
The current project that the expression is evaluated in.
tracker
TrackerDto
The current tracker that the expression is evaluated in.
this
TrackerItemDto
The current tracker item that the expression is evaluated on.
orig
TrackerItemDto
You can refer to old or original values of a tracker item during a state transition or update using orig.
If the expression is not evaluated in the context of a tracker item state transition or update, orig is the same as this.
For example, (dflt(this.storyPoints, 0) - dflt(orig.storyPoints, 0) calculates the difference between the new and the old story points.
You can use the dot (.) operator to access attributes of context objects, for example, user.realName or project.name.
To access attributes (fields) of the current tracker item (this), you can omit this. before the attribute or field identifier. For example, submitter is equivalent to this.submitter.
To refer to the value of tracker item fields, the following field identifiers are allowed:
The field property or attribute name, such as id, name, description, submitter, submittedAt, namedPriority, status, assignedTo, subjects, categories, versions, customField[0], choiceList[2].
The label of the field , but only in the following cases:
If the label only consists of alphanumeric characters ([A-Z],[a-z],[0-9]), ‘˜$’˜(dollar sign) and ‘˜_’˜ (underscore).
The label does not start with digits ([0-9]).
The label does not contain HTML markup.
For example, Color is allowed, but Background color, Best.-Nr., Estimated<br/>Effort or <b>v</b><sub>max</sub> (vmax) are not allowed.
The RESTful field name (lower camel case of field label, with all HTML markup and disallowed characters removed). For example, color, backgroundColor, bestNr, estimatedEffort, and vmax.
The property and label of the field are displayed in their respective columns in the Fields tab.
For static choice fields, you can also refer to the following options:
The list of defined choice field options: choiceField_$options. For example, status_$options or choiceList[1]_$options
A specific choice field option, per option ID or lowercase option name: choiceField_$option[idOrName]. For example, status_$option["new"], namedPriority_$option["high"] or choiceList[1]_$option[2]. Instead of choice option names, option IDs can be used. Option IDs are safer but using option names can be more convenient or easier to understand.
To access individual values of multi-value choice fields, use the [] operator, for example, categories[0], choiceList[2][0].
* 
choiceList[1]_$option[2] refers to the option with id==2 of the choice field choiceList[1], not the third option.
To access attributes of complex field values, such as choice values, use the . operator followed by the attribute. For example, Priority.id, Status.name, Resolution[0].name
All references, choice and members field values have at least the following attributes:
id Integer
name Text
To extract attributes from a multi-value field, use a projection. For example, to create a list of the names of all users or roles assigned to the item, you can use the following syntax:
assignedTo.{member|member.name}
You can use such a projection in combination with the valuesInList function to check if the item is assigned to some particular users.
Example:
fn:valuesInList(assignedTo.{member|member.name}, "œbond", "Project Admin") ?
Was this helpful?