From: Dan Scott Date: Tue, 24 May 2011 21:22:36 +0000 (-0400) Subject: Prevent renewal of an item which has a hold placed on it X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=acf373c8b2ae728945b99f84aa51cce1ba174388;p=contrib%2FConifer.git Prevent renewal of an item which has a hold placed on it Per http://biblio.laurentian.ca/tickets/conifer/wiki/devHolds, we had this functional in 1.6 but must not have had the updated script checked into SVN (now git) for the purposes of our upgrade, as the functionality is not present after our upgrade. Adding this to the repo so that we can test and hopefully get rid of the regression. Signed-off-by: Dan Scott --- diff --git a/circ/circ_permit_renew.js b/circ/circ_permit_renew.js new file mode 100644 index 0000000000..d86094e29d --- /dev/null +++ b/circ/circ_permit_renew.js @@ -0,0 +1,17 @@ +function go() { + +/* load the lib script */ +load_lib('circ/circ_lib.js'); +load_lib('JSON_v1.js'); +log_vars('circ_permit_renew'); + +//from Jason Etheridge's suggestion on OPEN-ILS-GENERAL, Dec. 23, 2009 +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();