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

Compare with Current View Page History

« Previous Version 9 Current »

Use case

Return the lowest date from a Date Time Picker custom field in the linked issues of the current issue.

Expression

Create and configure a Smart field using this expression in Jira expression mode:

let minDate = issue?.links?.map(i=> i?.inwardIssue?.key != issue?.key ? i?.inwardIssue?.customfield_nnnnn : i?.outwardIssue?.customfield_nnnnn).filter( d => d != null);
minDate.length > 0 ? new Date(minDate.reduce((a, b) => a < b ? a : b )).toString() : ""

Please, replace nnnnn with the ID of a Date Time Picker custom field.