Create Release

Overview

Create a new release for a version using this script. The script records the date of release.

Example

Use this script as a console script: I want to speed up and automate my release process. To reduce the time to manually create a version, I execute this script, specifying the version name and project I wish to version. A version is then automatically created with the specified name and release date.

Use this script as a listener: I want to speed up and automate my release process. To reduce the time to manually create a version, the script will run when the current sprint closes. A version is then automatically created with the specified name and release date.

Good to Know

  • There must not be more than one version with the same name in any specified project.
  • You can change the event with which the script will run.

Requirements

Jira Jira

    
import java.time.LocalDateTime import java.time.format.DateTimeFormatter final releaseDate = DateTimeFormatter.ISO_LOCAL_DATE.format(LocalDateTime.now()) final name = "Version $releaseDate" final projectKey = 'TEST' final archived = false final released = true post('/rest/api/2/version') .header('Content-Type', 'application/json') .body([ name: name, archived: archived, released: released, releaseDate: releaseDate, project: projectKey ]) .asString()
Discovered an issue? Report it here

Suggested for you