Skip to content

Function: createVersion()

ts
function createVersion(client, parameters): Promise<{
[key: string]: unknown;
  approvers?: object[];
  archived?: boolean;
  description?: string;
  driver?: string;
  expand?: string;
  id?: string;
  issuesStatusForFixVersion?: {
   [key: string]: unknown;
     done?: number;
     inProgress?: number;
     toDo?: number;
     unmapped?: number;
  };
  moveUnfixedIssuesTo?: string;
  name?: string;
  operations?: object[];
  overdue?: boolean;
  projectId?: number;
  released?: boolean;
  releaseDate?: string;
  self?: string;
  startDate?: string;
  userReleaseDate?: string;
  userStartDate?: string;
}>;

Defined in: src/cloud/api/projectVersions.ts:90

Creates a project version.

This operation can be accessed anonymously.

Permissions required:Administer Jira global permission or Administer Projects project permission for the project the version is added to.

Parameters

ParameterTypeDescription
clientClient-
parameters{ approvers?: object[]; archived?: boolean; description?: string; driver?: string; expand?: string; id?: string; issuesStatusForFixVersion?: { [key: string]: unknown; done?: number; inProgress?: number; toDo?: number; unmapped?: number; }; moveUnfixedIssuesTo?: string; name?: string; operations?: object[]; overdue?: boolean; projectId?: number; released?: boolean; releaseDate?: string; self?: string; startDate?: string; userReleaseDate?: string; userStartDate?: string; }-
parameters.approvers?object[]If the expand option approvers is used, returns a list containing the approvers for this version.
parameters.archived?booleanIndicates that the version is archived. Optional when creating or updating a version.
parameters.description?stringThe description of the version. Optional when creating or updating a version. The maximum size is 16,384 bytes.
parameters.driver?stringThe Atlassian account ID of the version driver. Optional when creating or updating a version. If the expand option driver is used, returns the Atlassian account ID of the driver.
parameters.expand?stringUse expand to include additional information about version in the response. This parameter accepts a comma-separated list. Expand options include: - operations Returns the list of operations available for this version. - issuesstatus Returns the count of issues in this version for each of the status categories to do, in progress, done, and unmapped. The unmapped property contains a count of issues with a status other than to do, in progress, and done. - driver Returns the Atlassian account ID of the version driver. - approvers Returns a list containing approvers for this version. Optional for create and update.
parameters.id?stringThe ID of the version.
parameters.issuesStatusForFixVersion?{ [key: string]: unknown; done?: number; inProgress?: number; toDo?: number; unmapped?: number; }-
parameters.issuesStatusForFixVersion.done?numberCount of issues with status done.
parameters.issuesStatusForFixVersion.inProgress?numberCount of issues with status in progress.
parameters.issuesStatusForFixVersion.toDo?numberCount of issues with status to do.
parameters.issuesStatusForFixVersion.unmapped?numberCount of issues with a status other than to do, in progress, and done.
parameters.moveUnfixedIssuesTo?stringThe URL of the self link to the version to which all unfixed issues are moved when a version is released. Not applicable when creating a version. Optional when updating a version.
parameters.name?stringThe unique name of the version. Required when creating a version. Optional when updating a version. The maximum length is 255 characters.
parameters.operations?object[]If the expand option operations is used, returns the list of operations available for this version.
parameters.overdue?booleanIndicates that the version is overdue.
parameters.projectId?numberThe ID of the project to which this version is attached. Required when creating a version. Not applicable when updating a version.
parameters.released?booleanIndicates that the version is released. If the version is released a request to release again is ignored. Not applicable when creating a version. Optional when updating a version.
parameters.releaseDate?stringThe release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a version.
parameters.self?stringThe URL of the version.
parameters.startDate?stringThe start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a version.
parameters.userReleaseDate?stringThe date on which work on this version is expected to finish, expressed in the instance's Day/Month/Year Format date format.
parameters.userStartDate?stringThe date on which work on this version is expected to start, expressed in the instance's Day/Month/Year Format date format.

Returns

Promise<{ [key: string]: unknown; approvers?: object[]; archived?: boolean; description?: string; driver?: string; expand?: string; id?: string; issuesStatusForFixVersion?: { [key: string]: unknown; done?: number; inProgress?: number; toDo?: number; unmapped?: number; }; moveUnfixedIssuesTo?: string; name?: string; operations?: object[]; overdue?: boolean; projectId?: number; released?: boolean; releaseDate?: string; self?: string; startDate?: string; userReleaseDate?: string; userStartDate?: string; }>