createIssues method

Future<CreatedIssues> createIssues({
  1. required IssuesUpdateBean body,
})

Creates upto 50 issues and, where the option to create subtasks is enabled in Jira, subtasks. Transitions may be applied, to move the issues or subtasks to a workflow step other than the default start step, and issue properties set.

The content of each issue or subtask is defined using update and fields. The fields that can be set in the issue or subtask are determined using the Get create issue metadata. These are the same fields that appear on the issues' create screens. Note that the description, environment, and any textarea type custom fields (multi-line text fields) take Atlassian Document Format content. Single line custom fields (textfield) accept a string and don't handle Atlassian Document Format content.

Creating a subtask differs from creating an issue as follows:

  • issueType must be set to a subtask issue type (use Get create issue metadata to find subtask issue types).
  • parent the must contain the ID or key of the parent issue.

Permissions required: Browse projects and Create issues project permissions for the project in which each issue or subtask is created.

Implementation

Future<CreatedIssues> createIssues({required IssuesUpdateBean body}) async {
  return CreatedIssues.fromJson(await _client.send(
    'post',
    'rest/api/3/issue/bulk',
    body: body.toJson(),
  ));
}