Use case

Return the difference in days between the current day and the earliest due date from the sub-tasks of the current issue.

Expression

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

%{max(fieldValue({issue.dueDate},subtasks())) != null ? ceil((min(filterByValue(fieldValue({issue.dueDate},subtasks()),!=, null )) - {system.currentDateTime}) / DAY) : null}

Used parser functions