Bug 9123 - Authorities search ordered by authid does not work
Summary: Authorities search ordered by authid does not work
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Fridolin Somers
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 9150
  Show dependency treegraph
 
Reported: 2012-11-21 10:03 UTC by Fridolin Somers
Modified: 2013-05-23 06:23 UTC (History)
2 users (show)

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


Attachments
Proposed patch (3.70 KB, patch)
2012-11-21 11:15 UTC, Fridolin Somers
Details | Diff | Splinter Review
Signed patch for 9123 (3.94 KB, patch)
2012-11-22 11:09 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[SINGED-OFF] Bug 9123: Authorities search ordered by authid does not work (4.01 KB, patch)
2012-12-02 00:17 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2012-11-21 10:03:33 UTC
In C4::AuthoritiesMarc::SearchAuthorities :
Search can be sorted by authid ascending or descending.
This sort is integrated in PQF query with attribute 7.

The bug is that default sorting with attribute 7 is alphabetic. To use a numerical sort, attribute 7 must be combined with attribute 4=109.
See http://www.indexdata.com/zebra/doc/querymodel-zebra.html (doc of attribute 7).

The sort by authid is use by Linker, but i provide a test plan on authorities search page, it is more easy :

Test plan :
-----------
- perform an authority search sorted by "Heading A-Z", for example on "Paul".
- you get and URL ending with :
cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&marclist=mainentry&and_or=and&operator=contains&value=paul&orderby=HeadingAsc
- edit this URL to replace "HeadingAsc" by "AuthidAsc" or "AuthidDsc"
- refresh page
- you get a table of authorities
- look at "Details" of each line, it is a hyperlink ending with authid of authority

Without patch, you get an odd order (order does not depend on authid length).
With patch, you get a correct numerical order.
Comment 1 Fridolin Somers 2012-11-21 11:15:59 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2012-11-21 16:31:56 UTC
Will be testing this further. Came across some funny effects while paging through a larger result set.
Comment 3 Marcel de Rooy 2012-11-22 11:06:20 UTC
(In reply to comment #2)
> Came across some funny effects while paging
> through a larger result set.
Submitted this under bug 9132.
Comment 4 Marcel de Rooy 2012-11-22 11:09:24 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2012-11-22 11:10:45 UTC
Should you also provide the ability to sort on this authid on the auth search form?
Comment 6 Marcel de Rooy 2012-11-22 11:12:12 UTC
Suggest that QA is done by someone that can also test behavior with dom indexing. Just to make sure ..
Comment 7 Fridolin Somers 2012-11-23 11:20:20 UTC
(In reply to comment #5)
> Should you also provide the ability to sort on this authid on the auth search form?

I think so, do you think it can be usefull.
Do we create a new enhancement ?
Comment 8 Marcel de Rooy 2012-11-26 08:33:39 UTC
(In reply to comment #7)
> I think so, do you think it can be usefull.
> Do we create a new enhancement ?
Alphabetical order is of course more useful, but if we include this search order, why hide it? You could open a new report for it in order to get this patch get pushed sooner.
Comment 9 Fridolin Somers 2012-11-27 08:20:31 UTC
> Alphabetical order is of course more useful, but if we include this search order, why hide it? You could open a new report for it in order to get this patch get pushed sooner.
Create bug 9150
Comment 10 Katrin Fischer 2012-12-02 00:17:36 UTC
Created attachment 13817 [details] [review]
[SINGED-OFF] Bug 9123: Authorities search ordered by authid does not work

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with Zebra, marc21, grs1.
Discovered that paging through auth search results does no longer work, but that is not related to these changes.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with Zebra, marc21, dom.
All tests pass.
Comment 11 Jared Camins-Esakov 2012-12-02 21:29:32 UTC
This patch has been pushed to master.
Comment 12 Chris Cormack 2012-12-03 07:01:27 UTC
Bugfix pushed to 3.10.x and 3.8.x, will be in 3.10.1 and 3.8.8