In Jira 10.3.16, when calling the search endpoint with expand=names,schema, the names field is returned for earlier pages but missing at startAt=250.
Example working requests:
GET /rest/api/2/search?jql=assignee=currentUser()&startAt=0&maxResults=50&expand=names,schema
GET /rest/api/2/search?jql=assignee=currentUser()&startAt=50&maxResults=50&expand=names,schemaProblematic request:
GET /rest/api/2/search?jql=assignee=currentUser()&startAt=250&maxResults=50&expand=names,schemaThere are more than 1000 issues in total, and the response contains issues, but the names object is missing.
This causes Jira SDK / REST Java Client to fail with:
org.codehaus.jettison.json.JSONException: JSONObject["names"] not foundCould you please confirm whether this is expected behavior in Jira 10.3.16 or a REST API regression?
This usually means that on one of the issues from 250 till 300 there is an issue with malformed Json or the expand object does not exist.
Thanks for the explanation.
We are not using a custom parser. We are using Jira Java SDK for issue search.
SDK version:
jira-rest-java-client-api: 7.0.1Because of this, we cannot handle missing names or expand objects at parser level.
If one of the issues between 250–300 has malformed JSON or a missing expand object, how can we fix this on the Jira side?
What is the recommended action to repair this type of problematic issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Get smaller increments or use just names or schema as expand options nad see what the results are.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your support.
We found that the 39th issue in the 250–300 range causes the SDK parsing problem and should be removed from Jira.
However, we still think Jira should handle this case more safely. A single problematic issue should not break the whole search response or SDK pagination.
Thanks again for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.