getFixFor() ).fixVersionIds( resolvedFixVersionIds ).statusIds( resolvedStatusIds ).priorityIds(
resolvedPriorityIds ).resolutionIds( resolvedResolutionIds ).components( resolvedComponentIds ).typeIds(
resolvedTypeIds ).sortColumnNames( sortColumnNames ).build();
StringWriter searchParamStringWriter = new StringWriter();
JsonGenerator gen = jsonFactory.createGenerator( searchParamStringWriter );
gen.writeStartObject();
gen.writeStringField( "jql", jqlQuery );
gen.writeNumberField( "maxResults", nbEntriesMax );
gen.writeArrayFieldStart( "fields" );
// Retrieve all fields. If that seems slow, we can reconsider.
gen.writeString( "*all" );
gen.writeEndArray();
gen.writeEndObject();
gen.close();
client.replacePath( "/rest/api/2/search" );
client.type( MediaType.APPLICATION_JSON_TYPE );
client.accept( MediaType.APPLICATION_JSON_TYPE );
Response searchResponse = client.post( searchParamStringWriter.toString() );
if ( searchResponse.getStatus() != Response.Status.OK.getStatusCode() )