Automation for Jira rules are disabled when Time to SLA is enabled

This page is about Time to SLA for Jira On-Prem.

Problem

When Time to SLA is installed and enabled, Automation for Jira rules are not executed anymore, even if there is no Time to SLA triggers configured.

Following exceptions could be observed in application logs:

2020-10-22 15:29:06,876+0200 http-nio-8080-exec-81 ERROR xxxxxxxx 929x20536238x4 - x.x.x.x,x.x.x.x,x.x.x.x /rest/api/2/myself [c.a.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to disp atch event [com.atlassian.crowd.event.user.UserAttributeStoredEvent@ecb2cbec] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl.handleAllOther Events(java.lang.Object), listener=com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl@2f0cea4f}] java.lang.RuntimeException: com.tuncaysenturk.jira.plugins.timetosla.a.a.e cannot be cast to com.codebarrel.automation.api.thirdparty.AutomationRuleComponent. Listener: com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerIm pl event: com.atlassian.crowd.event.user.UserAttributeStoredEvent at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:57) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:227) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:112) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.storeUserAttributes(DirectoryManagerGeneric.java:398) at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.storeUserAttributes(ApplicationServiceGeneric.java:655) at com.atlassian.crowd.embedded.core.CrowdServiceImpl.setUserAttribute(CrowdServiceImpl.java:333) at com.atlassian.crowd.embedded.core.CrowdServiceImpl.setUserAttribute(CrowdServiceImpl.java:324) at com.atlassian.jira.security.login.LoginStoreImpl.setLong(LoginStoreImpl.java:132) at com.atlassian.jira.security.login.LoginStoreImpl.updateLastLoginTime(LoginStoreImpl.java:113) at com.atlassian.jira.security.login.LoginStoreImpl.recordLoginAttempt(LoginStoreImpl.java:49) at com.atlassian.jira.security.login.RecoveryLoginStore.recordLoginAttempt(RecoveryLoginStore.java:60) at com.atlassian.jira.security.login.LoginManagerImpl.recordLoginAttempt(LoginManagerImpl.java:320) at com.atlassian.jira.security.login.LoginManagerImpl.onLoginAttempt(LoginManagerImpl.java:216) at com.atlassian.jira.security.login.JiraElevatedSecurityGuard.onSuccessfulLoginAttempt(JiraElevatedSecurityGuard.java:30) ... 13 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37) ... 19 filtered at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30) ... 10 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 4 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36) ... 26 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 25 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassCastException: com.tuncaysenturk.jira.plugins.timetosla.a.a.e cannot be cast to com.codebarrel.automation.api.thirdparty.AutomationRuleComponent at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleDescriptor.getModule(ThirdPartyComponentModuleDescriptor.java:51) at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.getHandledEventClasses(ThirdPartyComponentModuleTracker.java:50) at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.lambda$getThirdPartyTriggers$0(ThirdPartyComponentModuleTracker.java:45) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.getThirdPartyTriggers(ThirdPartyComponentModuleTracker.java:46) at com.codebarrel.jira.plugin.automation.event.DefaultEventRuleRegistry.handleEventWithThirdPartyTriggers(DefaultEventRuleRegistry.java:344) at com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl.handleAllOtherEvents(JiraIssueEventListenerImpl.java:176) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42) ... 121 more

Diagnosis

This problem only occurs when both lite and paid versions of the Automation for Jira plugin are installed. It doesn't require both of them to be enabled. This commonly occurs when customers first try the lite version of Automation for Jira, then switch to the paid version but do not uninstall the lite version from the system.

Solution

Simply uninstall one of the Automation for Jira installations. There is also an open bug report for the Automation for Jira plugin.