Bug 14047 - Sort z39.50 biblio servers by rank in derivate cataloguing doesn't work
Summary: Sort z39.50 biblio servers by rank in derivate cataloguing doesn't work
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Zeno Tajoli
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-22 14:42 UTC by Zeno Tajoli
Modified: 2016-12-05 21:22 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Patch for sorting z39.50 servers (981 bytes, patch)
2015-04-22 15:15 UTC, Zeno Tajoli
Details | Diff | Splinter Review
Patch for sorting z39.50 servers IN acq (973 bytes, patch)
2015-05-15 14:57 UTC, Zeno Tajoli
Details | Diff | Splinter Review
Bug 14047: Order z39.50 biblioservers in cataloguing (1.00 KB, patch)
2015-05-18 17:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 14047: Sort z39.50 servers in Acquisition (990 bytes, patch)
2015-05-18 17:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 14047: [QA Follow-up] Move result_class back into attributes (1.94 KB, patch)
2015-05-18 17:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 14047: Order z39.50 biblioservers in cataloguing (2.00 KB, patch)
2015-05-22 14:14 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Zeno Tajoli 2015-04-22 14:42:53 UTC
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'
Comment 1 Zeno Tajoli 2015-04-22 15:15:02 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2015-04-29 09:25:20 UTC
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...)
Comment 3 Jonathan Druart 2015-04-29 09:26:17 UTC
I meant acqui/z3950_search.pl
Comment 4 Zeno Tajoli 2015-05-15 14:57:30 UTC Comment hidden (obsolete)
Comment 5 Zeno Tajoli 2015-05-15 14:59:23 UTC
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
Comment 6 Marcel de Rooy 2015-05-18 17:15:35 UTC Comment hidden (obsolete)
Comment 7 Marcel de Rooy 2015-05-18 17:15:39 UTC Comment hidden (obsolete)
Comment 8 Marcel de Rooy 2015-05-18 17:15:42 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2015-05-22 14:14:19 UTC
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>
Comment 10 Jonathan Druart 2015-05-22 14:15:22 UTC
To gain readability, I squashed the 3 patches.
Marcel I hope you don't mind and you are fine with that.
Comment 11 Tomás Cohen Arazi 2015-06-01 17:35:35 UTC
Patch pushed to master.

Thanks Zeno!
Comment 12 Chris Cormack 2015-06-03 20:52:21 UTC
Pushed to 3.20.x will be in 3.20.1