Abhijeet
Abhijeet

Reputation: 12892

ERROR: Unable to find JQL function response from Jira JQL REST call

I'm trying to run following rest API using Jersey java rest client.

https://issues-alpha.net/rest/api/2/search?startAt=0&maxResults=1&jql=component=43658+AND+status+in+(Open)&fields=components,issuetype

I have tested above REST url using postman and I"m getting a valid response but I'm not able to make it work with Jersey rest java client. Here is the snippet of the code I'm using to build the Webtarget.

WebTarget webTarget = jiraClient.getClient().path("search")
        .queryParam("startAt", 0)
        .queryParam("maxResults", 1)
        .queryParam("fields", "components,issuetype")
        .queryParam("jql", "component%3D43658\\u002BAND\\u002Bstatus\\u002Bin\\u002B(Open)");

Error I'm getting:

 "map" : {
 "errorMessages" : {
 "myArrayList" : [ "Unable to find JQL function '43658+AND+status+in+(Open)'." ]
 },
 "errors" : {
 "map" : { }
 }
 }
}

Upvotes: 0

Views: 498

Answers (1)

Abhishek
Abhishek

Reputation: 75

I am not sure how jersey client work but as any generic rest tool, you don't need to pass u002B (symbol for +) in the query. A simple component=43658 AND status in (Open) should do the work. The + sign is for browser only.

Upvotes: 1

Related Questions