This template displays the creation date of the epic set in the Parent field of the current work item.
If there is nothing to display, the result will be βNoneβ.
Configuration
To use the Creation date of parent epic template, simply select it from the template grid. Filter by Epic to find it faster.
Parameters
This template does not require any additional parameter configuration.
Expert mode
If you switch to Expert mode you can see the formula field in the Expression Parser. You can now tweak the expression to create a custom formula field based on this template.
Expression
Jira expression:
issue?.epic ? issue?.epic.created.toCalendarDate().toString() : ""
Details
1. What does the expression do?
This expression retrieves the creation date of the epic that is set as the parent of the current work item. If the current work item does not have a parent epic, it returns an empty string.
2. Step-by-step breakdown
Letβs break it down:
-
issue?.epic: This checks if the current work item has a parent epic. -
? ... : ...: This is a conditional (ternary) operator. It works like "if ... then ... else ...".-
If
issue?.epicexists (the work item has a parent epic), then:-
issue?.epic.created: Gets the creation date of the parent epic. -
.toCalendarDate(): Converts the creation date to a calendar date format (removing the time part). -
.toString(): Converts the date to a readable text format.
-
-
If
issue?.epicdoes not exist (no parent epic), then:-
"": Returns an empty string.
-
-
3. Examples
-
If a work item has a parent epic created on January 10, 2024, the expression will display:
10/Jan/24. -
If a work item does not have a parent epic, the expression will be displayed as βNoneβ.
4. Real-life use cases
-
Reporting: You want to show when the parent epic of each work item was created, for tracking or reporting purposes.
-
Custom fields: You need a custom field in Jira that automatically displays the creation date of the parent epic for each work item.
-
Filtering: You want to filter or sort work items based on the creation date of their parent epic.