getFieldAutoCompleteForQueryString method

Future<AutoCompleteSuggestions> getFieldAutoCompleteForQueryString({
  1. String? fieldName,
  2. String? fieldValue,
  3. String? predicateName,
  4. String? predicateValue,
})

Returns the JQL search auto complete suggestions for a field.

Suggestions can be obtained by providing:

  • fieldName to get a list of all values for the field.
  • fieldName and fieldValue to get a list of values containing the text in fieldValue.
  • fieldName and predicateName to get a list of all predicate values for the field.
  • fieldName, predicateName, and predicateValue to get a list of predicate values containing the text in predicateValue.

This operation can be accessed anonymously.

Permissions required: None.

Implementation

Future<AutoCompleteSuggestions> getFieldAutoCompleteForQueryString(
    {String? fieldName,
    String? fieldValue,
    String? predicateName,
    String? predicateValue}) async {
  return AutoCompleteSuggestions.fromJson(await _client.send(
    'get',
    'rest/api/3/jql/autocompletedata/suggestions',
    queryParameters: {
      if (fieldName != null) 'fieldName': fieldName,
      if (fieldValue != null) 'fieldValue': fieldValue,
      if (predicateName != null) 'predicateName': predicateName,
      if (predicateValue != null) 'predicateValue': predicateValue,
    },
  ));
}