From 43eb3326b74c9dfebc2d8ea330d94ec62dfa9ed3 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Tue, 8 Nov 2011 18:42:18 -0500 Subject: [PATCH] LP887822 mint_condition/Quality not set correctly during item creation. Specifically, the Javascript object for a new item (acp) does not explicitly set the mint_condition field, leaving it null. The item attribute editor treats the null as false (which it displays as "Mediocre" for that field). The database has a not null constraint the corresponding column in asset.copy, and defaults to true. So a new item in the attribute editor will show "Mediocre", but when actually created, will become "Good". This branch just sets mint_condition to true when an item is created. Signed-off-by: Jason Etheridge Signed-off-by: Mike Rylander --- Open-ILS/xul/staff_client/chrome/content/cat/opac.js | 1 + Open-ILS/xul/staff_client/server/cat/util.js | 1 + Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js | 1 + 3 files changed, 3 insertions(+) diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js index d1e725e87e..4c94b291be 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -214,6 +214,7 @@ function set_marc_edit() { copy_obj.holdable(get_db_true()); copy_obj.opac_visible(get_db_true()); copy_obj.ref(get_db_false()); + copy_obj.mint_condition(get_db_true()); JSAN.use('util.window'); var win = new util.window(); return cat.util.spawn_copy_editor( { 'handle_update' : 1, 'edit' : 1, 'docid' : doc_id, 'copies' : [ copy_obj ] }); diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index ff6a261e62..bd19fbe1b5 100644 --- a/Open-ILS/xul/staff_client/server/cat/util.js +++ b/Open-ILS/xul/staff_client/server/cat/util.js @@ -600,6 +600,7 @@ cat.util.fast_item_add = function(doc_id,cn_label,cp_barcode) { copy_obj.holdable(get_db_true()); copy_obj.opac_visible(get_db_true()); copy_obj.ref(get_db_false()); + copy_obj.mint_condition(get_db_true()); JSAN.use('util.window'); var win = new util.window(); JSAN.use('cat.util'); diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js index a589114321..15997de129 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js @@ -1008,6 +1008,7 @@ g.gather_copies = function() { copy.holdable(get_db_true()); copy.opac_visible(get_db_true()); copy.ref(get_db_false()); + copy.mint_condition(get_db_true()); return copy; } -- 2.11.0