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

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

 

 

 




1 answer

0 vote
Tarun Sapra Community Champion Jun 16, 2017

Hello Naama,

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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

75 views 0 5
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