Forums

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

Use JQL to filter a JIRA API call to issues before a date?

Randall_Helms September 14, 2018

Hi, I see that similar versions of this question have been asked before, but none of the answers have worked for my specific use case.

I would like to do a search for issues before a certain date, not in between two dates. I understand that this would be done using JQL but I am not sure quite how to do so, or at least I have not yet been able to make it work.

I have written a script in R that extracts and transforms data on the issues in one of our projects, but I also want to add a filter to get issues before a certain date.

This isn't an R specific issue, though, as I think the core problem is adding the created before parameter to the GET URL.

Let's say that this is a URL that works to extract 50 results from a project (the project number is made up obviously):

https://jira.mycompany.com/rest/api/2/search?jql=project=123456&startAt=0&maxResults=50

How do I add a &created< parameter correctly to this URL? Let's say I wanted to see only issues created before 2017-12-31, how would I add that?

1 answer

0 votes
Mohamed Riza
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 28, 2018

Hi @Randall_Helms

You may run the REST call as such:

/rest/api/2/search?jql=project = SSP and created < "2018/05/31"

Therefore this will pull the issues from project SSP,  which were created before  2018/05/31. 

Suggest an answer

Log in or Sign up to answer