PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/src/main/resources/com/onresolve/jira/groovy/listeners/ExampleListener.groovy

https://bitbucket.org/sorin/jira-plugin-intellij
Groovy | 16 lines | 13 code | 3 blank | 0 comment | 0 complexity | e31642751db6d5f474c58dcaeee65b7e MD5 | raw file
  1. package com.onresolve.jira.groovy.listeners
  2. import com.atlassian.jira.event.issue.AbstractIssueEventListener
  3. import com.atlassian.jira.event.issue.IssueEvent
  4. import com.atlassian.jira.ComponentManager
  5. import org.apache.log4j.Category
  6. class ExampleListener extends AbstractIssueEventListener {
  7. Category log = Category.getInstance(ExampleListener.class)
  8. @Override
  9. void workflowEvent(IssueEvent event) {
  10. Map eventTypes = ComponentManager.getInstance().getEventTypeManager().getEventTypesMap()
  11. log.debug "Event: \"${eventTypes[event.getEventTypeId()].name}\" fired for ${event.issue} and caught by ExampleListener"
  12. }
  13. }