Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

JQL Functions

...

Table of Contents
minLevel2

...

Items

Explanation

datesBeyond

Return all the issues whose time difference between "Date_Field_Name_1" and "Date_Field_Name_2" is greater than or equal to "Time_Frame"

JQL Context

issue in/not in

Time_Frame

Time frame can be w, d, h, m and separated by spaces.

  • w: week

  • d: day

  • h: hour

  • m: minute

Example: "1w 2d 3h 4m"

Date_Field_Name_1&2

Supports

  • "due": issue due date

and any other Date Picker custom fields

JQL Example

issue in dateTimeWithin("3d 8h", "created", "updated")

datesWithin

Code Block
datesWithin("Time_Frame", "Date_Field_Name_1", "Date_Field_Name_2")

...

Items

Explanation

datesWithin

Return all the issues whose time difference between "Date_Field_Name_1" and "Date_Field_Name_2" is less than or equal to "Time_Frame"

JQL Context

issue in/not in

Time_Frame

Time frame can be w, d, h, m and separated by spaces.

  • w: week

  • d: day

  • h: hour

  • m: minute

Example: "1w 2d 3h 4m"

Date_Field_Name_1&2

Supports

  • "due": issue due date

and any other Date Picker custom fields

JQL Example

issue in dateTimeWithin("3d 8h", "created", "updated")

dateTimeBeyond

Code Block
dateTimeBeyond("Time_Frame", "DateTime_Field_Name_1", "DateTime_Field_Name_2")

...

Items

Explanation

dateTimeBeyond

Return all the issues whose time difference between "DateTime_Field_Name_1" and "DateTime_Field_Name_2" is greater than or equal to "Time_Frame"

JQL Context

issue in/not in

Time_Frame

Time frame can be w, d, h, m and separated by spaces.

  • w: week

  • d: day

  • h: hour

  • m: minute

Example: "1w 2d 3h 4m"

DateTime_Field_Name_1&2

Supports

  • "created": issue created datetime

  • "updated": issue updated datetime

  • "resolved": issue resolved datetime

and any other DateTime Picker custom fields

JQL Example

issue in dateTimeWithin("3d 8h", "created", "updated")

dateTimeWithin

Code Block
dateTimeWithin("Time_Frame", "DateTime_Field_Name_1", "DateTime_Field_Name_2")

...

Items

Explanation

preStatusContainsAll

Return all the issues whose historical statuses (excluding current status) include status_A and status_B and status_C and ... and status_X

JQL Context

issue in/not in

status_X

Support all Jira workflow statuses

JQL Example

Four example issues with their workflow transition history:

  1. TK-1: Open

  2. TK-2: Open → In Progress

  3. TK-3: Open → In Progress → Under Review

  4. TK-4: Open → In Progress → Under Review → Rejected → In Progress

'issue in preStatusWas("Rejected")' will return TK-4


'issue in preStatusContainsAll("Open, In Progress")' will return TK-3 and TK-4'issue in preStatusContainsEither("Open, In Progress")' will return TK-2 and TK-3

Note

Automating high volume queries may result in performance degradation of your Jira instance. It is recommend that the StatusWas JQL statements are used ad-hoc, and not for automation or high-volume workflow actions.

...

Items

Explanation

preStatusContainsEither

Return all the issues whose most recently previous status is status_A or status_B or status_C or ... or status_X

JQL Context

issue in/not in

status_X

Support all Jira workflow statuses

JQL Example

Four example issues with their workflow transition history:

  1. TK-1: Open

  2. TK-2: Open → In Progress

  3. TK-3: Open → In Progress → Under Review

  4. TK-4: Open → In Progress → Under Review → Rejected → In Progress

'issue in preStatusWas("Rejected")' will return TK-4
'issue in preStatusContainsAll("Open, In Progress")' will return TK-3 and TK-4


'issue in preStatusContainsEither("Open, In Progress")' will return TK-2 and TK-3

...

Items

Explanation

preStatusWas

Return all the issues whose most recently previous status is status_A

JQL Context

issue in/not in

status_X

Support all Jira workflow statuses

JQL Example

Four example issues with their workflow transition history:

  1. TK-1: Open

  2. TK-2: Open → In Progress

  3. TK-3: Open → In Progress → Under Review

  4. TK-4: Open → In Progress → Under Review → Rejected → In Progress

'issue in preStatusWas("Rejected")' will return TK-4
'issue in preStatusContainsAll("Open, In Progress")' will return TK-3 and TK-4
'issue in preStatusContainsEither("Open, In Progress")' will return TK-2 and TK-3

Note

Automating high volume queries may result in performance degradation of your Jira instance. It is recommend that the StatusWas JQL statements are used ad-hoc, and not for automation or high-volume workflow actions.

...