Forums

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

jql "ORDER BY created ASC" + "AND .. "

Halif
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 26, 2019

I am using api/2/search 

jql="(project=Test OR project=Test1) ORDER BY created ASC"  <- this jql working;

jql="(project=Test OR project=Test1) AND created <= now()"   <- this jql also working ;

jql="((project=Test OR project=Test1) ORDER BY created ASC) AND created <= now()"  <- NOT working.

How put this two parametres "ORDER BY created DESC" + "AND .. " together?

2 answers

1 accepted

2 votes
Answer accepted
Brant Schroeder
Community Champion
October 26, 2019

The order by has to come at the end of the JQL statement.  https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-764478330.html

You would have to do:

jql="(project=Test OR project=Test1) AND created <= now() ORDER BY created ASC"

1 vote
Warren
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.
October 28, 2019

Hi @Halif 

I agree with Brant's answer above.

To simplify your JQL, you can also change

(project=Test OR project=Test1)

to

project in (Test, Test1)

Suggest an answer

Log in or Sign up to answer