]> git.evergreen-ils.org Git - Evergreen.git/commit
Fix LP1175711, OPAC can't renew item on booking resource list
authorSteven Chan <schan@sitka.bclibraries.ca>
Thu, 19 Sep 2013 19:51:35 +0000 (12:51 -0700)
committerKathy Lussier <klussier@masslnc.org>
Tue, 17 Nov 2015 17:07:10 +0000 (12:07 -0500)
commit5d76887d066955e02150194ea40123b0d6f4def2
tree10e133f4642ceea917b6a5b54a70aa2f0d5742b7
parent5a3875a9341caf013c40323090fc1e6848a81aba
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@sitka.bclibraries.ca>
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm