Time in Status Custom Field


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.

    • The Grouping Field is the field by which the Time in Status's details are grouped. It is set to Assignee by default.
    • 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.

  • 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 by the value of the Grouping Field of your choice.

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 grouping field value within the selected status(es).

    "Time in Review" >= 4d


  • Searching against a single user.

    (In this example, the grouping field could be set to "Assignee") 

    "Time in Open" <= timeSpentBy("5d", "agrant")

  • Searching against multiple groups. Below function searches time spent by the groups (jira-developers,jira-users and jira-administrators) in 'Waiting for support status' for more than 5 calendar days.

    (In this example, the grouping field could be set to a group picker custom field)

    "Time in Waiting for support" >= timeSpentBy("5d", "jira-developers", "jira-users ", "jira-administrators")
  • 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 grouping field value.

    "Time in In progress" > timeSpentInStatusBy("8h", "3", "agrant") 


    (Where 3 is ID of status Open, the grouping field is "Assignee", and agrant is the username).

  • Searching by status name and the users.

    "Backlog time" > timeSpentInStatusBy("10h", "Open", "hjennings")

    (Where the grouping field is set to a single user picker and hjennings is the username).