Sub-task creation not working on-site but works fine in my local instance

Albert Hauksson [Tempo] December 17, 2014

Hi,

I recently configured Script Runner to create a sub-task when a certain issue type is created. I added a Post Function inside the workflow. The sub-task is created and it works fine.

However. When I set up the script (exactly like I did before) on my customers instance the script doesn't work at all. No sub-task is created and no error message is shown at all.

Do you have any suggestions to why this does not work? 

Thank you for your help.

1 answer

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 17, 2014

You'll need to check the application log for errors first.  Also, have you got the right permissions to create issues in the client site, and did you update ids if you've used them? (e.g if you said "sub task type = 42" on your system, it might be 65 on theirs)

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2014

Also check you published the workflow... if you did that, it will either work or you'll get an error of some sort.

Albert Hauksson [Tempo] December 22, 2014

Thank's for the answers. I've extracted the logs but I'm unable to make sense of them. I'd really appreciate your help :) Here is an excerpt from the log file: 2014-11-25 10:19:13,103 Thread-561 WARN tm-sandra 567x1855x1 1w98soo 10.155.40.25 /rest/plugins/1.0/installed-marketplace [onresolve.scriptrunner.runner.JqlFunctionsManagerImpl] Creating com.onresolve.jira.groovy.groovyrunner:jqlFunctionsCustomFieldType custom field. Reindexing required before some functions will work. 2014-11-25 10:34:40,543 http-bio-8080-exec-1 ERROR tm-sandra 634x15419x2 l22imx 10.155.40.35 /secure/QuickCreateIssue.jspa [atlassian.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event '[com.atlassian.jira.event.issue.IssueEvent@46d305b9[issue=STB-34,comment=<null>,worklog=<null>,changelog=<null>,eventTypeId=1,sendMail=true,params={eventsource=workflow, baseurl=http://jira:8080},subtasksUpdated=false], SingleParameterMethodListenerInvoker{method=public void com.onresolve.scriptrunner.runner.ScriptListener.workflowEvent(com.atlassian.jira.event.issue.IssueEvent), listener=com.onresolve.scriptrunner.runner.ScriptListener@6aaf8343}]' from the invoker 'java.lang.RuntimeException: java.lang.NullPointerException' 2014-11-25 10:39:44,731 http-bio-8080-exec-20 ERROR tm-sandra 639x15561x1 l22imx 10.155.40.35 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.admin.IssueEventGenerator [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: No such property: FilterUtils for class: com.onresolve.scriptrunner.canned.jira.admin.IssueEventGenerator groovy.lang.MissingPropertyException: No such property: FilterUtils for class: com.onresolve.scriptrunner.canned.jira.admin.IssueEventGenerator at com.onresolve.scriptrunner.canned.jira.admin.IssueEventGenerator.getOrCreateSearchRequest(IssueEventGenerator.groovy:108) at com.onresolve.scriptrunner.canned.jira.admin.IssueEventGenerator$getOrCreateSearchRequest.callCurrent(Unknown Source) at com.onresolve.scriptrunner.canned.jira.admin.IssueEventGenerator.doScript(IssueEventGenerator.groovy:92)

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 22, 2014

That makes sense... but it looks that exception is from using the "Generate Events" built-in script, which you didn't mention before... is that right?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 23, 2014

If they are using "generate events" it doesn't work... some of the very old and little-used stuff doesn't have test coverage, that's one of them. I fixed it up... let me know if you want a snapshot version. I don't really see how it relates to the issue of creating subtasks though.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events