TPac: Multiple holds in staff client place-holds session
authorBill Erickson <berick@esilibrary.com>
Fri, 2 Sep 2011 19:25:39 +0000 (15:25 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 2 Sep 2011 19:30:14 +0000 (15:30 -0400)
Leave the patron_barcode cookie in place after holds placement succeeds
from the embedded catalog so that the next hold request will use the
same patron.  This allows for multiple hold request to take place within
one session.  The negative is that the cookie sticks around even after a
patron session is closed.  This is normally not a problem, because each
new patron sesion will update the cookie.  (And when the cookie is not
updated, staff still have the option to /not/ place a hold for the
pre-selected user).  However, it would be nice to have the staff client
clear the cookie at the right time.  Will look at that too.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm

index e32cd93..92858eb 100644 (file)
@@ -647,11 +647,20 @@ sub load_place_hold {
 
 sub post_hold_redirect {
     my $self = shift;
+    
+    # XXX: Leave the barcode cookie in place.  Otherwise, it's not 
+    # possible to place more than one hold for the patron within 
+    # a staff/patron session.  This does leave the barcode to linger 
+    # longer than is ideal, but normal staff work flow will cause the 
+    # cookie to be replaced with each new patron anyway.
+    # TODO:  See about getting the staff client to clear the cookie
+    return $self->generic_redirect;
 
     # We also clear the patron_barcode (from the staff client)
     # cookie at this point (otherwise it haunts the staff user
     # later). XXX todo make sure this is best; also see that
     # template when staff mode calls xulG.opac_hold_placed()
+
     return $self->generic_redirect(
         undef,
         $self->cgi->cookie(