Unable to add/edit Asset post functions in Jira workflows

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When trying to create or edit Assets Post functions, got an Error 500 error message.


Environment

This article applies to JSM DC below 5.16.X

Diagnosis

In atlassian-jira.log, you will find errors like the ones below:

2024-04-02 11:00:57,965-0400 http-nio-8080-exec-6 url: /secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa, /secure/admin/views/workflow/addworkflowtransitiondescriptorparams.jsp; user: [email] ERROR [email] 660x94747x1 15j2oyx localhost /secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa [webwork.util.ValueStack] query="/descriptorHtml" {[id="null" type="5" values=""]} {[id="descriptorHtml" type="8" values=""]}
java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor8856.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
	at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
	at webwork.util.ValueStack.findValue(ValueStack.java:417)
	at webwork.util.ValueStack.findValue(ValueStack.java:216)
	at webwork.view.taglib.WebWorkBodyTagSupport.findValue(WebWorkBodyTagSupport.java:62)
	at webwork.view.taglib.BasicPropertyTag.doStartTag(BasicPropertyTag.java:54)
	at jsp.secure.admin.views.workflow.addworkflowtransitiondescriptorparams_jsp._jspx_meth_ww_005fproperty_005f4(addworkflowtransitiondescriptorparams_jsp.java:1081)
	at jsp.secure.admin.views.workflow.addworkflowtransitiondescriptorparams_jsp._jspx_meth_page_005fparam_005f6(addworkflowtransitiondescriptorparams_jsp.java:957)
	at jsp.secure.admin.views.workflow.addworkflowtransitiondescriptorparams_jsp._jspx_meth_page_005fapplyDecorator_005f0(addworkflowtransitiondescriptorparams_jsp.java:262)
	at jsp.secure.admin.views.workflow.addworkflowtransitiondescriptorparams_jsp._jspService(addworkflowtransitiondescriptorparams_jsp.java:115)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
	... 48 filtered
	at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:55)
	... 4 filtered
	at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:54)
	... 3 filtered
	at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
	... 34 filtered
	at com.resolution.atlasplugins.samlsso.servlet.RedirectToSsoFilter.doFilter(RedirectToSsoFilter.java:45)
	... 3 filtered
	at com.atlassian.oauth2.scopes.web.ReadWriteScopeFilter.doFilter(ReadWriteScopeFilter.java:46)
	... 3 filtered
	... 20 filtered
	at com.intenso.jira.plugin.customfield.dynamicselect.util.contentinjection.filter.ContentInjectionFilter.doFilter(ContentInjectionFilter.java:42)
	... 27 filtered
	at com.resolution.atlasplugins.samlsso.servlet.RedirectToSsoFilter.doFilter(RedirectToSsoFilter.java:53)
2024-04-02 11:00:58,006-0400 http-nio-8080-exec-6 url: /secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa, /secure/admin/views/workflow/addworkflowtransitiondescriptorparams.jsp; user: [email] WARN [email] 660x94747x1 15j2oyx localhost /secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa [c.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.NullPointerException - null'.
2024-04-02 11:01:04,349-0400 http-nio-8080-exec-25 ERROR      [o.a.c.c.C.[.[localhost].[/].[action]] Servlet.service() for servlet [action] in context with path [] threw exception [java.lang.IllegalArgumentException: Cannot find expected argument 'type' in parameters.] with root cause
java.lang.IllegalArgumentException: Cannot find expected argument 'type' in parameters.
2024-04-02 11:01:04,387-0400 http-nio-8080-exec-25 url: /internal-error ERROR      [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=d4d032c8-1be2-4524-8498-59f6d95f8978, interpretedMsg=, cause=java.lang.IllegalArgumentException: Cannot find expected argument 'type' in parameters., stacktrace=java.lang.IllegalArgumentException: Cannot find expected argument 'type' in parameters.
    	at com.atlassian.jira.plugin.workflow.AbstractWorkflowPluginFactory.extractSingleParam(AbstractWorkflowPluginFactory.java:97) [jira-api-9.12.5.jar:?]
    	at com.riadalabs.jira.plugins.insight.services.jira.workflow.InsightPostFunctionFactory.getDescriptorParams(InsightPostFunctionFactory.java:97) [?:?]
    	at com.atlassian.jira.web.action.admin.workflow.AddWorkflowTransitionFunctionParams.addWorkflowDescriptor(AddWorkflowTransitionFunctionParams.java:74) [classes/:?]
    	at com.atlassian.jira.web.action.admin.workflow.AbstractAddWorkflowTransitionDescriptorParams.doExecute(AbstractAddWorkflowTransitionDescriptorParams.java:76) [classes/:?]
    	at webwork.action.ActionSupport.execute(ActionSupport.java:165) [webwork-1.4-atlassian-31.jar:?]
    	at com.atlassian.jira.web.action.JiraWebActionSupport.execute(JiraWebActionSupport.java:1382) [jira-api-9.12.5.jar:?]
    	    	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:9.0.85]
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.85]
    	at java.base/java.lang.Thread.run(Thread.java:829) [?:?]
    , referer=https://localhost/secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa?workflowName=%5BATSD%5D+General+Request+Workflow+-+Service+or+Software&workflowMode=draft&descriptorTab=postfunctions&workflowTransition=1&pluginModuleKey=com.riadalabs.jira.plugins.insight%3Ainsight-post-function&atl_token=BY2W-VXBM-2C9L-N18N_e36b423f510a956f5689e321709718b9b80429e3_lin, servletErrorMessage=}

Cause

The cause of this behavior is the lack of permission when set to Only Jira system administrator 

Solution

Please navigate to Administration > Manage apps > Assets allowlist > Edit settings > Assets script configuration and check what are the current settings under Who can use the Assets script console. There are two possible options:

  • Jira administrators and Jira system administrators
  • Only Jira system administrator

By default, Only Jira system administrator is selected.

Change it to Jira administrators and Jira system administrators and test it again.

Last modified on Jan 28, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.