Skip to end of metadata
Go to start of metadata
On this page


Calculated Text Field

This type of read-only custom field has a value which is dynamically calculated from a custom text expression. It can be used to show a text composed from one or more field values.

You can also create any custom text value depending on the values of other fields in current issue, linked issues, sub-tasks, epics, stories, or any other issue in your Jira instance selected by a JQL query.



Configuration

Parsing Modes

There 2 parsing modes available:

  • Basic: with this simple parsing mode you can write free text and insert field codes with format %{nnnnn} or %{nnnnn.i} anywhere in your text. These field codes will be replaced at run-time with the corresponding field values in current issue.
  • Advanced: with this parsing mode we can do much more complex text composition thanks to the usage of functions for replacing substrings, changing case, reading fields in linked issues, sub-tasks, JQL selected issues, and much more. It requires the text to be parsed to be written as string expression respecting strictly the parser syntax.

    Automatic parsing mode converter: You can write your text in basic mode, and then switch to advanced mode. The text to be parsed will be automatically rewritten as a string expression. Now, you can simply make the modifications you require, making use of text formatting functions, or inserting math or time expressions where needed.

Text to Be Parsed

This parameter contains the text expression that will be parsed in the selected parsing mode.

Example: Calculated Text Field "Components of Sub-tasks"

In this example we show how to create a calculated text field called "Components of Subtasks" that will contain a comma separated list with the components of current issue's sub-tasks.

1) Create a new Calculated Text Field custom field called "Components of Sub-tasks" at Administration > Issues > Custom fields > Add Custom Field > Advanced > Calculated Text Field (by JWT)

2) Go to configuration screen of the newly created custom field:



3) Click on 'Edit Text Expression':



4) Configure the field by selecting a parsing mode, and by entering a text to be parsed:



5) Once configured, the configuration of the new custom field looks like this:



The text expression used in this example is: toString(distinct(fieldValue(%{00094}, subtasks()))), where %{00094} is field code for Components.