Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

REST API in scriptruuner to create Jira version

Hi Communty.


i need your help guys for create script that create version in Jira project.

be aware i use jira software.

1 answer

1 accepted

1 vote
Answer accepted
Leo Community Leader Mar 06, 2020 • edited

Hi @khalid alqahtani,

Below script may give you some idea, I haven't tried by myself so may require some minor changes

import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.project.ProjectManager
import com.atlassian.jira.project.version.VersionManager

def projectManager = ComponentAccessor.getProjectManager()
def project = projectManager.getProjectObjByKey("KEY")

def versionManager = ComponentAccessor.getVersionManager()

versionManager.createVersion("Version Name", new Date(), new Date()+7, "New Version Description",, null)



Thank you, very helpful.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events