You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

On this page

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 returned by field codes. 

You can also create any custom text value depending on the values of other fields in the current issue or in any other issues (linked issues, sub-tasks, epics, stories, JQL selected issues, etc).

Learn more about working with Texts.

Configuration

Configuring a calculated text field is straightforward. You just have to configure a valid parsing mode and add a parser expression, which will "calculate" the output.

Create a new Calculated Number Field (by JWT) custom field and name it properly

Providing a description will help you to identify what the custom field does but this step is optional

Parsing mode

Make sure to select the correct parsing mode for your expression. Learn more about Parsing modes.


Examples

Basic modeAdvanced mode
Expression
This issue was last updated on %{issue.lastStatusChange}.
Expression
"This issue was last updated on" + %{issue.lastStatusChange} + "."

The parsing mode will define the syntax of your expression. Using parser functions will only work in advanced mode.

Text expression

Add a valid parser expression which will "calculate" the output.

Usually field codes will be used for this purpose.

Expression
%{issue.lastComment} #This example simply returns the last comment of an issue. 

The result of the calculation must be a valid text.  The 

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

In this step by step 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 the current issue's sub-tasks.

Create a new Calculated Text Field (by JWT) custom field and name it properly.

Providing a description will help you to identify what the custom field does but this step is optional

Parser expression

Set the parsing mode to Advanced

Add the following expression:

Text to be parsed for calculated text field:
toString(distinct(fieldValue(%{00094}, subtasks())))

%{00094} is field code for Components.

To achieve this, the following functions are used:

Finally, the configuration of the new custom field should look like this:


If you still have questions, feel free to refer to our support team.