[open-ils-commits] [GIT] Evergreen ILS branch rel_2_9 updated. 5d76887d066955e02150194ea40123b0d6f4def2
Evergreen Git
git at git.evergreen-ils.org
Tue Nov 17 12:07:52 EST 2015
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_9 has been updated
via 5d76887d066955e02150194ea40123b0d6f4def2 (commit)
from 5a3875a9341caf013c40323090fc1e6848a81aba (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 5d76887d066955e02150194ea40123b0d6f4def2
Author: Steven Chan <schan at sitka.bclibraries.ca>
Date: Thu Sep 19 12:51:35 2013 -0700
Fix LP1175711, OPAC can't renew item on booking resource list
A test sequence to show the behaviour before and after the fix:
1. Using staff client, check out an item to test account.
2. Go to Copy Details on the OPAC, click Book Now, and cancel the form;
the side effect is to put the item on the Resource list.
3. Using the OPAC on a web browser, log in with test account.
4. Go to Items Checked Out, select the item in the list and click Renew
Selected Items.
Before the fix, we saw the OPAC spin forever, and we saw the Javascript
console of the web browser log the error noted in previous comments.
With the fix, we see an error prompt saying, 'The system is unable to
renew the selected item at this time. This usually means the item is
needed to fulfill a hold. Please see a librarian for further help.'
Note: A patron with the normal group of permissions will not be able to
renew an item on resource list.
The fix is to check for an error object emitted by the function
Booking.pm/reservation_list_by_filters(), and to propagate it back to
the client, by returning a call to bail_on_events().
We also clarify the coding of the function's parameter list and how the
function checks for mandatory parameters.
Signed-off-by: Steven Chan <schan at sitka.bclibraries.ca>
Signed-off-by: Josh Stompro <stomproj at larl.org>
Signed-off-by: Kathy Lussier <klussier at masslnc.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm
index 00bcab8..bb38731 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm
@@ -492,7 +492,13 @@ sub reservation_list_by_filters {
my $filters = shift;
my $whole_obj = shift;
- return undef unless ($filters->{user} || $filters->{user_barcode} || $filters->{resource} || $filters->{type} || $filters->{attribute_values});
+ return undef unless (
+ $filters->{user}
+ || $filters->{user_barcode}
+ || $filters->{resource}
+ || $filters->{type}
+ || $filters->{attribute_values}
+ );
my $e = new_editor(authtoken=>$auth);
return $e->event unless $e->checkauth;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
index d63cdc8..c729abc 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -1948,11 +1948,16 @@ sub booking_adjusted_due_date {
'0 seconds';
my $booking_ses = OpenSRF::AppSession->create( 'open-ils.booking' );
- my $bookings = $booking_ses->request(
- 'open-ils.booking.reservations.filtered_id_list', $self->editor->authtoken,
- { resource => $booking_item->id, search_start => 'now', search_end => $circ->due_date, fields => { cancel_time => undef, return_time => undef}}
- )->gather(1);
+ my $bookings = $booking_ses->request('open-ils.booking.reservations.filtered_id_list', $self->editor->authtoken, {
+ resource => $booking_item->id
+ , search_start => 'now'
+ , search_end => $circ->due_date
+ , fields => { cancel_time => undef, return_time => undef }
+ })->gather(1);
$booking_ses->disconnect;
+
+ throw OpenSRF::EX::ERROR ("Improper input arguments") unless defined $bookings;
+ return $self->bail_on_events($bookings) if ref($bookings) eq 'HASH';
my $dt_parser = DateTime::Format::ISO8601->new;
my $due_date = $dt_parser->parse_datetime( cleanse_ISO8601($circ->due_date) );
-----------------------------------------------------------------------
Summary of changes:
.../perlmods/lib/OpenILS/Application/Booking.pm | 8 +++++++-
.../lib/OpenILS/Application/Circ/Circulate.pm | 13 +++++++++----
2 files changed, 16 insertions(+), 5 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list