From fbf349a8bd1293cbb94f5cd74bac9a8a54ed48e5 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 28 Dec 2011 11:17:37 -0500 Subject: [PATCH] New hold status for "Wrong Shelf" Adds a new hold status code (8) to indicate when a hold is sitting on the wrong holds shelf. In the OPAC, a hold status of 8 is displayed as in-transit. Neither waiting-for-copy or in-transit are entirely accurate. In-transit makes slightly more sense, since the copy is captured and (slowly) making its way to the correct shelf. Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm | 4 ++++ Open-ILS/src/templates/opac/parts/hold_status.tt2 | 2 +- Open-ILS/web/opac/skin/default/js/myopac.js | 2 +- Open-ILS/xul/staff_client/server/circ/util.js | 3 +++ Open-ILS/xul/staff_client/server/locale/en-US/circ.properties | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index b69b7f5794..26fffb86f7 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -1090,6 +1090,7 @@ Returns event on error or: 5 for 'hold-shelf-delay' 6 for 'canceled' 7 for 'suspended' + 8 for 'captured, on wrong hold shelf' END_OF_DESC } } @@ -1119,6 +1120,9 @@ sub _hold_status { if ($U->is_true($hold->frozen)) { return 7; } + if ($hold->current_shelf_lib and $hold->current_shelf_lib ne $hold->pickup_lib) { + return 8; + } return 1 unless $hold->current_copy; return 2 unless $hold->capture_time; diff --git a/Open-ILS/src/templates/opac/parts/hold_status.tt2 b/Open-ILS/src/templates/opac/parts/hold_status.tt2 index 14806654da..0cabbece6b 100644 --- a/Open-ILS/src/templates/opac/parts/hold_status.tt2 +++ b/Open-ILS/src/templates/opac/parts/hold_status.tt2 @@ -14,7 +14,7 @@ SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400); l("Estimated wait: [quant,_1,day,days]", hwait) | html; - ELSIF hold.hold.status == 3; + ELSIF hold.hold.status == 3 OR hold.hold.status == 8; l("In Transit") | html; ELSIF hold.hold.status < 3; diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index 92e4b12f36..302f0ec49f 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -492,7 +492,7 @@ function myOShowHoldStatus(r) { if( qstats.status < 3 ) unHideMe($n(row, 'hold_status_waiting')); - if( qstats.status == 3 ) + if( qstats.status == 3 || qstats.status == 8 ) unHideMe($n(row, 'hold_status_transit')); } } diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index e8213d9947..95b91a71f6 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -1944,6 +1944,9 @@ circ.util.hold_columns = function(modify,params) { case 7: return document.getElementById('circStrings').getString('staff.circ.utils.hold_status.7'); break; + case 8: + return document.getElementById('circStrings').getString('staff.circ.utils.hold_status.8'); + break; default: return my.status; break; diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index af45237a5a..a8d2ce3fdb 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -324,6 +324,7 @@ staff.circ.utils.hold_status.4=Ready for pickup staff.circ.utils.hold_status.5=Reserved/Pending staff.circ.utils.hold_status.6=Canceled staff.circ.utils.hold_status.7=Suspended +staff.circ.utils.hold_status.8=Wrong Shelf staff.circ.utils.hold_post_clear_shelf_action.label=Post-Clear staff.circ.utils.hold_post_clear_shelf_action.hold=Need for Hold staff.circ.utils.hold_post_clear_shelf_action.transit=Need for Transit -- 2.11.0