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

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

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)

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

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)

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?

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
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,321 views 0 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you