Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Adaptavist Scriptrunner Escalation Service Error (Cannot get changed items)

Aaron Andrade
Contributor
August 20, 2019 edited

I am wanting to close out issues (resolution Abandon) if they haven't been updated in over a year.  I am using the Escalation Services in scriptrunner.

The query and actions

project = X AND updated <= -360d AND resolution is EMPTY
issueInputParameters.setStatusId('6')
issueInputParameters.setResolutionId('8')
issueInputParameters.setComment('Abandoning due to inactivity.')

I have verified that all the issues are in the same status, all are using the same workflow, all can be changed by the user running the script, 6 is the id for "Closed", and 8 is the id for "Abandoned".

Results

Number of issues returned by query: 176
Issue X-24054 updated (no action defined)
Issue X-24052 updated (no action defined)
Issue X-24050 updated (no action defined)
.....

Logs on the server 

2019-08-20 14:13:00,765 JIRA-INFORM-Thread-3 WARN anonymous 772x4231x1 ln1bni IP /rest/scriptrunner-jira/latest/escalationservices/com.onresolve.scriptrunner.canned.jira.admin.EscalationService/preview [c.a.j.p.m.service.helper.NotificationRecipientHelper] Cannot get change items
java.lang.NullPointerException
at com.atlassian.jira.plugin.mobile.service.helper.NotificationRecipientHelper.isSupportedIssueUpdateEvent(NotificationRecipientHelper.java:135)
at com.atlassian.jira.plugin.mobile.service.helper.NotificationRecipientHelper.isSupportedEvent(NotificationRecipientHelper.java:127)
at com.atlassian.jira.plugin.mobile.service.helper.NotificationRecipientHelper.isValidIssueEvent(NotificationRecipientHelper.java:113)
at com.atlassian.jira.plugin.mobile.service.impl.MobileNotificationRecipientServiceImpl.getRecipientUserKeys(MobileNotificationRecipientServiceImpl.java:46)
at com.atlassian.jira.plugin.mobile.service.provider.MobileNotificationRecipientProvider.getRecipients(MobileNotificationRecipientProvider.java:37)
at com.atlassian.jira.plugins.inform.events.convert.EventConverterImpl.safeGet(EventConverterImpl.java:76)
at com.atlassian.jira.plugins.inform.events.convert.EventConverterImpl.lambda$null$0(EventConverterImpl.java:58)
at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.collect(Unknown Source)
at com.atlassian.jira.plugins.inform.events.convert.EventConverterImpl.lambda$convert$3(EventConverterImpl.java:58)
at com.atlassian.jira.plugins.inform.performance.MeasurementProducer$MeasureWorkerBuilder$1.measure(MeasurementProducer.java:48)
at com.atlassian.jira.plugins.inform.events.convert.EventConverterImpl.convert(EventConverterImpl.java:51)
at com.atlassian.jira.plugins.inform.events.convert.EventConverterImpl.convert(EventConverterImpl.java:34)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Unknown Source)
at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.collect(Unknown Source)
at com.atlassian.jira.plugins.inform.events.listener.JiraEventListenerImpl.lambda$handleIssueEventBundle$5(JiraEventListenerImpl.java:63)
at com.atlassian.jira.plugins.inform.performance.MeasurementProducer$MeasureWorkerBuilder$1.lambda$measure$0(MeasurementProducer.java:63)
at com.atlassian.jira.plugins.inform.performance.MeasurementProducer$MeasureWorkerBuilder$1.measure(MeasurementProducer.java:48)
at com.atlassian.jira.plugins.inform.performance.MeasurementProducer$MeasureWorkerBuilder$1.measure(MeasurementProducer.java:63)
at com.atlassian.jira.plugins.inform.events.listener.JiraEventListenerImpl.handleIssueEventBundle(JiraEventListenerImpl.java:52)
at com.atlassian.jira.plugins.inform.events.listener.AsyncJiraEventListener.lambda$handleIssueEventBundle$0(AsyncJiraEventListener.java:27)
at com.atlassian.jira.plugins.inform.events.listener.EventThreadPool.lambda$wrapThreadLocalSafe$0(EventThreadPool.java:48)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

All 176 are getting the comment, but are not changing the status nor the resolution.  Interestingly when I take out only the add comment line from the script it produces the same results in the browser, but it does not throw the WARN in the log. 

Any ideas what I am doing wrong? -- I"ll answer this!  I totally forgot to select the "Action" in the drop down.

2 answers

0 votes
Christian Schlaefcke
Contributor
February 11, 2020 edited

Ah you already ansered by updating your question ;-)

 

Any ideas what I am doing wrong? -- I"ll answer this! I totally forgot to select the "Action" in the drop down.

 

I also have "None" selected for Action and it seems to be allowed in general: Optionally set an action...

To bad it throws NPE anyway :-(

0 votes
Christian Schlaefcke
Contributor
February 11, 2020

Hi,

I am encountering the same issue - are there any updates on this?

Thx & Regards, Christian

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events