var currentLocation = environment.location;
var holdRequestLib = environment.requestLib;
var holdPickupLib = environment.pickupLib; /* hold pickup lib */
+var requestor = environment.requestor || patron;
groupList[child]);
}
+function isGroupDescendantId( parentName, childId ) {
+ log_debug("checking descendant ID p="+parentName + " c=" + childId);
+ return __isGroupDescendant(
+ groupList[parentName],
+ groupIDList[childId]);
+}
+
/**
} catch(e) {}
}
+ if(requestor.id != patron.id)
+ str+= ' Requestor='+requestor.usrname;
+
if(copy) {
str += ', Copy=' + copy.id;
str += ', Copy_Barcode=' + copy.barcode;
/* is a staff member placing this hold? */
-var isStaffHold = isGroupDescendant('Staff', patronProfile);
+//var isStaffHold = isGroupDescendant('Staff', patronProfile);
+var isStaffHold = isGroupDescendantId('Staff', requestor.profile);
/* non-staff members are allowed 50 open holds at most */
log_info("patron has " + count + " open holds");
if( count >= 50 )
result.events.push('MAX_HOLDS');
-}
+} else {
+ log_info("This is a staff-placed hold");
+}
if( isTrue(patron.barred) )