Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page properties
hiddentrue
Tech review

Status
titletodo

Style guide

Status
titletodo

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged

UI Text Box
sizemedium
typeinfo

This type of read-only custom field has contains a value which is dynamically calculated from a custom math/time expression.

It can be used to obtain a date-time value depending on the value of other fields in the current issue or in any other issues (linked issues, sub-tasks, epics, stories, JQL selected issues, etc).

Configuration

Edit Math/Time Expression

Info
iconfalse

This parameter contains a valid math/time expression that will be calculated each time the value of the field is required.

The math/time expression is expected to return a numeric value that represents a moment in time as the milliseconds elapsed since January 1, 1970, 00:00:00 GMT.

Example: Date-Time of creation of an epic

Info
iconfalse
In this step by step example we will create a calculated number field called "Date-Time creation of Epic" that will return the date-time of creation of the Epic issue. When the current issue does not have an Epic issue, a null is returned and no value is shown

Image AddedConfiguration

Configuring a calculated date-time field is straightforward. You have to configure a valid parser expression, which will "calculate" the output, and optionally a custom display format.

UI Steps


UI Step

Create a new Calculated Date-Time Field custom field called "Date-Time Creation of Epic"

Head over to Administration → Issues

Image Removed

→ Custom fields → Add custom Field → Advanced → Calculated Date-Time Field (by JWT)

Image Removed

UI Step

On the configuration screen of the newly created custom field go to Actions and click on Configure

Image Removed

custom field and name it properly.

UI Text Box
typetip

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



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

Image Removed
UI Step

Click on Edit Math/Time Expression

Image Removed

Math/time expression

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

Usually field codes will be used for this purpose.

Code Block
languagebash
titleExpression
linenumberstrue
%{issue.updated} #This example simply returns the timestamp (date-time) of when an issue was last updated. 
UI Step

Configure the field by entering a math/time expression. Learn more about JWT expression parser. After the configuration, click on Save

Image Removed


UI Text Box
typeinfo

The math expression used in this example is: first(fieldValue({00009}, linkedIssues("has Epic"))) , where {00009} is code for numeric value of Date and time of creation field.

UI Step
tip

The result of the calculation must be a valid timestamp. Read more about working with Dates, times and time zones.



UI Step

Display format

Optionally choose a custom display format. This is extremely useful to enhance usability for end users.

Read more about the available Display formats.




Image AddedUse cases and examples

Page properties report
headingsField type, JWT feature, Label
sortByTitle
cqllabel = "calculated-field" and space = currentSpace() and ancestor = currentContent()


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Page status

Status
colourGreen
titlecomplete

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged