Time between dates

Settings

This field calculates the time between two dates.

 

Start field and end field

You can specify a system field or a custom field as the date. The main thing is that the field returns values of the java.util. Date type. These can be fields:

  • Date Picker

  • Date Time Picke

  • Groovy Date Field

  • Groovy Date Time Field

  • Groove Template Field

  • Formula (date)

  • JBCF: Date of first comment

  • JBCF: Date of last comment

  • and others…

 

The field selection list now contains all custom fields. Filtering inappropriate fields will be improved in new versions.

Show format 

If you have selected the appropriate fields and they have values, the time between dates will be displayed in one of the selected formats. https://jibrok.atlassian.net/wiki/spaces/JBS/pages/513605754/Time+formats

Show ABS

  • Yes (Default) - the absolute value is calculated and displayed. It does not depend on the order in which the Start and End fields are specified.

    • Math.abs(Start Field - End Field) == Math.abs(And Field - Start Field)

  • No - calculates the time from the start date to the end date.

    • End field - Start field

If the end date is less than the start date, the time will be shown with a minus sign.

Selecting a work calendar for calculating time

If you have the “Time in status field/Timer/Stopwatch/SLA“(https://jibrok.atlassian.net/wiki/spaces/JBS/pages/513441810) plugin installed, then in the field settings, you will see the option to select the working calendar for which the time between dates will be calculated and settings for time formats (D13 +).

JQL functions

Several jql functions are available for the Time between dates field.
The first thing you need to enable indexing for a field. To do this, specify the Search Template: "Time searcher" field in the settings. It is enabled by default.
After changing the settings, you need to run reindex Jira.

JQL functions take the following parameters.

  • condition - one of the characters <, <=, => =,>. For example: ">".

  • time - time string corresponding to one of the patterns.

1 2 3 4 "5h35m12s" - 5 hours 35 minutes 12 seconds "5h12s" - 5 hours 12 seconds 3000m - 3000 minutes "0", "0s" ... - time is zero.


Functions available for the field are called via the "in" operator.

  • "Time between dates" in time_cf("condition","time") - returns tasks for which the time between dates is greater than, equal to, or less than the specified (condition).

  • "Time between dates" in timeBetween_cf("time","time") - Returns tasks that have the time in the specified range.

Examples

  • "Time between dates" in time_cf (">", "1h")

  • "Time between dates" in time_cf ("<", "1h 12m)

  • "Time between dates" in timeBetween_cf("1h", "2h")