[Koha-bugs] [Bug 14417] New: Facet labels sorted incorrectly (OPAC) and inconsistently (OPAC vs Staff)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jun 18 21:52:27 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14417

            Bug ID: 14417
           Summary: Facet labels sorted incorrectly (OPAC) and
                    inconsistently (OPAC vs Staff)
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Searching
          Assignee: gmcharlt at gmail.com
          Reporter: nick at quecheelibrary.org
        QA Contact: testopia at bugs.koha-community.org

While working on Bug 14371 I noticed the line in opac-search.pl:
@$facets = sort {$a->{expand} cmp $b->{expand}} @$facets;

This seems to be intended to sort facets so that labels display in order in
search results, however, it doesn't work. 

'expand' contains the facet index code (su-geo, itype, au, se ...) instead of
the label value (Places, Item Types, Author, Series) so sorting doesn't work
out ('Places' sorts after 'Series')

The actual labels are assigned by and IF statement in opac-facets.inc and are
translatable so I think any sorting would have to be done post page creation
(javascript?)

No sorting of any kind is applied in catalog/search.pl, so facet results
between staff/opac don't match up.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list