I am putting all Events into splunk:
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.EventType
import com.atlassian.jira.event.type.EventTypeManager
import com.atlassian.jira.component.ComponentAccessor
EventTypeManager 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.