[open-ils-commits] r432 - conifer/trunk/circ (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat May 2 09:49:16 EDT 2009
Author: dbs
Date: 2009-05-02 09:49:15 -0400 (Sat, 02 May 2009)
New Revision: 432
Modified:
conifer/trunk/circ/circ_duration_OWA.js
Log:
Circ modifiers get munged to upper case during migration
Modified: conifer/trunk/circ/circ_duration_OWA.js
===================================================================
--- conifer/trunk/circ/circ_duration_OWA.js 2009-05-02 13:20:49 UTC (rev 431)
+++ conifer/trunk/circ/circ_duration_OWA.js 2009-05-02 13:49:15 UTC (rev 432)
@@ -20,6 +20,10 @@
result.magneticMedia = 'f';
// if result.durationRule is not modified for a patron group, item does not circulate
+//
+// of course, what this rule actually does is circulate the item for 0 days, meaning
+// that it is immediately due... need to move this logic over to circ_permit_patron.js
+// or circ_permit_copy.js
result.durationRule = 'non_circ';
// for fines, set the most common value here
@@ -30,100 +34,96 @@
switch(patronProfile) {
- case 'Circulators':
- result.durationRule = '120_days_2_renew';
- break;
-
case 'Patrons':
switch(copy.circ_modifier) {
- case 'cd music':
+ case 'CD MUSIC':
// use defaults
break;
- case 'circ':
+ case 'CIRC':
result.durationRule = '14_days_3_renew';
break;
- case 'circ short':
+ case 'CIRC SHORT':
// use defaults
break;
- case 'crc media':
+ case 'CRC MEDIA':
result.durationRule = '7_days_3_renew';
break;
- case 'crc spec':
+ case 'CRC SPEC':
result.durationRule = '14_days_3_renew';
break;
- case 'crc text':
+ case 'CRC TEXT':
result.durationRule = '14_days_3_renew';
break;
- case 'dnon':
+ case 'DNON':
// use defaults
break;
- case 'doc':
+ case 'DOC':
result.durationRule = '14_days_3_renew';
break;
- case 'dvd video':
+ case 'DVD VIDEO':
result.durationRule = '3_days_1_renew';
break;
- case 'law mono':
+ case 'LAW MONO':
// use defaults
break;
- case 'law nocirc':
+ case 'LAW NOCIRC':
// use defaults
break;
- case 'law res1d':
+ case 'LAW RES1D':
// use defaults
break;
- case 'law res3d':
+ case 'LAW RES3D':
// use defaults
break;
- case 'law res3h':
+ case 'LAW RES3H':
// use defaults
break;
- case 'law res5h':
+ case 'LAW RES5H':
// use defaults
break;
- case 'law serial':
+ case 'LAW SERIAL':
// use defaults
break;
- case 'map':
+ case 'MAP':
// use defaults
break;
- case 'map (circulating)':
+ case 'MAP (CIRCULATING)':
result.durationRule = '14_days_3_renew';
break;
- case 'map (reference)':
+ case 'MAP (REFERENCE)':
// use defaults
break;
- case 'media':
+ case 'MEDIA':
result.durationRule = '14_days_3_renew';
break;
- case 'mform':
+ case 'MFORM':
result.durationRule = '14_days_3_renew';
break;
- case 'mform ref':
+ case 'MFORM REF':
// use defaults
break;
- case 'mform ser':
+ case 'MFORM SER':
// use defaults
break;
- case 'ref':
+ case 'REF':
result.durationRule = '7_days_3_renew';
break;
- case 'rsv1':
+ case 'RSV1':
// use defaults
break;
- case 'rsv2':
+ case 'RSV2':
// use defaults
break;
- case 'rsv3':
+ case 'RSV3':
// use defaults
break;
- case 'rsv7':
+ case 'RSV7':
// use defaults
break;
- case 'ser':
+ case 'SER':
// use defaults
break;
- case 'thesis':
+ case 'THESIS':
result.durationRule = '14_days_3_renew';
break;
}
@@ -131,33 +131,33 @@
case 'Faculty':
switch(copy.circ_modifier) {
- case 'cd music':
+ case 'CD MUSIC':
result.durationRule = '3_days_1_renew';
break;
- case 'circ':
+ case 'CIRC':
result.durationRule = '28_days_3_renew';
break;
- case 'circ short':
+ case 'CIRC SHORT':
result.durationRule = '3_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'crc media':
+ case 'CRC MEDIA':
result.durationRule = '7_days_3_renew';
break;
- case 'crc spec':
+ case 'CRC SPEC':
result.durationRule = '28_days_3_renew';
break;
- case 'crc text':
+ case 'CRC TEXT':
result.durationRule = '28_days_3_renew';
break;
- case 'dnon':
+ case 'DNON':
// use defaults
break;
- case 'doc':
+ case 'DOC':
result.durationRule = '28_days_3_renew';
break;
- case 'dvd video':
+ case 'DVD VIDEO':
result.durationRule = '3_days_1_renew';
break;
@@ -165,90 +165,90 @@
and will need to be changed as soon as a conifer Law Faculty patron
group can be created */
- case 'law mono':
+ case 'LAW MONO':
result.durationRule = '28_days_5_renew';
result.recurringFinesRule = 'free';
result.maxFine = 0;
break;
- case 'law nocirc':
+ case 'LAW NOCIRC':
result.durationRule = '14_days_5_renew';
result.recurringFinesRule = 'free';
result.maxFine = 0;
break;
- case 'law res1d':
+ case 'LAW RES1D':
result.durationRule = '2_days_20_renew';
result.recurringFinesRule = 'free';
result.maxFine = 0;
break;
- case 'law res3d':
+ case 'LAW RES3D':
result.durationRule = '3_days_20_renew';
result.recurringFinesRule = 'free';
result.maxFine = 0;
break;
- case 'law res3h':
+ case 'LAW RES3H':
result.durationRule = '2_days_20_renew';
result.recurringFinesRule = 'free';
result.maxFine = 0;
break;
- case 'law res5h':
+ case 'LAW RES5H':
result.durationRule = '2_days_20_renew';
result.recurringFinesRule = 'free';
result.maxFine = 0;
break;
- case 'law serial':
+ case 'LAW SERIAL':
result.durationRule = '14_days_5_renew';
result.recurringFinesRule = 'free';
result.maxFine = 0;
break;
- case 'map':
+ case 'MAP':
// use defaults
break;
- case 'map (circulating)':
+ case 'MAP (CIRCULATING)':
result.durationRule = '28_days_3_renew';
break;
- case 'map (reference)':
+ case 'MAP (REFERENCE)':
// use defaults
break;
- case 'media':
+ case 'MEDIA':
result.durationRule = '28_days_3_renew';
break;
- case 'mform':
+ case 'MFORM':
result.durationRule = '28_days_3_renew';
break;
- case 'mform ref':
+ case 'MFORM REF':
// use defaults
break;
- case 'mform ser':
+ case 'MFORM SER':
// use defaults
break;
- case 'ref':
+ case 'REF':
result.durationRule = '7_days_3_renew';
break;
- case 'rsv1':
+ case 'RSV1':
result.durationRule = '1_day_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'rsv2':
+ case 'RSV2':
result.durationRule = '120_minutes_0_renew';
result.recurringFinesRule = '5_cents_per_minute';
result.maxFine = '50_dollars';
break;
- case 'rsv3':
+ case 'RSV3':
result.durationRule = '3_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'rsv7':
+ case 'RSV7':
result.durationRule = '7_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'ser':
+ case 'SER':
result.durationRule = '1_day_1_renew';
result.recurringFinesRule = '2_dollars_per_day';
break;
- case 'thesis':
+ case 'THESIS':
result.durationRule = '28_days_3_renew';
break;
}
@@ -256,115 +256,115 @@
case 'Graduate':
switch(copy.circ_modifier) {
- case 'cd music':
+ case 'CD MUSIC':
// use defaults
break;
- case 'circ':
+ case 'CIRC':
result.durationRule = '28_days_3_renew';
break;
- case 'circ short':
+ case 'CIRC SHORT':
result.durationRule = '3_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'crc media':
+ case 'CRC MEDIA':
result.durationRule = '7_days_3_renew';
break;
- case 'crc spec':
+ case 'CRC SPEC':
result.durationRule = '28_days_3_renew';
break;
- case 'crc text':
+ case 'CRC TEXT':
result.durationRule = '28_days_3_renew';
break;
- case 'dnon':
+ case 'DNON':
// use defaults
break;
- case 'doc':
+ case 'DOC':
result.durationRule = '28_days_3_renew';
break;
- case 'dvd video':
+ case 'DVD VIDEO':
result.durationRule = '3_days_1_renew';
break;
- case 'law mono':
+ case 'LAW MONO':
result.durationRule = '28_days_5_renew';
result.recurringFinesRule = '50_cent_per_day';
result.maxFine = '50_dollars';
break;
- case 'law nocirc':
+ case 'LAW NOCIRC':
// use defaults
break;
- case 'law res1d':
+ case 'LAW RES1D':
result.durationRule = '16_hours_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law res3d':
+ case 'LAW RES3D':
result.durationRule = '2_days_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law res3h':
+ case 'LAW RES3H':
result.durationRule = '3_hours_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law res5h':
+ case 'LAW RES5H':
result.durationRule = '5_hours_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law serial':
+ case 'LAW SERIAL':
// use defaults
break;
- case 'map':
+ case 'MAP':
// use defaults
break;
- case 'map (circulating)':
+ case 'MAP (CIRCULATING)':
result.durationRule = '28_days_3_renew';
break;
- case 'map (reference)':
+ case 'MAP (REFERENCE)':
// use defaults
break;
- case 'media':
+ case 'MEDIA':
result.durationRule = '28_days_3_renew';
break;
- case 'mform':
+ case 'MFORM':
result.durationRule = '28_days_3_renew';
break;
- case 'mform ref':
+ case 'MFORM REF':
// use defaults
break;
- case 'mform ser':
+ case 'MFORM SER':
// use defaults
break;
- case 'ref':
+ case 'REF':
result.durationRule = '7_days_3_renew';
break;
- case 'rsv1':
+ case 'RSV1':
result.durationRule = '1_day_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'rsv2':
+ case 'RSV2':
result.durationRule = '120_minutes_0_renew';
result.recurringFinesRule = '5_cents_per_minute';
result.maxFine = '50_dollars';
break;
- case 'rsv3':
+ case 'RSV3':
result.durationRule = '3_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'rsv7':
+ case 'RSV7':
result.durationRule = '7_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'ser':
+ case 'SER':
result.durationRule = '1_day_1_renew';
result.recurringFinesRule = '2_dollars_per_day';
break;
- case 'thesis':
+ case 'THESIS':
result.durationRule = '28_days_3_renew';
break;
}
@@ -379,111 +379,111 @@
case 'cd music':
result.durationRule = '3_days_1_renew';
break;
- case 'circ':
+ case 'CIRC':
result.durationRule = '28_days_3_renew';
break;
- case 'circ short':
+ case 'CIRC SHORT':
result.durationRule = '1_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'crc media':
+ case 'CRC MEDIA':
result.durationRule = '7_days_3_renew';
break;
- case 'crc spec':
+ case 'CRC SPEC':
result.durationRule = '28_days_3_renew';
break;
- case 'crc text':
+ case 'CRC TEXT':
result.durationRule = '28_days_3_renew';
break;
- case 'dnon':
+ case 'DNON':
// use defaults
break;
- case 'doc':
+ case 'DOC':
result.durationRule = '28_days_3_renew';
break;
- case 'dvd video':
+ case 'DVD VIDEO':
result.durationRule = '3_days_1_renew';
break;
- case 'law mono':
+ case 'LAW MONO':
result.durationRule = '28_days_5_renew';
result.maxFine = '50_dollars';
break;
- case 'law nocirc':
+ case 'LAW NOCIRC':
// use defaults
break;
- case 'law res1d':
+ case 'LAW RES1D':
result.durationRule = '16_hours_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law res3d':
+ case 'LAW RES3D':
result.durationRule = '2_days_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law res3h':
+ case 'LAW RES3H':
result.durationRule = '3_hours_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law res5h':
+ case 'LAW RES5H':
result.durationRule = '5_hours_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law serial':
+ case 'LAW SERIAL':
// use defaults
break;
- case 'map':
+ case 'MAP':
// use defaults
break;
- case 'map (circulating)':
+ case 'MAP (CIRCULATING)':
result.durationRule = '28_days_3_renew';
break;
- case 'map (reference)':
+ case 'MAP (REFERENCE)':
// use defaults
break;
- case 'media':
+ case 'MEDIA':
result.durationRule = '28_days_3_renew';
break;
- case 'mform':
+ case 'MFORM':
result.durationRule = '28_days_3_renew';
break;
- case 'mform ref':
+ case 'MFORM REF':
// use defaults
break;
- case 'mform ser':
+ case 'MFORM SER':
// use defaults
break;
- case 'ref':
+ case 'REF':
result.durationRule = '7_days_3_renew';
break;
- case 'rsv1':
+ case 'RSV1':
result.durationRule = '1_day_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'rsv2':
+ case 'RSV2':
result.durationRule = '120_minutes_0_renew';
result.recurringFinesRule = '5_cents_per_minute';
result.maxFine = '50_dollars';
break;
- case 'rsv3':
+ case 'RSV3':
result.durationRule = '3_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'rsv7':
+ case 'RSV7':
result.durationRule = '7_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'ser':
+ case 'SER':
result.durationRule = '1_day_1_renew';
result.recurringFinesRule = '2_dollars_per_day';
break;
- case 'thesis':
+ case 'THESIS':
result.durationRule = '28_days_3_renew';
break;
}
@@ -491,119 +491,116 @@
case 'Undergraduate':
switch(copy.circ_modifier) {
- case 'cd music':
+ case 'CD MUSIC':
// use defaults
break;
- case 'circ':
+ case 'CIRC':
result.durationRule = '14_days_3_renew';
break;
- case 'circ short':
+ case 'CIRC SHORT':
result.durationRule = '3_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'crc media':
+ case 'CRC MEDIA':
result.durationRule = '7_days_3_renew';
break;
- case 'crc spec':
+ case 'CRC SPEC':
result.durationRule = '14_days_3_renew';
break;
- case 'crc text':
+ case 'CRC TEXT':
result.durationRule = '14_days_3_renew';
break;
- case 'dnon':
+ case 'DNON':
// use defaults
break;
- case 'doc':
+ case 'DOC':
result.durationRule = '14_days_3_renew';
break;
- case 'dvd video':
+ case 'DVD VIDEO':
result.durationRule = '3_days_1_renew';
break;
- case 'law mono':
+ case 'LAW MONO':
result.durationRule = '28_days_5_renew';
result.maxFine = '50_dollars';
break;
- case 'law nocirc':
+ case 'LAW NOCIRC':
// use defaults
break;
- case 'law res1d':
+ case 'LAW RES1D':
result.durationRule = '16_hours_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law res3d':
+ case 'LAW RES3D':
result.durationRule = '2_days_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law res3h':
+ case 'LAW RES3H':
result.durationRule = '3_hours_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law res5h':
+ case 'LAW RES5H':
result.durationRule = '5_hours_20_renew';
result.recurringFinesRule = '60_cents_per_day';
result.maxFine = '50_dollars';
break;
- case 'law serial':
+ case 'LAW SERIAL':
// use defaults
break;
- case 'map':
+ case 'MAP':
// use defaults
break;
- case 'map (circulating)':
+ case 'MAP (CIRCULATING)':
result.durationRule = '14_days_3_renew';
break;
- case 'map (reference)':
+ case 'MAP (REFERENCE)':
// use defaults
break;
- case 'media':
+ case 'MEDIA':
result.durationRule = '14_days_3_renew';
break;
- case 'mform':
+ case 'MFORM':
result.durationRule = '14_days_3_renew';
break;
- case 'mform ref':
+ case 'MFORM REF':
// use defaults
break;
- case 'mform ser':
+ case 'MFORM SER':
// use defaults
break;
- case 'ref':
+ case 'REF':
result.durationRule = '7_days_3_renew';
break;
- case 'rsv1':
+ case 'RSV1':
result.durationRule = '1_day_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'rsv2':
+ case 'RSV2':
result.durationRule = '120_minutes_0_renew';
result.recurringFinesRule = '5_cents_per_minute';
result.maxFine = '50_dollars';
break;
- case 'rsv3':
+ case 'RSV3':
result.durationRule = '3_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'rsv7':
+ case 'RSV7':
result.durationRule = '7_days_1_renew';
result.recurringFinesRule = '10_dollars_per_day';
result.maxFine = '50_dollars';
break;
- case 'ser':
+ case 'SER':
// use defaults
break;
- case 'thesis':
+ case 'THESIS':
result.durationRule = '14_days_3_renew';
break;
}
break;
}
-
-/* set variable to tell circ_duration.js that an institution specific script has executed */
-circ_institution_override = true;
More information about the open-ils-commits
mailing list