[open-ils-commits] r19331 - in trunk/Open-ILS: src/perlmods/OpenILS/Application xul/staff_client/server/cat (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Jan 29 13:03:29 EST 2011


Author: dbs
Date: 2011-01-29 13:03:26 -0500 (Sat, 29 Jan 2011)
New Revision: 19331

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
   trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
Log:
For more predictable authority browse results, use startwith until browse is sorted out

authority_tag_sf_browse() was returning unexpected results when only a small
set of authority records was loaded. This may be an indication of a corner
case, but until we sort that out the more straightforward startwith should
be used.

Also, chop the final character of the incoming search value to ensure
that an exact match is returned on page 0 instead of page -1. For example,
'Bacon, Jono.' becomes 'Bacon, Jono' for the search. (The right thing to
do, come to think of it, is probably to naco_normalize the incoming value;
perhaps next patch).


Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm	2011-01-29 05:16:37 UTC (rev 19330)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm	2011-01-29 18:03:26 UTC (rev 19331)
@@ -1498,10 +1498,14 @@
 
     my $tag = shift;
     my $subfield = shift;
+
     my $value = shift;
     my $limit = shift || 10;
     my $page = shift || 0;
 
+	# Chop the last character from the incoming value to return it on page 0
+	chop($value);
+
     my $ref_limit = $limit;
     my $offset = $limit * abs($page);
     my $_storage = OpenSRF::AppSession->create( 'open-ils.cstore' );

Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js	2011-01-29 05:16:37 UTC (rev 19330)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js	2011-01-29 18:03:26 UTC (rev 19331)
@@ -2375,7 +2375,8 @@
         page = 0;
     }
 
-    var url = '/opac/extras/browse/marcxml/'
+    /* temporarily use 'startwith' instead of 'browse' until browse is repaired */
+    var url = '/opac/extras/startwith/marcxml/'
         + type + '.refs'
         + '/1' // OU - currently unscoped
         + '/' + sf.toString()



More information about the open-ils-commits mailing list