getIssue method

Future<IssueBean> getIssue({
  1. required String issueIdOrKey,
  2. List<String>? fields,
  3. bool? fieldsByKeys,
  4. String? expand,
  5. List<String>? properties,
  6. bool? updateHistory,
})

Returns the details for an issue.

The issue is identified by its ID or key, however, if the identifier doesn't match an issue, a case-insensitive search and check for moved issues is performed. If a matching issue is found its details are returned, a 302 or other redirect is not returned. The issue key returned in the response is the key of the issue found.

This operation can be accessed anonymously.

Permissions required:

Implementation

Future<IssueBean> getIssue(
    {required String issueIdOrKey,
    List<String>? fields,
    bool? fieldsByKeys,
    String? expand,
    List<String>? properties,
    bool? updateHistory}) async {
  return IssueBean.fromJson(await _client.send(
    'get',
    'rest/api/3/issue/{issueIdOrKey}',
    pathParameters: {
      'issueIdOrKey': issueIdOrKey,
    },
    queryParameters: {
      if (fields != null) 'fields': fields.map((e) => e).join(','),
      if (fieldsByKeys != null) 'fieldsByKeys': '$fieldsByKeys',
      if (expand != null) 'expand': expand,
      if (properties != null)
        'properties': properties.map((e) => e).join(','),
      if (updateHistory != null) 'updateHistory': '$updateHistory',
    },
  ));
}