LP#1308239 Support pre-cat copy hold targeting
authorBill Erickson <berick@esilibrary.com>
Tue, 25 Jun 2013 13:32:48 +0000 (09:32 -0400)
committerBen Shum <bshum@biblio.org>
Thu, 10 Jul 2014 19:13:00 +0000 (15:13 -0400)
Remove an unused line of code in the hold targeter which was preventing
targeting of pre-cat copies.

In OpenILS::Utils::PermitHold::permit_copy_hold, neither in-db nor
script based hold viability checks inspect the value of the
"title_descriptor" field in the provided params.  Remove this field and
pre-cats just work.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm

index 7cc2086..0452676 100644 (file)
@@ -1823,7 +1823,6 @@ sub new_hold_copy_targeter {
                     ) &&
                 ( OpenILS::Utils::PermitHold::permit_copy_hold(
                     { title => $old_best->call_number->record->to_fieldmapper,
                     ) &&
                 ( OpenILS::Utils::PermitHold::permit_copy_hold(
                     { title => $old_best->call_number->record->to_fieldmapper,
-                      title_descriptor => $old_best->call_number->record->record_descriptor->next->to_fieldmapper,
                       patron => $hold->usr->to_fieldmapper,
                       copy => $old_best->to_fieldmapper,
                       requestor => $hold->requestor->to_fieldmapper,
                       patron => $hold->usr->to_fieldmapper,
                       copy => $old_best->to_fieldmapper,
                       requestor => $hold->requestor->to_fieldmapper,
@@ -2260,7 +2259,6 @@ sub choose_nearest_copy {
         while (my ($c) = splice(@capturable, $rand, 1)) {
             return $c if !exists($seen{$c->id}) && ( OpenILS::Utils::PermitHold::permit_copy_hold(
                 { title => $c->call_number->record->to_fieldmapper,
         while (my ($c) = splice(@capturable, $rand, 1)) {
             return $c if !exists($seen{$c->id}) && ( OpenILS::Utils::PermitHold::permit_copy_hold(
                 { title => $c->call_number->record->to_fieldmapper,
-                  title_descriptor => $c->call_number->record->record_descriptor->next->to_fieldmapper,
                   patron => $hold->usr->to_fieldmapper,
                   copy => $c->to_fieldmapper,
                   requestor => $hold->requestor->to_fieldmapper,
                   patron => $hold->usr->to_fieldmapper,
                   copy => $c->to_fieldmapper,
                   requestor => $hold->requestor->to_fieldmapper,