Hi,
Following script works fine from script console but doesnt work when i use it in script listener:
def user = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser()
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
def searchService = ComponentAccessor.getComponent(SearchService.class);
def projectManager = ComponentAccessor.getProjectManager()
VersionManager VersionManager = ComponentAccessor.getVersionManager()
def versionService = ComponentAccessor.getComponent(VersionService)
def Existing = ComponentAccessor.versionManager.allVersions.find { v ->
v.projectObject.key == "SWAINF" && v.name == "new version"
}
String VersionName =Existing.name
Date VersionStartDate = Existing.startDate
Date VersionReleaseDate = Existing.releaseDate
if(Existing){
versionService.setVersionDetails(user , Existing, "VersionName" , "VersionDescription")
log.debug("End Update Existing Version: "+ Existing)
}
Please Advise
Thanks
Hello,
What exactly are you wanting this script to do? Can you explain the context a bit to me so I can help you figure out what is needed? Also, when are you wanting the listener to fire?
Jenna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.