]> 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 16:58:24 +0000 (11:58 -0500)
commit69e5ef2e2d7600733f05f80b21e18b2eabc43c6b
tree7a7768fb900a435a8a85ab43fba4bd765823e0cb
parent162dfb1daf9310eb7a9fa91d7715f843c8eaf744
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