Create a New Fix Version of the Selected Project

Overview

Jira uses versions to keep track of updated/different version of software. This script allows users to create a new label 'New Fix Version' for a project they’re working on.

Example

There’s a problem with a project; however, I've found a solution and want to make sure the issue is associated with a new fix version. I can use this script to create a new fix version for a project I'm working on, and create a label for the new version of fixing.

Requirements

Jira Jira (7.7 - 8.6)

    
import com.atlassian.jira.component.ComponentAccessor // the key of the project under which the version will get created final String projectKey = "JRA" // the name of the version - required final String versionName = "1.0.1" // the start date - optional final Date startDate // the release date - optional final Date releaseDate // a description for the new version - optional final String description // id of the version to schedule after the given version object - optional final Long scheduleAfterVersion // true if this is a released version final boolean released = false def project = ComponentAccessor.projectManager.getProjectObjByKey(projectKey) assert project : "Could not find project with key $projectKey" ComponentAccessor.versionManager.createVersion(versionName, startDate, releaseDate, description, project.id, scheduleAfterVersion, released)
Discovered an issue? Report it here

Suggested for you

Appears in these Collections