I am getting error when I enter the following search query. Could you help me debug it?

Shyam Ganesh kandasamy November 23, 2020

project = WECONNECT

AND (status was not “in Approval” AND status was not “Released” AND status was not “Done”) AND status changed to "in qa" during (startOfWeek(1d), endOfWeek(1d))

OR (status was not “in qa” AND status was not “Released” AND status was not “Done”) and status changed to "in approval" during (startOfWeek(1d), endOfWeek(1d)) 

OR (status was not “in approval” AND status was not “Released” AND status was not “in qa”) and status changed to “done” during (startOfWeek(1d), endOfWeek(1d)) 

OR (status was not “in approval” AND status was not “done” AND status was not “in qa”) and status changed to “released” during (startOfWeek(1d), endOfWeek(1d)) )

 

I am getting the following error

"Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'Approval”'. (line 1, character 46)"

Note: I have included extra spaces for better readability.

4 answers

2 accepted

1 vote
Answer accepted
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2020

Hi @Shyam Ganesh kandasamy ,

It is not easy to debug without the actual error message nor access to the results, but 2 recommendations:

First, you could shorten your syntax a bit. I would re-write e.g the first status part as follows:

AND (status was not in (“in Approval”, “Released”, “Done”) AND status changed to "in qa" during (startOfWeek(1d), endOfWeek(1d))

Second, assuming that all your status clauses refer to the same project, add brackets around those parts as well to make sure all clauses are applied to your project. I mean the following:

Project = WECONNECT AND ((clause 1) OR (clause 2) OR (clause 3))
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2020

And also: given there's quite a lot of brackets involved > check if every bracket you open is also properly closed. You may be missing closing brackets after your During (date 1, date 2) statements.

Like # people like this
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2020

As per your comment below:

I think the problem with my query is that, I have used the the reserved words (in and for) in the search queries. i.e. "Ready for development" and "In approval".

That should not be the problem as you have correctly included your status names between quotes.

Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2020

I am quite sure you are missing a closing bracket at the end of your test query. Try this one:

Project = WECONNECT AND (status was not in (“in Approval”, “Released”, “Done”) AND status changed to "in qa" during (startOfWeek(1d), endOfWeek(1d)))

Then, I'd recommend you make sure each of the separate queries is tested and works before combining them into the full monty ;-)

Shyam Ganesh kandasamy November 23, 2020

@Walter Buggenhout, Hi. You are right. Thanks.

But still after correcting the brackets I am getting the exactly same error. :-{

0 votes
Answer accepted
Shyam Ganesh kandasamy November 23, 2020

The following query worked for me. Thanks.  :-)

project = WECONNECT AND (status was not in ("in Approval", Released, Done) AND status changed to "in qa" during (startOfWeek(1d), endOfWeek(1d)) OR status was not in ("In QA", Released, Done) AND status changed to "in Approval" during (startOfWeek(1d), endOfWeek(1d)) OR status was not in ("In Approval", Released, "In QA") AND status changed to done during (startOfWeek(1d), endOfWeek(1d)) OR status was not in ("In Approval", Done, "In QA") AND status changed to released during (startOfWeek(1d), endOfWeek(1d)) )

0 votes
Shyam Ganesh kandasamy November 23, 2020

Thanks. For testing, I just used the search query from your answer. But I am still getting the same error. :-(Capture.PNG

0 votes
Shyam Ganesh kandasamy November 23, 2020

@Walter BuggenhoutThanks for you replies.

I think the problem with my query is that, I have used the the reserved words (in and for) in the search queries. i.e. "Ready for development" and "In approval".

Could you help me overcome this problem?

 

BR,

Shyam.

Suggest an answer

Log in or Sign up to answer