LP1797934: Search for reservations by current_resource user/sandbergja/lp1797934_add_patrons_booking_reservations_to_the_OPAC
authorJane Sandberg <sandbej@linnbenton.edu>
Wed, 6 Feb 2019 22:37:33 +0000 (14:37 -0800)
committerJane Sandberg <sandbej@linnbenton.edu>
Wed, 6 Feb 2019 22:37:33 +0000 (14:37 -0800)
Searches for reservations by current_resource, rather
than target_resource in the OPAC display of a patron's
reservations. This is because some reservations (those placed
using the "Reserve Any" button) have a current_resource,
but no target_resource.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm

index 936552e..67545f6 100644 (file)
@@ -634,7 +634,7 @@ sub upcoming_reservation_list_by_user {
         'brt' => [{'column' => 'name', 'alias' => 'resource_type_name'}],
         'aou' => ['shortname', {'column' => 'name', 'alias' => 'pickup_name'}] };
 
-    my $from = { 'bresv' => {'brsrc' => {'field' => 'id', 'fkey' => 'target_resource'},
+    my $from = { 'bresv' => {'brsrc' => {'field' => 'id', 'fkey' => 'current_resource'},
         'brt' => {'field' => 'id', 'fkey' => 'target_resource_type'},
         'aou' => {'field' => 'id', 'fkey' => 'pickup_lib'}} };