Breadcrumbs

Days in previous status

๐Ÿ“š

This template displays the number of days that the current work item spent in the previous status.

If there is no previous status because the work item has never been transitioned to a new one, โ€œNoneโ€ will be displayed.

Configuration

To use the Days in previous status template, simply select it from the template grid. Filter by Status 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 Smart field in the Expression Parser. You can now tweak the expression to create a custom smart field based on this template.

Expression

Jira expression:

let statusChangelogs = issue.changelogs.filter(changelog => changelog.items.some(item => item.fieldId == 'status'));
statusChangelogs[0] ? (statusChangelogs[0].created.getTime() - (statusChangelogs[1] ? statusChangelogs[1].created : issue.created).getTime()) / (24*60*60*1000) : null

Display as

Number

Formatting style

Default (unformatted)