getIssuePickerResource method

Future<IssuePickerSuggestions> getIssuePickerResource({
  1. String? query,
  2. String? currentJql,
  3. String? currentIssueKey,
  4. String? currentProjectId,
  5. bool? showSubTasks,
  6. bool? showSubTaskParent,
})

Returns lists of issues matching a query string. Use this resource to provide auto-completion suggestions when the user is looking for an issue using a word or string.

This operation returns two lists:

  • History Search which includes issues from the user's history of created, edited, or viewed issues that contain the string in the query parameter.
  • Current Search which includes issues that match the JQL expression in currentJQL and contain the string in the query parameter.

This operation can be accessed anonymously.

Permissions required: None.

Implementation

Future<IssuePickerSuggestions> getIssuePickerResource(
    {String? query,
    String? currentJql,
    String? currentIssueKey,
    String? currentProjectId,
    bool? showSubTasks,
    bool? showSubTaskParent}) async {
  return IssuePickerSuggestions.fromJson(await _client.send(
    'get',
    'rest/api/3/issue/picker',
    queryParameters: {
      if (query != null) 'query': query,
      if (currentJql != null) 'currentJQL': currentJql,
      if (currentIssueKey != null) 'currentIssueKey': currentIssueKey,
      if (currentProjectId != null) 'currentProjectId': currentProjectId,
      if (showSubTasks != null) 'showSubTasks': '$showSubTasks',
      if (showSubTaskParent != null)
        'showSubTaskParent': '$showSubTaskParent',
    },
  ));
}