[open-ils-commits] r626 - conifer/trunk/circ (pzed)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Aug 19 13:18:17 EDT 2009
Author: pzed
Date: 2009-08-19 13:18:13 -0400 (Wed, 19 Aug 2009)
New Revision: 626
Modified:
conifer/trunk/circ/circ_duration_OWA.js
conifer/trunk/circ/circ_duration_OWAL.js
Log:
first draft of OWA/OWAL duration rules revamp using abstract rule designations
Modified: conifer/trunk/circ/circ_duration_OWA.js
===================================================================
--- conifer/trunk/circ/circ_duration_OWA.js 2009-08-19 15:19:03 UTC (rev 625)
+++ conifer/trunk/circ/circ_duration_OWA.js 2009-08-19 17:18:13 UTC (rev 626)
@@ -1,7 +1,6 @@
// circ duration rules for Windsor Leddy (OWA)
-/* we use a date based identifier to pick up values in the log
-*/
+/* we use a date based identifier to pick up values in the log */
var currentTime = new Date();
var debugStamp = "circ" + (currentTime.getMonth() + 1) + "" +
"" + currentTime.getDate() + "" + currentTime.getFullYear() +
@@ -14,374 +13,97 @@
result.SIPMediaType = '001';
result.magneticMedia = 'f';
-// if result.durationRule is not modified for a patron group, set default
-// once rules for non-circulating items are figured out, use most common value here and delete unnecessary lines below
-result.durationRule = 'non_circ';
+/* if result.durationRule is not modified for a patron group, set default
+ * this value will be used for all circ overrides! */
+result.durationRule = 'OWA_override';
// for fines, set the most common value here
-result.recurringFinesRule = '50_cent_per_day';
-result.maxFine = '10_dollars';
+result.recurringFinesRule = 'OWA_daily';
+result.maxFine = 'OWA_normal';
/* adjust rules by patron group and circ modifier */
log_info(debugStamp + 'patronProfile is ' + patronProfile + ' - modifier ' + copy.circ_modifier);
-switch(patronProfile) {
-
- // currently, Patrons group is not used; rules are the same as Readers group
- case 'Patrons':
- switch(copy.circ_modifier) {
- case 'CIRC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DOC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MEDIA':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '14_days_3_renew';
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'THESIS':
- result.durationRule = '14_days_3_renew';
- break;
- }
- break;
+if (isValidPatron(patronProfile)) {
+ var temp_array = patronProfile.split(" ");
+ var profileFirst = temp_array[0];
- // Faculty includes former AFFL FAC, EXEC, FAC, and LAW FACLTY
- case 'Faculty':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- result.durationRule = '3_days_1_renew';
- break;
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- // includes former STAF, ILL, EXTM, and BINDERY
- case 'Staff members':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- result.durationRule = '3_days_1_renew';
- break;
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- // includes former GRAD and AFFL GRAD
- case 'Graduate':
- switch(copy.circ_modifier) {
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- // includes former DIRB, EXAL, EXDB, EXOT, ONEPASS, and LAW COUR
- case 'Readers':
- switch(copy.circ_modifier) {
- case 'CIRC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DOC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '14_days_3_renew';
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'THESIS':
- result.durationRule = '14_days_3_renew';
- break;
- }
- break;
-
- // includes former AFFL UND, UND, LAW1, LAW2, and LAW3
- case 'Undergraduate':
- switch(copy.circ_modifier) {
- case 'CIRC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DOC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MEDIA':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '14_days_3_renew';
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'THESIS':
- result.durationRule = '14_days_3_renew';
- break;
- }
- break;
-
+ switch(copy.circ_modifier) {
+ case 'CD MUSIC':
+ if (profileFirst == 'Faculty' || profileFirst == 'Staff') {
+ result.durationRule = 'OWA_audiovisual';
+ }
+ break;
+ case 'CIRC':
+ result.durationRule = 'OWA_' + profileFirst;
+ break;
+ case 'CIRC SHORT':
+ result.durationRule = 'OWA_short';
+ result.recurringFinesRule = 'OWA_daily_short';
+ result.maxFine = 'OWA_short';
+ break;
+ case 'CRC MEDIA':
+ result.durationRule = 'OWA_sevenday';
+ break;
+ case 'CRC SPEC':
+ result.durationRule = 'OWA_' + profileFirst;
+ break;
+ case 'CRC TEXT':
+ result.durationRule = 'OWA_' + profileFirst;
+ break;
+ case 'DOC':
+ result.durationRule = 'OWA_' + profileFirst;
+ break;
+ case 'DVD VIDEO':
+ result.durationRule = 'OWA_audiovisual';
+ break;
+ case 'MEDIA':
+ result.durationRule = 'OWA_' + profileFirst;
+ break;
+ case 'MFORM':
+ result.durationRule = 'OWA_' + profileFirst;
+ break;
+ case 'REF':
+ result.durationRule = 'OWA_sevenday';
+ break;
+ case 'RSV1':
+ result.durationRule = 'OWA_rsv_oneday';
+ result.recurringFinesRule = 'OWA_daily_rsv';
+ result.maxFine = 'OWA_rsv';
+ break;
+ case 'RSV2':
+ result.durationRule = 'OWA_rsv_twohour';
+ result.recurringFinesRule = 'OWA_hourly_rsv';
+ result.maxFine = 'OWA_rsv';
+ break;
+ case 'RSV3':
+ result.durationRule = 'OWA_rsv_threeday';
+ result.recurringFinesRule = 'OWA_daily_rsv';
+ result.maxFine = 'OWA_rsv';
+ break;
+ case 'RSV7':
+ result.durationRule = 'OWA_rsv_sevenday';
+ result.recurringFinesRule = 'OWA_daily_rsv';
+ result.maxFine = 'OWA_rsv';
+ break;
+ case 'SER':
+ result.durationRule = 'OWA_serials';
+ result.recurringFinesRule = 'OWA_daily_serials';
+ break;
+ case 'THESIS':
+ result.durationRule = 'OWA_' + profileFirst;
+ break;
+ }
}
log_info("circ0814 - results: " + result.durationRule);
+
+function isValidPatron(patronProfile) {
+ var valid_patrons = ['Faculty', 'Graduate', 'Undergraduate', 'Staff members', 'Readers'];
+ for (var i = 0; i < valid_patrons.length; i++) {
+ if (valid_patrons[i] == patronProfile) {
+ return true;
+ }
+ }
+ return false;
+}
\ No newline at end of file
Modified: conifer/trunk/circ/circ_duration_OWAL.js
===================================================================
--- conifer/trunk/circ/circ_duration_OWAL.js 2009-08-19 15:19:03 UTC (rev 625)
+++ conifer/trunk/circ/circ_duration_OWAL.js 2009-08-19 17:18:13 UTC (rev 626)
@@ -1,221 +1,86 @@
// circ duration rules for Windsor Law (OWAL)
+/* we use a date based identifier to pick up values in the log */
+var currentTime = new Date();
+var debugStamp = "circ" + (currentTime.getMonth() + 1) + "" +
+ "" + currentTime.getDate() + "" + currentTime.getFullYear() +
+ ": ";
+
/* set item type defaults - if the either the patron group or the circ modifier
- is missing or invalid, these settings will be used */
+ * is missing or invalid, these settings will be used */
// do these first two have any significance for us?
result.SIPMediaType = '001';
result.magneticMedia = 'f';
-// if result.durationRule is not modified for a patron group, set default
-// once rules for non-circulating items are figured out, use most common value here and delete unnecessary lines below
+/* if result.durationRule is not modified for a patron group, set default
+ * this value will be used for all circ overrides! */
result.durationRule = 'non_circ';
// for fines, set the most common value here
-result.recurringFinesRule = '50_cent_per_day';
-result.maxFine = '50_dollars';
+result.recurringFinesRule = 'OWAL_daily';
+result.maxFine = 'OWAL_normal';
/* adjust rules by patron group and circ modifier */
-if (patron.home_ou.shortname == "OWAL") { // define Law patron rules first
+log_info(debugStamp + 'patronProfile is ' + patronProfile + ' - modifier ' + copy.circ_modifier);
- switch(patronProfile) {
-
- case 'Faculty':
- switch(copy.circ_modifier) {
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.recurringFinesRule = 'free';
- break;
- case 'LAW NOCIRC':
- result.durationRule = '14_days_5_renew';
- result.recurringFinesRule = 'free';
- break;
- case 'LAW RES1D':
- result.durationRule = '3_days_5_renew';
- result.recurringFinesRule = 'free';
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_5_renew';
- result.recurringFinesRule = 'free';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_days_5_renew';
- result.recurringFinesRule = 'free';
- break;
- case 'LAW RES5H':
- result.durationRule = '3_days_5_renew';
- result.recurringFinesRule = 'free';
- break;
- case 'LAW SERIAL':
- result.durationRule = '14_days_5_renew';
- result.recurringFinesRule = 'free';
- break;
- }
- break;
+if (isValidPatron(patronProfile)) {
+ var temp_array = patronProfile.split(" ");
+ var profileFirst = temp_array[0];
- case 'Staff members':
- switch(copy.circ_modifier) {
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- break;
- case 'LAW RES1D':
- result.durationRule = '1_day_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
+ switch(copy.circ_modifier) {
+ case 'LAW MONO':
+ if (patronProfile == 'Readers' && patron.home_ou.shortname != 'OWAL') {
+ // do nothing
+ } else {
+ result.durationRule = 'OWAL_' + profileFirst;
}
break;
-
- case 'Readers':
- switch(copy.circ_modifier) {
- case 'LAW MONO':
- result.durationRule = '7_days_3_renew';
- result.maxFine = '10_dollars';
- break;
- }
+ case 'LAW NOCIRC':
+ // Faculty exception handled below
break;
-
- case 'Undergraduate':
- switch(copy.circ_modifier) {
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- break;
- case 'LAW RES1D':
- result.durationRule = '1_day_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- }
+ case 'LAW RES1D':
+ result.durationRule = 'OWAL_rsv_oneday';
+ result.recurringFinesRule = 'OWAL_hourly';
break;
- }
-
-} else { // define patron rules for non-Law patrons
-
- switch(patronProfile) {
-
- case 'Faculty':
- switch(copy.circ_modifier) {
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- break;
- case 'LAW NOCIRC':
- result.durationRule = '14_days_5_renew';
- break;
- case 'LAW RES1D':
- result.durationRule = '1_day_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW SERIAL':
- result.durationRule = '14_days_5_renew';
- break;
- }
+ case 'LAW RES3D':
+ result.durationRule = 'OWAL_rsv_threeday';
+ result.recurringFinesRule = 'OWAL_hourly';
break;
-
- case 'Staff members':
- switch(copy.circ_modifier) {
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- break;
- case 'LAW RES1D':
- result.durationRule = '1_day_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- }
+ case 'LAW RES3H':
+ result.durationRule = 'OWAL_rsv_threehour';
+ result.recurringFinesRule = 'OWAL_hourly';
break;
-
- case 'Graduate':
- switch(copy.circ_modifier) {
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- break;
- case 'LAW RES1D':
- result.durationRule = '1_day_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- }
+ case 'LAW RES5H':
+ result.durationRule = 'OWAL_rsv_fivehour';
+ result.recurringFinesRule = 'OWAL_hourly';
break;
-
- case 'Undergraduate':
- switch(copy.circ_modifier) {
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- break;
- case 'LAW RES1D':
- result.durationRule = '1_day_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_5_renew';
- result.recurringFinesRule = '60_cent_per_hour';
- break;
- }
+ case 'LAW SERIAL':
+ // Faculty exception handled below
break;
}
+
+ //exceptions for Law Faculty
+ if (patron.home_ou.shortname == "OWAL" && patronProfile == "Faculty") {
+ result.recurringFines.Rule = 'free';
+ if (copy.circ_modifier == 'LAW NOCIRC') {
+ result.durationRule = 'OWAL_faculty_nocirc';
+ } else if (copy.circ_modifier == 'LAW SERIAL') {
+ result.durationRule = 'OWAL_faculty_serials';
+ } else if (copy.circ_modifier.slice(0, 6) == 'LAW RES') {
+ result.durationRule = 'OWAL_rsv_threeday';
+ }
+ }
}
+log_info("circ0814 - results: " + result.durationRule);
+
+function isValidPatron(patronProfile) {
+ var valid_patrons = ['Faculty', 'Graduate', 'Undergraduate', 'Staff members', 'Readers'];
+ for (var i = 0; i < valid_patrons.length; i++) {
+ if (valid_patrons[i] == patronProfile) {
+ return true;
+ }
+ }
+ return false;
+}
\ No newline at end of file
More information about the open-ils-commits
mailing list