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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.