This is part of the solution for LP1167541. When using
the staff client, use the workstation OU for the initial
hold pickup location when placing holds, instead of the
staff users home_ou.
This solves the issue for sites that use unique staff logins
for staff that move between locations that mainly deal with
customers at the physical site they are at.
Signed-off-by: Josh Stompro <stomproj@larl.org>
my @parts = $cgi->param('part');
$ctx->{hold_type} = $cgi->param('hold_type');
- $ctx->{default_pickup_lib} = $e->requestor->home_ou; # unless changed below
+ #If staff - set default_pickup_lib to workstation ou.
+ if ($ctx->{is_staff}) {
+ $ctx->{default_pickup_lib} = $e->requestor->ws_ou;
+ }
+ else { #if not staff, use home_ou of requestor.
+ $ctx->{default_pickup_lib} = $e->requestor->home_ou; # unless changed below
+ }
$ctx->{email_notify} = $cgi->param('email_notify');
if ($cgi->param('phone_notify_checkbox')) {
$ctx->{phone_notify} = $cgi->param('phone_notify');