Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create a filter with time range between two dates and hours

Horia Chiornita March 4, 2019

Hi,

 

I would like to have an automatic filter that display all the tickets that have Activity Start Date and Activity End Date  since yesterday starting with 8 am and ending with tomorrow at 8 am. 

E.g.: today 4/ March i want to receive all tickets with Activity Start Date and Activity End Date between 3 March 8 am - 5 March 8am.

 

Now i have every day to select manually the dates and hours and probably it can be somehow automatically filled in JQL

1 answer

0 votes
Alexey Matveev
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.
March 4, 2019

Hello,

Try a JQL query like this:

("Activity Start Date" > startOfDate(-16h) and "Activity Start Date" < endOfDate(8h)) or ("Activity End Date" > startOfDate(-16h) and "Activity End Date" < endOfDate(8h))

Horia Chiornita March 4, 2019 edited

I'm working on it, Thank you!

I will update you if is working

Horia Chiornita March 4, 2019
  • Unable to find JQL function 'startOfDate(-16h)'.
  • Unable to find JQL function 'endOfDate(8h)'.

This is the error received

Alexey Matveev
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.
March 4, 2019

It should be like this:

("Activity Start Date" > startOfDay(-16h) and "Activity Start Date" < endOfDay(8h)) or ("Activity End Date" > startOfDay(-16h) and "Activity End Date" < endOfDay(8h))

Horia Chiornita March 4, 2019

Now i have this error: 

  • Unable to find JQL function 'startOfDate(-16h)'.
  • Unable to find JQL function 'endOfDate(8h)'.
Melody KirkWagner April 15, 2019

Looks like it should have been startOfDay, not startOfDate. I'm off to try it out, anyway.

Melody KirkWagner April 15, 2019

This doesn't do what it's supposed to do, but doesn't get an error, so you might try messing around with that wording until it works. That's what I'm trying for. 

project = <projectname> AND issuetype in (Incident, Issue) AND status !=Done AND (created >= 2019-01-01 AND created <= 2019-03-31) AND (created > startOfDay(-16h) AND created< endOfDay(8h))

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events