Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-76320

500 error viewing filter that searches for EMPTY in a Labels type field

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 8.13.0, 8.20.11
    • Navigation - Filters
    • None

    Description

      Issue Summary

      When accessing a saved filter with a search like "mylabels in(EMPTY)" where "mylabels" is a Labels type custom field, although the search works and the user is able to save the filter, returning to it afterward will return a 500 error.

      Steps to Reproduce

      1. Create a new custom field of "Labels" type and name it "mylabels"
      2. Do a search for "mylabels in(EMPTY)"
      3. Save it as a new filter
      4. Navigate to "Manage Filters"
      5. Click on the saved filter

      Expected Results

      The filter and results are shown

      Actual Results

      "Sorry, we had some technical problems during your last operation."

      2023-08-08 11:14:35,869+0200 http-nio-8080-exec-272 ERROR xxxx 674x11971786x1 1brn4ah 121.243.89.78,53.137.168.34,10.6.254.22,53.137.128.147,10.6.254.22,53.137.139.6,10.6.254.21,127.0.0.1 /issues/ [c.a.j.web.filters.CommittedResponseHtmlErrorRecoveryFilter] Exception occurred after HTTP re
      sponse was already committed: java.lang.ClassCastException: class com.atlassian.query.operand.EmptyOperand cannot be cast to class com.atlassian.query.operand.SingleValueOperand (com.atlassian.query.operand.EmptyOperand and com.atlassian.query.operand.SingleValueOperand are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @2063e93a)
      
      2023-08-08 11:14:36,054+0200 http-nio-8080-exec-272 ERROR xxxx 674x11971786x1 1brn4ah 121.243.89.78,53.137.168.34,10.6.254.22,53.137.128.147,10.6.254.22,53.137.139.6,10.6.254.21,127.0.0.1 /issues/ [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=53f46757-c586-409d-99f4-d68891683d12, interpretedMsg=, cause=java.lang.ClassCastException: class com.atlassian.query.operand.EmptyOperand cannot be cast to class com.atlassian.query.operand.SingleValueOperand (com.atlassian.query.operand.EmptyOperand and com.atlassian.query.operand.SingleValueOperand are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @2063e93a), stacktrace=java.lang.ClassCastException: class com.atlassian.query.operand.EmptyOperand cannot be cast to class com.atlassian.query.operand.SingleValueOperand (com.atlassian.query.operand.EmptyOperand and com.atlassian.query.operand.SingleValueOperand are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @2063e93a)
              at com.atlassian.jira.issue.search.searchers.transformer.CustomFieldLabelsSearchInputTransformer.getOperandValue(CustomFieldLabelsSearchInputTransformer.java:116) [classes/:?]
              at com.atlassian.jira.issue.search.searchers.transformer.CustomFieldLabelsSearchInputTransformer.getQueryInputPlaceHolder(CustomFieldLabelsSearchInputTransformer.java:100) [classes/:?]
              at com.atlassian.jira.issue.search.searchers.transformer.CustomFieldLabelsSearchInputTransformer.doRelevantClausesFitFilterForm(CustomFieldLabelsSearchInputTransformer.java:78) [classes/:?]
              at com.atlassian.jira.bc.issue.search.DefaultSearchService.calculateDoesQueryFitFilterForm(DefaultSearchService.java:376) [classes/:?]
              at com.atlassian.jira.bc.issue.search.DefaultSearchService.doesQueryFitFilterForm(DefaultSearchService.java:108) [classes/:?]
              at jdk.internal.reflect.GeneratedMethodAccessor2740.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 com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) [atlassian-plugins-core-5.5.8.jar:?]
              at com.sun.proxy.$Proxy291.doesQueryFitFilterForm(Unknown Source) [?:?]
              at jdk.internal.reflect.GeneratedMethodAccessor2740.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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) [spring-aop-5.3.19.jar:5.3.19]
              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:186) [spring-aop-5.3.19.jar:5.3.19]
              at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137) [spring-aop-5.3.19.jar:5.3.19]
              at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) [spring-aop-5.3.19.jar:5.3.19]
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.3.19.jar:5.3.19]
              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) [?:?]
              ...
              ...
              
      

      Workaround

      The filter can be accessed when it is displayed on the Favourites bar on the left.
      To fix the filter do:

      1. Go to Manage Filter
      2. Search for the filter that cannot be viewed
      3. Add it to your favorites by adding a star to it
      4. Click on any other filter that can be viewed correctly.
      5. Click the name of the filter now showing on the left panel as a favorite.
      6. Remove the "EMPTY" search and hit Enter to search.
      7. Save the filter

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ayanar Alp
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: