Note
We've packed up and moved from Confluence to Discourse to bring you a better, more interactive space. Out of courtesy we didn't migrate your user account so - you will have to signup again
The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe
I would like to write some code to check if an issue has been exalated in scriptrunner, I am using the following code in scriptrunner for the scripted field that I created as a custom field but it seems that I have a compilation error: I am getting the error stating that [Static type checking] - The variable [eventTypeManager] is undeclared. I am importing the appropriate packages though, how can I fix this problem. Otherwise, how can we check in scriptrunner that and issue has been exalated?
Check componentAccessor for more details.
I used the code which instantiates EventTypeManager and I get the error Cannot find matching method com.atlassian.jira.event.type.EventTypeManager#getEventType(java.lang.Object). Please check if the declared type is correct and if the method exists
EventTypeManager eventTypeManager=ComponentAccessor.getEventTypeManager()
EventType eventType = eventTypeManager.getEventType(event.getEventTypeId())
if (eventType.name.equalsIgnoreCase(EXALATED_EVENT_TYPE)) {
return "EXALATED event caught for issue ${issue.key}"
}