JQL script to exclude a range of resolution dates from within a range of resolution dates.

Jason Michaud
Contributor
February 16, 2018

Do you know of a way to exclude a range of resolution dates from within a range of resolution dates.

I want to create a query of resolved tickets from the start of month to the end of day yesterday - but I want to exclude any tickets resolved between 2/8/18 730pm and 2/9/18 600am. Below is what I tried - but I'm not getting it.

project = "IS" AND issuetype in ("Emergency Change Management", "Service Request", "Standard Change Management", "System Change Management", "User Incident", Sub-Task) AND ((resolved >= startOfMonth()) AND (resolved < "20180208 1930")) OR ((resolved > "20180209 0600") AND (resolved <= endOfDay(-1))) ORDER BY resolved ASC

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2018

One more bracket...

Change

AND ((resolved >= startOfMonth()) AND (resolved < "20180208 1930")) OR ((resolved > "20180209 0600") AND (resolved <= endOfDay(-1)))

To

AND ( ((resolved >= startOfMonth()) AND (resolved < "20180208 1930")) OR ((resolved > "20180209 0600") AND (resolved <= endOfDay(-1))) )

Jason Michaud
Contributor
February 16, 2018

Thank you Nic - but I am still getting the same results. I am still seeing resolved tickets between the hours of 2/8/18 730pm and 2/9/18 600am that I want to exclude from the range.

 

project = "IS" AND issuetype in ("Emergency Change Management", "Service Request", "Standard Change Management", "System Change Management", "User Incident", Sub-Task) AND ( ((resolved >= startOfMonth()) AND (resolved < "20180208 1930")) OR ((resolved > "20180209 0600") AND (resolved <= endOfDay(-1))) ) ORDER BY resolved ASC

Jason Michaud
Contributor
February 20, 2018

Thank you Nic again - I figured it out - it was the date formatting.

((resolved >= startOfMonth()  AND resolved < "2018-02-08 19:30")  OR  (resolved > "2018-02-09 06:00" AND resolved <= endOfDay(-1)))

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events