Skip to main content

Jira Expressions - Date

A Jira Expressions - Date field stores the date that your Jira expression returns, such as the latest due date among the sub-tasks.

You can search and sort by it with dates and relative dates, such as endOfWeek().

For a date with a time of day, use Jira Expressions - Date & time instead.

FieldCraft runs the expression with the app's access. A Jira admin must acknowledge app access first.

What you see​

On the work item, you see the date in your own date format.

If the expression returns nothing, you see None.

Lists, search and exports use the stored date.

Settings​

SettingWhat it doesDefault
Jira Expression:The expression that FieldCraft runs for each work itemNone, so you write one

The expression must return a date, such as issue.dueDate.

A date and time keeps its day as Jira returns it. Anything else leaves the field empty.

Example: the latest sub-task due date​

You want each story to show when its last sub-task is due.

  1. Create the field from the Latest sub-task due date recipe, or open the configuration page of a Jira Expressions - Date field.

  2. In Jira Expression:, enter this expression, or copy the Latest sub-task due date snippet:

    let days = issue.subtasks.map(subtask => subtask.dueDate).filter(day => day != null);
    days.length == 0 ? null : days.reduce((latest, day) => day > latest ? day : latest, days[0])
  3. Select I understand, and the values may be shown to everyone who can see the work item, and select Save.

Result: A story with sub-tasks due on 3 and 7 March shows 7 March. A story without due dates on its sub-tasks shows None.

For the editor, snippets and checks, see Write a Jira expression.

Search with JQL​

JQL compares the stored date. To find open work that is due by the end of this week, use:

"Latest sub-task due date" <= endOfWeek() AND statusCategory != Done

When the value updates​

FieldCraft runs the expression again when the work item changes or when you open it. See Jira expressions.

Things to know​

  • Until a Jira admin acknowledges app access, the field keeps its last value.

  • The Parent's due date snippet doesn't follow changes on the parent. Parent Field - Date does.