New hold status for "Wrong Shelf"
authorBill Erickson <berick@esilibrary.com>
Wed, 28 Dec 2011 16:17:37 +0000 (11:17 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 4 Jan 2012 19:40:00 +0000 (14:40 -0500)
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 <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
Open-ILS/src/templates/opac/parts/hold_status.tt2
Open-ILS/web/opac/skin/default/js/myopac.js
Open-ILS/xul/staff_client/server/circ/util.js
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties

index b69b7f5..26fffb8 100644 (file)
@@ -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;
 
index 1480665..0cabbec 100644 (file)
@@ -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;
index 92e4b12..302f0ec 100644 (file)
@@ -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'));
     }
 }
index e8213d9..95b91a7 100644 (file)
@@ -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;
index af45237..a8d2ce3 100644 (file)
@@ -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