When you insert/modify a z39.50 server to use it in derivate cataloguing you can insert 'rank': [it] lets you enter where in the list you'd like this target to appear. If this is left blank the targets will be in alphabetical order. If you use authority servers it is OK. If you use bibliographic servers it doesn't work Now z39.50 bibliographic servers are sorted by id (insert order). This is because now we use DBIx in cataloguing/z3950_search.pl without an 'order_by'. The patch inserts 'order_by' instruction To test it: 1)Insert 3-4 z39.50 biblio servers and insert different values into 'rank' fields. 2)See the if you change 'rank', the order doesn't change 3)Apply the patch 4)See that now order is based on 'rank' and 'servername'
Created attachment 38345 [details] [review] Patch for sorting z39.50 servers
Zeno, same code is used in cataloguing/z3950_search.pl, you need to copy/paste your change. (That's exactly why I did not want to see DBIx::Class queries in pl files...)
I meant acqui/z3950_search.pl
Created attachment 39214 [details] [review] Patch for sorting z39.50 servers IN acq The patch is for acqui/z3950_search.pl
To fix the bug you must applay the two patch. To test the second patch you need to use z39.50 inside an order into ACQ
Created attachment 39286 [details] [review] Bug 14047: Order z39.50 biblioservers in cataloguing Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 39287 [details] [review] Bug 14047: Sort z39.50 servers in Acquisition Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 39288 [details] [review] Bug 14047: [QA Follow-up] Move result_class back into attributes No need to put this into a separate call. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Note that we strictly speaking do not need the hashref inflator here, because TT understands hash.column as well as object.property.
Created attachment 39412 [details] [review] Bug 14047: Order z39.50 biblioservers in cataloguing Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 14047: Sort z39.50 servers in Acquisition Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 14047: [QA Follow-up] Move result_class back into attributes No need to put this into a separate call. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Note that we strictly speaking do not need the hashref inflator here, because TT understands hash.column as well as object.property. Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
To gain readability, I squashed the 3 patches. Marcel I hope you don't mind and you are fine with that.
Patch pushed to master. Thanks Zeno!
Pushed to 3.20.x will be in 3.20.1