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

Unable to Sort Search Results by Select List Custom Field if the Field Search Template is Configured to None

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Low
    • None
    • 4.4, 4.4.1, 4.4.2, 5.0, 4.4.3, 5.2-m05, 6.0, 6.1.3, 6.2
    • Issue - Fields

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Upon performing a search via Issue Navigator, it is not possible to sort the results by select list custom field column if we configured the field search template to None. Upon sorting the search results, JIRA will crash with the following error is produced:

      2011-11-21 21:38:19,111 http-8080-3 ERROR admin 1298x89x1 y1uzzy 127.0.0.1 /secure/ViewUserIssueColumns!default.jspa [webwork.util.ValueStack] query="/sampleIssues" {[id="null" type="5" values=""]} {[id="sampleIssues" type="8" values=""]}
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
      	at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
      	at webwork.util.ValueStack.findValue(ValueStack.java:414)
      	at webwork.util.SimpleTest.test(SimpleTest.java:408)
      	at webwork.util.ValueStack.test(ValueStack.java:157)
      	at webwork.view.taglib.IfTag.doStartTag(IfTag.java:40)
      	at org.apache.jsp.secure.views.user.viewuserissuecolumns_jsp._jspService(viewuserissuecolumns_jsp.java:579)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      .....
      Caused by: java.lang.ClassCastException: com.atlassian.jira.issue.customfields.option.LazyLoadedOption cannot be cast to java.lang.String
      	at com.atlassian.jira.issue.customfields.impl.SelectCFType.compare(SelectCFType.java:40)
      	at com.atlassian.jira.issue.fields.CustomFieldImpl.compare(CustomFieldImpl.java:1740)
      	at com.atlassian.jira.issue.fields.CustomFieldImpl$CustomFieldIssueSortComparator.compare(CustomFieldImpl.java:1801)
      	at com.atlassian.jira.issue.search.parameters.lucene.sort.IssueSortComparator.compare(IssueSortComparator.java:57)
      	at com.atlassian.jira.issue.search.parameters.lucene.sort.DocumentSortComparatorSource$1.compare(DocumentSortComparatorSource.java:37)
      	at org.apache.lucene.search.FieldSortedHitQueue.lessThan(FieldSortedHitQueue.java:130)
      	at org.apache.lucene.util.PriorityQueue.upHeap(PriorityQueue.java:270)
      .....

      Steps to reproduce the problem:

      • Create a custom field of the type Select List, and configure the field search template to "None"
      • Configure the value option for the field
      • Create a couple of test issues and populate the field with the defined value
      • Perform searches in the Issue Navigator, and add the custom field as a navigator column
      • Try to sort the results.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              afaisal Ahmad Faisal (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: