searchForIssuesUsingJql method

Future<SearchResults> searchForIssuesUsingJql({
  1. String? jql,
  2. int? startAt,
  3. int? maxResults,
  4. String? validateQuery,
  5. List<String>? fields,
  6. String? expand,
  7. List<String>? properties,
  8. bool? fieldsByKeys,
})

Searches for issues using JQL.

If the JQL query expression is too large to be encoded as a query parameter, use the POST version of this resource.

This operation can be accessed anonymously.

Permissions required: Issues are included in the response where the user has:

Implementation

Future<SearchResults> searchForIssuesUsingJql(
    {String? jql,
    int? startAt,
    int? maxResults,
    String? validateQuery,
    List<String>? fields,
    String? expand,
    List<String>? properties,
    bool? fieldsByKeys}) async {
  return SearchResults.fromJson(await _client.send(
    'get',
    'rest/api/3/search',
    queryParameters: {
      if (jql != null) 'jql': jql,
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
      if (validateQuery != null) 'validateQuery': validateQuery,
      if (fields != null) 'fields': fields.map((e) => e).join(','),
      if (expand != null) 'expand': expand,
      if (properties != null)
        'properties': properties.map((e) => e).join(','),
      if (fieldsByKeys != null) 'fieldsByKeys': '$fieldsByKeys',
    },
  ));
}