The Time in Status Custom Field lets you track the amount of time spent in selected status(es). It can be configured to work against a specific working calendar.
The custom field simply displays the total time passed during the selected status(es) as below.
When clicked it displays all details, below is a snapshot to demonstrate this.
Creating the Time in Status Custom Field
To define the Time in Status Custom Field:
- Navigate to Jira Admin > Manage Apps > Enhancer Plugin For Jira Menu > Custom Fields (JEP).
- Click on the button.
- Click on the Duration tab on the left-hand side of the dialogue.
- Select Time in Status, then click Add custom field.
- Fill in the dialog box:
- Create a Name for your custom field.
- Select the status(es) that you want to calculate the amount of time spent in.
- A Calendar can also be selected. Working calendars can be defined in Jira Admin > Add-ons > Enhancer Plugin Menu > Working Calendars menu item.
The Occurrence can be set to display only the "First" or "Last" occurrence, or an aggregated result with a "Cumulative" option.
- Time formatter display options (both for the issue main view, navigator view, and board view) can be configured easily as below.
- The Use Separator allows you to define your own separator for the time formatter display. You can also choose to not have a separator.
- Create a Name for your custom field.
- And click the Save Custom Field button. That's it.
Don't forget to link the custom field with appropriate screens in order to see them.
You can always configure or delete the custom field by simply clicking on the cog icon on the right-hand side.
Searching with the Time in Status Custom Field
The Time in Status Custom Field comes with a powerful searcher. You can use this custom field in your JQL statements in order to filter issues by status, then assigned users.
timeSpentBy(), timeSpentInStatus() and timeSpentInStatusBy() JQL functions can be used as right-hand functions with the custom field.
Below are some examples:
Searching against total duration including every user within the selected status(es).
"Time in Review" >= 4d
Searching against a single user.
"Time in Open" <= timeSpentBy("5d", "agrant")
Searching against multiple users. Below function searches time spent by users (agrant, jevans and hjennings) in 'Waiting for support status' more than 5 calendar days.
"Time in Waiting for support" >= timeSpentBy("5d", "agrant", "jevans", "hjennings")
Searching by the IDs of status(es). When the custom field is defined with multiple statuses, but you want to filter by some of them with the status IDs.
"Time in Open" > timeSpentInStatus("2d", "1")
(Where 1 is ID of status Open).
Searching by the names of the status(es). When the custom field is defined with multiple statuses, but you want to filter by some of them with the status names.
"Time in In progress" >= timeSpentInStatus("6h", "In Progress") "Time in In progress" >= timeSpentInStatus("6h", "Open", "In Progress", "In Review")
Searching by status ID and the users.
"Time in In progress" > timeSpentInStatusBy("8h", "3", "agrant")
(Where 3 is ID of status Open and agrant is the username).Searching by status name and the users.
"Backlog time" > timeSpentInStatusBy("10h", "Open", "hjennings")