JQL query not giving the expected result when executed using the REST API.

Anurag Nanda November 8, 2016

However it works just fine when executed through the web UI.

Here is the query: Project=<project name> AND resolutiondate > 2016/10/29

The query when executed through the REST API returns all issues for the project instead of returning only the ones that are resolved after 2016/10/29

Rest call I am making: https://opswat.atlassian.net/rest/api/latest/search?Project=FV%20AND%20(resolutiondate>"2016/10/29")

 

I was able to solve the issue by using "Project in (FV)" instead of "Project=FV"
 

1 answer

0 votes
Nic Brough -Adaptavist-
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 8, 2016

I assume you mean REST API (the web ui also uses the API, but not the REST one)

Could you give us the REST call you are making?  Also, could you use a different date, one that's clearly correct and we can tell the difference between month and day (some cultures incorrectly mess up the least<->most significant order and put month before day - 2016/10/10 could be either, but 2016/10/31 is right and can't be mistaken)

Anurag Nanda November 8, 2016

Just added those details to the question.

 

Nic Brough -Adaptavist-
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 8, 2016

Ok, that looks like it should work (and return all FV issues resolved after 29th October 2016).  I suspect it might work in a browser, but you might have to encode it fully in other places.  You've already got most of it, but try this (I've dropped the braces, for simplicity)

https://opswat.atlassian.net/rest/api/latest/search?Project=FV%20AND%20resolutiondate%3E%222016/10/29%22

Suggest an answer

Log in or Sign up to answer