Calculated Date-Time Field
This type of read-only custom field has 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 current issue, or in any other issues: linked issues, sub-tasks, epics, stories, JQL selected issues, etc.
For stability reasons, self-referencing of the field to be configured is not allowed in basic mode. In all other modes, we do not recommend using the field code, except in special cases
Configuration
Edit Math/Time Expression
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
In this example we show how to create a calculated number field called "Date-Time Creation of Epic" that will return the date-time of creation of the Epic issue. When current issue doesn't have an Epic issue, then the null
is returned, and no value is shown.
1) Create a new Calculated Date-Time Field custom field called "Date-Time Creation of Epic" at Administration > Issues > Custom fields > Add Custom Field > Advanced > Calculated Date-Time Field (by JWT)
2) Go to configuration screen of the newly created custom field:
3) Click on 'Edit Math/Time Expression':
4) Configure the field by entering a math/time expression:
5) Once configured, the configuration of the new custom field looks like this:
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.