On Wed, Dec 23, 2009 at 8:54 PM, Jesse Ephraim
<jephr...@roanoketexas.com> wrote:
> We have noticed that patrons are able to renew items even if other
> patrons have placed holds on them.  Does anyone know if that is a
> settings issue, or is it an inherent flaw in Evergreen?

Jesse,

If you're using the script based circ behavior, this is how you can do
something similar.  Specifically, this will block a renewal if the
item is eligible to fill a hold and no other such eligible items are
available for pulling.

In circ_permit_renew.js:

function go() {

/* load the lib script */
load_lib('circ/circ_lib.js');
log_vars('circ_permit_renew');

log_info("permit_renew searching for potential holds for copy " + copy.barcode)
var hold = copy.fetchBestHold();
if( hold ) {
        log_info("hold found for renewal item, checking hold->usr..");
        if( hold && hold.usr != patron.id )
                return result.events.push('COPY_NEEDED_FOR_HOLD');
}

} go();


http://svn.open-ils.org/trac/ILS-Contrib/browser/PINES-Examples/trunk/src/javascript/backend/circ/circ_permit_renew.js

-- 
Jason Etheridge
 | VP, Tactical Development
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  ja...@esilibrary.com
 | web:  http://www.esilibrary.com

Please come by and visit the Equinox team
and learn more about Evergreen
ALA MidWinter
January 15-18, 2010
booth # 2064

Reply via email to