[open-ils-commits] [GIT] Evergreen ILS branch rel_2_8 updated. 5a20b1e93aa2fdd5695c4a483e3fade0c5a66ab3

Evergreen Git git at git.evergreen-ils.org
Wed Jan 13 08:50:38 EST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_8 has been updated
       via  5a20b1e93aa2fdd5695c4a483e3fade0c5a66ab3 (commit)
      from  39cd8725b42ec2312ff238bf3367784477172dca (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5a20b1e93aa2fdd5695c4a483e3fade0c5a66ab3
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Dec 3 16:13:09 2015 -0500

    LP#1522538: Improper detection of jtitle search type
    
    Before this change, the system would only check the first qtype URL parameter
    to see if it needed to apply the journal title "bib_level(s)" filter.  Instead
    it should check each qtype in turn while it turns an advanced search into a
    simple search string.  Here the code is moved into place to accomplish that.
    
    To test, load all test datasets into a fresh database.  Perform an advanced
    search on journal title for "proceedings" (no quotes) using the second search
    input row.  Before this commit, two records are retrieved.  After, only one
    is retrieved.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index 19f3a25..8123147 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -26,8 +26,10 @@ sub _prepare_biblio_search_basics {
         next unless $query =~ /\S/;
 
         # Hack for journal title
+        my $jtitle = 0;
         if ($qtype eq 'jtitle') {
             $qtype = 'title';
+            $jtitle = 1;
         }
 
         # This stuff probably will need refined or rethought to better handle
@@ -49,6 +51,12 @@ sub _prepare_biblio_search_basics {
             $query = '^' . $query;
             $query = ('"' . $query . '"') if index $query, ' ';
         }
+
+        # Journal title hackery complete
+        if ($jtitle) {
+            $query = "bib_level(s) $query";
+        }
+
         $query = "$qtype:$query" unless $qtype eq 'keyword' and $i == 0;
 
         $bool = ($bool and $bool eq 'or') ? '||' : '&&';
@@ -91,11 +99,6 @@ sub _prepare_biblio_search {
         $query = "container(bre,bookbag," . int($cgi->param("bookbag")) . ") $query";
     }
 
-    # Journal title hackery complete
-    if ($cgi->param("qtype") && $cgi->param("qtype") eq "jtitle") {
-        $query = "bib_level(s) $query";
-    }
-
     if ($cgi->param('pubdate') && $cgi->param('date1')) {
         if ($cgi->param('pubdate') eq 'between') {
             my $btw = 'between(' . $cgi->param('date1');

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list