Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,297,932
Community Members
 
Community Events
165
Community Groups

Needing to add a Date/Time to a JQL Query.

Hello all,

 

I'm rather new to JQL queries but I am needing to use one in order to produce data recorded within a week, for example, to use a JQL query to show all data entered last week.

 

What I have got right now that functions are: project = XYZ AND issuetype in (ABC, DEF) AND status = Open ORDERBY priority DESC, updated DESC.

The above will show me all results that are currently on show but when one of those status change for example from "Open" to "Closed"  it will disappear from the list as it no longer meets the criteria to be shown.

So what I'm trying to figure out, is there a way to show the data for example from 25/04/2022 to 02/05/2022?

I have looked on here for a while to try and figure out this for example by using "AND updateDate >= (DATE)" but it returns an error so I'm sure if I'm using it correctly.

 

Any help would be gratefully received, the dates I've put down are in the UK format before anyone gets confused.

 

Thank you.

 

 

 

 

 

3 answers

1 accepted

0 votes
Answer accepted

Hi Lloydduckworth and welcome to the Community!

You can try some of this examples:

created > "2022-04-01" and created < "2022-04-30"
updated > "2022-04-01" and updated < "2022-04-30"

createdDate > "2022-04-01" and createdDate < "2022-04-30"
updatedDate > "2022-04-01" and updatedDate < "2022-04-30"

Hope it helps.

Best,
Alberto

Hi Alberto,

 

Thank you for the insight on how to tackle my issue, I have tried an example and am making good progress, but is it possible to take it a step further to show results with specific labels such as "Open", "Closed" and "Rejected" for example?

 

Thank you,

Lloyd.

Hi Lloyd,

just add "AND status in ("Open", "Closed","Rejected")".
Can you please accept my answer if it helped. Thank you.

Best,
Alberto

Hi Alberto,

 

Thank you again for your assistance, I've been having difficulty trying to get my head around this for the past 2 weeks I'm sure I wouldn't forget this in a hurry.

 

Lloyd.

Alberto,

 

Just to add to my previous message with a physical label within Jira is it possible to use that to search amongst various past tickets rather than using a physical status such as Open, Closed, Rejected as that's what really my goal is.

 

Is it possible to search using "labels" rather than Status?

Thanks again,

Lloyd.

The error you mention can also be the format itself and what the JQL is expecting

For instance

created >= "01-01-2022"

returns 

 

Date value '01-01-2022' for field 'created' is invalid. Valid formats include: 'yyyy/MM/dd HH:mm', 'yyyy-MM-dd HH:mm', 'yyyy/MM/dd', 'yyyy-MM-dd', or a period format e.g. '-5d', '4w 2d'.

Hello CJ,

 

Thank you for the assistance, it's helped me move a step closer to my end goal.

Like CJ Edwards likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you