getIssuesForEpic method

Future getIssuesForEpic({
  1. required String epicIdOrKey,
  2. int? startAt,
  3. int? maxResults,
  4. String? jql,
  5. bool? validateQuery,
  6. List<Map<String, dynamic>>? fields,
  7. String? expand,
})

Returns all issues that belong to the epic, for the given epic ID. This only includes issues that the user has permission to view. Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank. Note: If you are querying a next-gen project, do not use this operation. Instead, search for issues that belong to an epic by using the Search for issues using JQL operation in the Jira platform REST API. Build your JQL query using the parent clause. For more information on the parent JQL field, see Advanced searching.

Implementation

Future<dynamic> getIssuesForEpic(
    {required String epicIdOrKey,
    int? startAt,
    int? maxResults,
    String? jql,
    bool? validateQuery,
    List<Map<String, dynamic>>? fields,
    String? expand}) async {
  return await _client.send(
    'get',
    'rest/agile/1.0/epic/{epicIdOrKey}/issue',
    pathParameters: {
      'epicIdOrKey': epicIdOrKey,
    },
    queryParameters: {
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
      if (jql != null) 'jql': jql,
      if (validateQuery != null) 'validateQuery': '$validateQuery',
      if (fields != null) 'fields': fields.map((e) => '$e').join(','),
      if (expand != null) 'expand': expand,
    },
  );
}