We have a few saved templates in JIRA. But these template is no longer shown in the subtask template page which is accessible from the project admin page. The template page is now a blank page. These previously saved templates cannot be used in JIRA anymore. If I create a new template in a project which has no template before, it still works.
We are on JIRA 7.1.4 and Quick Subtask plugin 4.3.0.
Here is the error in the log.
2016-07-13 13:01:30,585 ajp-nio-8009-exec-123 ERROR Lai_Dai 781x3762084x4 16jjex 10.17.4.148 /rest/subtasks/1.0/repository/project/TSBIR [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: java.util.HashSet cannot be cast to java.util.List java.lang.ClassCastException: java.util.HashSet cannot be cast to java.util.List at com.hascode.plugin.quick_subtasks.dao.SubtasksTemplateProviderImpl.deserializeTemplates(SubtasksTemplateProviderImpl.java:64) at com.hascode.plugin.quick_subtasks.dao.SubtasksTemplateProviderImpl.templatesByProject(SubtasksTemplateProviderImpl.java:54) at com.hascode.plugin.quick_subtasks.dao.SubtasksTemplateProviderImpl.templatesForProject(SubtasksTemplateProviderImpl.java:48) at com.hascode.plugin.quick_subtasks.rest.SubtasksTemplateRestService.getProjectTemplates(SubtasksTemplateRestService.java:132) at com.hascode.plugin.quick_subtasks.rest.SubtasksTemplateRestService.getSubtaskTemplatesForProject(SubtasksTemplateRestService.java:95) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) ... 19 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68) ... 91 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 16 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37) ... 22 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:169) at com.atlassian.servicedesk.internal.util.scala.ScalaJavaInterOp$1.apply(ScalaJavaInterOp.java:25) at com.atlassian.servicedesk.internal.utils.context.CustomerContextUtil$.outOfCustomerContext(CustomerContextUtil.scala:48) at com.atlassian.servicedesk.internal.utils.context.CustomerContextUtil.outOfCustomerContext(CustomerContextUtil.scala) at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.outOfCustomerContext(CustomerContextServiceImpl.java:24) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:164) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:120) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:112) ... 54 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)
Please advise how to fix this issue and recover previously saved templates
From which JIRA version did you upgrade to JIRA 7.1.4?
Which was your JIRA version and the plugin's version before the update to JIRA 7.1.4 and plugin 4.3.0?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a critical issue for my users now as new templates cannot be created and saved if templates were created before. Please provide the solution asap. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems as if the database migration converting from the old to the new storage format has not been applied to your JIRA instance. I'l try to provide you with a temporary patch that should convert all templates from the old to the new format - otherwise you could remove all existing templates directly from the database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have created an issue in the project's issue tracker and I have provided an individual upgrade script for you there with detailed instructions how to proceed. Please feel free to switch to this channel for further communication:
https://bitbucket.org/hascode/jira-quick-subtasks/issues/290/error-after-jira-upgrade
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Micha for the patch.
I will test the patch in staging first before applying it in my prod.
BTW, do you have a database query to find the projects against which have sub-task templates created?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.