How to extract particular day issues data from rest api using JQL?

I need issues which created and updated yesterday i.e 2016-07-28 00:00:00 to 2016-07-28 23:59:59.what is the date format or functions can i use.

1 answer

Hi,

Using date search functions you may not need to worry about date format.

https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-functions-reference-764478342.html

This works on my JIRA for created and updated yesterday.

 

created >= startOfDay(-1) AND created <= endOfDay(-1) AND updated>= startOfDay(-1) AND updated<= endOfDay(-1)

The -1 stands for yesterday.

 

This works too

created >= "2016-07-28" AND created < "2016-07-29" AND updated>= "2016-07-28" AND updated < "2016-07-29"

 

A link to the REST API

 

https://jira.atlassian.com/rest/api/2/search?jql=created>=startOfDay(-1) AND created<=endOfDay(-1) AND updated>=startOfDay(-1) AND updated<=endOfDay(-1)
 
https://jira.atlassian.com/rest/api/2/search?jql=created%3E=startOfDay(-1)%20AND%20created%3C=endOfDay(-1)%20AND%20updated%3E=startOfDay(-1)%20AND%20updated%3C=endOfDay(-1)

 

Regards,

 

Enrique.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

189 views 1 11
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you