From: blake Date: Fri, 21 Jan 2022 16:37:16 +0000 (-0600) Subject: NOBLE custom Server-side stuff X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8bac1de0a5205ef2134443f3a2771fe5a320d94e;p=working%2FEvergreen.git NOBLE custom Server-side stuff Signed-off-by: blake --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm index c4e345562e..52cb3a3c13 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm @@ -908,11 +908,12 @@ sub toSQL { } # Build the badge-ish WITH query + # NOBLE changed badge math on SUM line my $pop_with = <<' WITH'; pop_with AS ( SELECT record, ARRAY_AGG(badge) AS badges, - SUM(s.score::NUMERIC*b.weight::NUMERIC)/SUM(b.weight::NUMERIC) AS total_score + SUM(s.score::NUMERIC*b.weight::NUMERIC)/(SELECT SUM(badge.weight::NUMERIC) from rating.badge) AS total_score FROM rating.record_badge_score s JOIN rating.badge b ON ( b.id = s.badge diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm index 2b6a6b4a22..da4c866a74 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm @@ -1437,11 +1437,11 @@ sub new_hold_copy_targeter { # reset prox list after trimming good copies $prox_list = create_prox_list( $self, $pu_lib, - [ grep { $_->status == 0 || $_->status == 7 } @good_copies ], + [ grep { $_->status == 0 || $_->status == 7 || $_->status == 107 } @good_copies ], $hold, $hold_copy_map ); - $all_copies = [ grep { ''.$_->circ_lib ne $pu_lib && ( $_->status == 0 || $_->status == 7 ) } @good_copies ]; + $all_copies = [ grep { ''.$_->circ_lib ne $pu_lib && ( $_->status == 0 || $_->status == 7 || $_->status == 107 ) } @good_copies ]; my $min_prox = [ sort {$a<=>$b} keys %$prox_list ]->[0]; my $best; @@ -1828,7 +1828,7 @@ sub reservation_targeter { next; } - if ($copy->status->id == 0 || $copy->status->id == 7) { + if ($copy->status->id == 0 || $copy->status->id == 7 || $copy->status == 107) { push @good_resources, $res; next; } diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm index 0c1f0a5cad..69f3ff74fc 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm @@ -795,7 +795,7 @@ sub patron_search { my @ns; my @namev; if ($nv) { - $name = "name_kw_tsvector @@ to_tsquery(?)"; + $name = "name_kw_tsvector @@ to_tsquery('simple', ?)"; # Remove characters that to_tsquery might treat as operators. # Note using plainto_tsquery to ignore operators won't let us diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index 5763cb8e03..5fa1c909f0 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -155,6 +155,8 @@ sub load { return $self->load_library if $path =~ m|opac/library|; return $self->load_rresults if $path =~ m|opac/results|; + # NOBLE + return $self->load_rresults if $path =~ m|opac/bookbag|; return $self->load_print_or_email_preview('print') if $path =~ m|opac/record/print_preview|; return $self->load_print_record if $path =~ m|opac/record/print|; return $self->load_record if $path =~ m|opac/record/\d|; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm index 2728f36460..3a7d8bd190 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm @@ -2184,7 +2184,8 @@ sub sru_search { } } - $quote_it = 0 if ( $base eq 'all' ); + #$quote_it = 0 if ( $base eq 'all' ); #NOBLE don't quote keyword for ComCat + $quote_it = 0 if ( $base eq 'all' || ( $base eq '=' && grep {$qualifier eq $_} qw(eg.keyword eg.title eg.author) ) ); $term = maybeQuote($term) if $quote_it; } else {