One of the most important features of Automation Toolbox for Jira is the easy accessibility to Jira data stored in system fields, custom fields and a significant number of other, virtual fields that are made available by the Automation Toolbox for Jira implementation. You can access, validate, do mathematical calculations and manipulate the values found in these fields through the use of field codes. These codes are unique identifiers (keys) to all available fields. Automation Toolbox for Jira uses field codes in triggers, conditions, selectors, and actions: Field codes are not only used as unique field identifiers, but they are also an important safety feature for the Jira instance. Custom fields, for instance, can be renamed and the names do not have to be unique, but using Automation Toolbox for Jira field codes make the fields you use in your rules immune to renaming. You can choose the appropriate field codes by using the drop-down lists that Automation Toolbox for Jira makes available wherever expressions can be used. Depending on the context in which they are being used, field codes will contain a prefix following this notation: {origin.field/data}. Available contexts (or origins) in Automation Toolbox for Jira are: Trigger Selector The issue currently being processed by the selector. (e.g. an issue returned by a JQL query). Selectors usually hold multiple issues. They will processed iteratively one by one. System All selected custom fields will be notated like this %{trigger.issue.cfnnnnn} where nnnnn contains the Jira custom field id. The purpose of using the cfnnnnn notation is quite simple - custom fields can be renamed . Field codes must always be enclosed by curly brackets (or braces) but if they are used for text-strings, the brackets must be preceded by a percent sign %. NUMBER or Date-Time fields can be referenced as numbers using the following notation: {somenumberfield}. ( no preceding % sign) STRING Any field type or data type is susceptible of being transformed to text, so any field can be referenced as a text-string value using the following notation: %{somefield}. Cascading Select or Multi-Cascading Select fields, where i is the index that represents the level to be accessed. (i = 0 is used for base level) are notated as%{somefield.i} . A full list of available data types can be found here. Wherever field codes are used in the documentation they will be notated with three periods (...) instead of prefixes. The example below shows and expression usage in a Boolean Condition. Click on Select field and then The chosen field code will then be inserted into your parser expression where you can then enhance the expression with more In the above examples, we've chosen to add a Boolean Condition validating that the Project key of the issue being processed is not (!=) TEST. After you save the function, the real field names will be displayed in the rule element. In contrast to systemor ATJ special virtual fields (which cannot be renamed), custom fields will be inserted into an expression with In this example, we've chosen the custom field "Sale Amount" to evaluate. In the expression, it is notated as cf10900. 10900 is Once the element is saved, it appears with its real name. If at some point the field should be renamed i.e. Sale Amount Net, the expression will stay the same, but the element will now For more detailed information on field availability and parser usage, please see the section on Virtual fields.Overview
Field code notation
Context Description The issue, user, version, component or project event that triggers the execution of the rule. Some data does not have an issue context (e.g. the currently logged in user or the system date and time)
The prefix, denoting the origin (where the data should be read from / written to), is a referential part of the field code and will be inserted into the expression whenever you select a field from a dropdown list (as shown below).
Here are some examples:
Field codes for Jira standard or system fields will display the attribute in a legible form like %{trigger.issue.summary}.
Once an expression has been saved, the real name will be displayed in the configuration element.Field codes: STRING vs. NUMBER
Field codes in the documentation
Example of using field codes
1 - start typing the name of the field you wish to insert
2 - click on one of the fields provided in the drop-down list
fields or any other methods the expression parser allows.
The expression syntax will be evaluated as you create the expression. If the syntax is correct, a green check circle will appear.
a different notation as seen below:
the unique field id in the Jira configuration.
display the new name and the rule does not need to be updated.
🚀 Effective since April 2020 and JWT version 2.9.0 Automation Toolbox for Jira is fully integrated into our top rated app Jira Workflow Toolbox (JWT). 🚀