holding_type on serial.issuance not quite dead
authorDan Wells <dbw2@calvin.edu>
Fri, 30 Mar 2012 20:17:47 +0000 (16:17 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 2 Apr 2012 14:18:53 +0000 (10:18 -0400)
The holding_type field was removed from the serial control editor
prematurely, and this missing data was a source of mild friction.
We'll put it back for now.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.serial-holding-groups.sql
Open-ILS/xul/staff_client/server/serial/siss_editor.js

index 695ce81..27246a1 100644 (file)
@@ -146,4 +146,10 @@ UPDATE config.internal_flag
 
 -- finish holding code materialization process
 
+-- fix up missing holding_code fields from serial.issuance
+UPDATE serial.issuance siss
+    SET holding_type = scap.type
+    FROM serial.caption_and_pattern scap
+    WHERE scap.id = siss.caption_and_pattern AND siss.holding_type IS NULL;
+
 COMMIT;
index 666c761..bb04131 100644 (file)
@@ -119,14 +119,15 @@ serial.siss_editor.prototype = {
 
         'siss_editor_middle_pane' :
         [
-/*rjs7 don't think we need these anymore            [
-                'Holding Type',
+            [
+                'holding_type',
                 {
-                    render: 'fm.holding_type();',
-                    input: 'c = function(v){ obj.apply("holding_type",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ ["basic", "basic"], ["index", "index"], ["supplement", "supplement"] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);',
+                    input: 'c = function(v){ obj.apply("holding_type",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ ["basic", "basic"], ["index", "index"], ["supplement", "supplement"] ] ); x.setAttribute("value",obj.editor_values.holding_type); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);',
+                    value_key: 'holding_type',
+                    required: true
                 }
             ],
-            [
+/* deprecated            [
                 'Holding Link ID',
                 {
                     render: 'fm.holding_link_id();',