Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

REST API in scriptruuner to create Jira version

khalid alqahtani March 6, 2020

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

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 6, 2020

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",project.id, null)

BR,

Leo

khalid alqahtani March 6, 2020

Thank you, very helpful.

TAGS
AUG Leaders

Atlassian Community Events