Closed jonnaranbrandt closed 3 years ago
Nice find, this causes problems when IM is not executed via a HTTP request. Such as in an a scheduled ScriptRunner job.
2021-02-24 08:30:29,509+0000 Caesium-1-1 ERROR anonymous [c.o.scriptrunner.jobs.AbstractCustomScheduledJob] Script job: 'Testing ExecutingHttpRequest' failed java.lang.NullPointerException: Cannot get property 'servletPath' on null object at customRiadaLibraries.insightmanager.InsightManagerForScriptrunner.
(InsightManagerForScriptrunner.groovy:153) at Script65.run(Script65.groovy:4)
insert question marks as per: inJsdBehaviourContext = new ExecutingHttpRequest()?.get()?.servletPath?.startsWith("/rest/scriptrunner/behaviours/latest/jsd/jsd")