Good day,
I am learning how to write scripts and run them with mygroovy in Jira Software Server.
If I understand right, class name means listener class.
Question - what should I write if I want in script to handle with multiple event types?
com.atlassian.jira.event.project.VersionCreateEvent
com.atlassian.jira.event.project.VersionReleaseEvent
com.atlassian.jira.event.project.VersionUpdatedEvent
com.atlassian.jira.event.project.VersionDeleteEvent
com.atlassian.jira.event.project.VersionArchiveEvent
com.atlassian.jira.event.project.VersionMergeEvent
com.atlassian.jira.event.project.VersionUnreleaseEvent
com.atlassian.jira.event.project.VersionUnarchiveEvent
with code like
if (event instanceof VersionCreateEvent){
def event = event as VersionCreateEvent
log.debug "new version created"
}
else if(event instanceof VersionUpdatedEvent){
def event = event as VersionUpdatedEvent
log.debug "version was updated"
}
Or it is not possible and should devide scripts on different event types?
Oh, I found answer my self.
I need to choose parent class. Parent class in this case is "com.atlassian.jira.event.project.AbstractVersionEvent"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.