Forums

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

Jira API Date Range Query not working as expected

Steve Suranie
Contributor
July 11, 2022

Hi all

I am running this query against our Jira Cloud instance: 

https://xxxxxxxx.atlassian.net/rest/api/2/search?jql=project=SE&created%20%3E%20%222022-07-04%22%20and%20created%20%3C%20%222022-07-11%22

 and instead of returning the tickets between the two dates, it returns all the tickets.

{"expand":"schema,names","startAt":0,"maxResults":50,"total":8231,"issues...

This is for our tech ops board, we normally get 20-25 tickets over a 7 day period. Can someone review the set up here and let me know what I am doing wrong? 

2 answers

1 accepted

0 votes
Answer accepted
Bill Sheboy
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.
July 11, 2022

Hi @Steve Suranie 

It appears between your Project condition and first Created condition you are using an ampersand rather than the AND keyword. 

I recommend writing/testing your JQL with Advanced Issue Search first, and then using the resulting value from the browser URL in your REST API call.

Kind regards,
Bill

0 votes
Steve Suranie
Contributor
July 13, 2022

Hey Bill, thanks, that worked, my formatting was off. I usually do as you suggested. I'm running the queries out of a Mac desktop app I built and I must have accidentally edited the query as I had it working correctly and then it stopped. 

Bill Sheboy
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.
July 13, 2022

Great; I am glad to learn it is working now!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events