https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44063

--- Comment #3 from David Nind <[email protected]> ---
Created attachment 211518
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211518&action=edit
Bug 44063: Apply ComponentSortField and ComponentSortOrder to the component
parts search

get_components_query returns ( $query, $query_str, $sort ), but
get_marc_components only unpacked two of them:

  my ( $searchstr, $sort ) = $self->get_components_query;

so $sort held the query string instead of the sort, and the component
parts were never sorted by the preferences.

Take the sort from the right place.

To test:
1. Set UseControlNumber to Use and ShowComponentRecords to both
2. Create a host record with a 001 and a 003, and three records linked
   to it: Leader position 7 'a' and a 773 $w with the host's control
   number, with titles that sort differently from the order they were
   created in
3. Set ComponentSortField to title and ComponentSortOrder to 'from Z to A'
4. Open the host record in the staff interface and look at the
   Components tab
   => The components are not sorted from Z to A
5. Apply the patch and reload
   => The components are sorted from Z to A
6. Set ComponentSortOrder to 'from A to Z'
   => The components are sorted from A to Z
7. Run
   $ prove t/db_dependent/Koha/Biblio.t
   => SUCCESS: Tests pass!
8. Sign off

Signed-off-by: David Nind <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to