Skip to main content
Skip table of contents

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:

CODE
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

Format

Default

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.