How can I use 'Copy Value From Other Field' workflow post function for Labeles

Naama Lev
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.
June 15, 2017

Hi, 

I am trying to use ' 'Copy Value From Other Field' workflow post function in a subtask workflow. So upon creation, the Labels field will be copied from the parent to the subtask.

The  'Copy Value From Other Field' workflow post function is working for me on subtasks for Assignee and description, but when I am trying to apply to 'Labels' I get an  error in the log

Can you please help my understand what is the Issue?

Thanks!

Naama

 

 

 




2 answers

1 vote
Alex Gallien September 10, 2019

Reviving a dead thread, but when faced with this problem just now I had to move my post functions below the Create Issue Originally post function.

0 votes
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2017

Hello Naama,

Can you please share what is the exact error in the log file?

Naama Lev
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.
June 18, 2017

Hi Tarun, 

Thanks for your answer! please see below

2017-06-16 12:24:58,384 http-bio-8443-exec-23914 ERROR naama 744x6265456x1 10qivbf 211.30.192.120,10.1.8.105 /secure/QuickCreateIssue.jspa [c.g.j.workflow.function.CopyValueFromOtherFieldPostFunction] Unable to copy value from field 'Labels' to 'Labels'.
com.atlassian.jira.util.dbc.Assertions$NullArgumentException: issueId should not be null!
 at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:25)
 at com.atlassian.jira.issue.label.DefaultLabelManager.setLabels(DefaultLabelManager.java:74)
 at sun.reflect.GeneratedMethodAccessor64117.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
 at com.sun.proxy.$Proxy75.setLabels(Unknown Source)
 ... 2 filtered
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
 at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
 at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
 at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
 at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
 at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
 at com.sun.proxy.$Proxy3028.setLabels(Unknown Source)
 at com.googlecode.jsu.util.WorkflowUtils.setFieldValue(WorkflowUtils.java:758)
 at com.googlecode.jsu.util.WorkflowUtils.setFieldValue(WorkflowUtils.java:1045)
 at com.googlecode.jsu.workflow.function.CopyValueFromOtherFieldPostFunction.executeFunction(CopyValueFromOtherFieldPostFunction.java:87)
 at com.googlecode.jsu.workflow.function.AbstractPreserveChangesPostFunction.execute(AbstractPreserveChangesPostFunction.java:54)
 at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1050)
 at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1446)
 at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:615)
 at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:741)
 at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:580)
 at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:494)
 at com.atlassian.jira.bc.issue.DefaultIssueService.create(DefaultIssueService.java:230)
 at com.atlassian.jira.bc.issue.DefaultIssueService.create(DefaultIssueService.java:199)
 ... 2 filtered
 at java.lang.reflect.Method.invoke(Method.java:498)
 at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
 at com.sun.proxy.$Proxy278.create(Unknown Source)
 ... 2 filtered
 at java.lang.reflect.Method.invoke(Method.java:498)
 at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)
 at com.sun.proxy.$Proxy278.create(Unknown Source)
 at com.atlassian.jira.quickedit.action.QuickCreateIssue.doExecute(QuickCreateIssue.java:308)
 ... 1 filtered
 at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
 ... 7 filtered
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
 ... 17 filtered
 at com.softwareplant.ppm.structureint.jiraserver.event.PluginIssueLinkListener.doFilter(PluginIssueLinkListener.java:55)
 ... 36 filtered
 at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
 ... 62 filtered
 at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
 ... 88 filtered
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Thread.java:745)
2017-06-16 12:24:58,389 http-bio-8443-exec-23914 ERROR naama 744x6265456x1 10qivbf 211.30.192.120,10.1.8.105 /secure/QuickCreateIssue.jspa [c.a.j.bc.issue.DefaultIssueService] Error creating issue: 
com.atlassian.jira.exception.CreateException: Unable to copy value from field 'Labels' to 'Labels'.
 at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:588)
 at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:494)
 at com.atlassian.jira.bc.issue.DefaultIssueService.create(DefaultIssueService.java:230)
 at com.atlassian.jira.bc.issue.DefaultIssueService.create(DefaultIssueService.java:199)
 at sun.reflect.GeneratedMethodAccessor2676.invoke(Unknown Source)
 ... 1 filtered
 at java.lang.reflect.Method.invoke(Method.java:498)
 at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
 at com.sun.proxy.$Proxy278.create(Unknown Source)
 ... 2 filtered
 at java.lang.reflect.Method.invoke(Method.java:498)
 at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)
 at com.sun.proxy.$Proxy278.create(Unknown Source)
 at com.atlassian.jira.quickedit.action.QuickCreateIssue.doExecute(QuickCreateIssue.java:308)
 ... 1 filtered
 at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
 ... 7 filtered
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
 ... 17 filtered
 at com.softwareplant.ppm.structureint.jiraserver.event.PluginIssueLinkListener.doFilter(PluginIssueLinkListener.java:55)
 ... 36 filtered
 at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
 ... 62 filtered
 at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
 ... 88 filtered
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Thread.java:745)
Caused by: com.atlassian.jira.workflow.WorkflowException: Unable to copy value from field 'Labels' to 'Labels'.
 at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:760)
 at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:580)
 ... 234 more
Caused by: com.opensymphony.workflow.WorkflowException: Unable to copy value from field 'Labels' to 'Labels'.
 at com.googlecode.jsu.workflow.function.CopyValueFromOtherFieldPostFunction.executeFunction(CopyValueFromOtherFieldPostFunction.java:96)
 at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1050)
 at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1446)
 at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:615)
 at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:741)
 ... 235 more

Suggest an answer

Log in or Sign up to answer