I am putting all Events into splunk:
https://docs.atlassian.com/software/jira/docs/api/7.6.1/com/atlassian/jira/event/issue/IssueEvent.html
Incuding the EventTypeId. But I cant get a hand on the Name itself like "Issue Created" - only by hardcoding it with if/case like:
if (EventId == EventType.ISSUE_WORKLOG_DELETED_ID){ EventName="Worklog Deleted"}if (EventId == EventType.ISSUE_WORKLOG_UPDATED_ID){ EventName="Worklog Updated"}
How do I get hold of the name (also for Custom Events):
if (EventId == 10009){ EventName="P1 Incident"}if (EventId == 10010){ EventName="P2 Incident"}
Hi
I think you could get them from EventTypeManager, see code:
import com.atlassian.jira.event.type.EventTypeimport com.atlassian.jira.event.type.EventTypeManagerimport com.atlassian.jira.component.ComponentAccessorEventTypeManager etm = ComponentAccessor.getEventTypeManager();Collection<EventType> alleventTypes = etm.getEventTypes()def result="";for (EventType ev : alleventTypes) {result+=ev.toString()+"<br>";}return result;
Hi, I recommend using the method
It looks like you're new here. Sign in or register to get started.