These two new org unit settings enable sites to control the
default status of newly added copies. The defaults match
the behaviour of the "Add Volumes" ("In Process") and
"Fast Add" ("Available") interfaces as of Evergreen 1.6.1,
but sites can choose to have the copies go directly to
"Reshelving", "Available", or any other status defined in
config.copy_status.
The org unit settings are:
* cat.default_copy_status_fast (for "Fast Add")
* cat.default_copy_status_normal (for "Add Volumes")
Signed-off-by: Dan Scott <dscott@laurentian.ca>
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_1@20264
dcc99617-32d9-48b4-a31d-
7c20da2025e4
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0522'); -- tsbere/phasefx
+INSERT INTO config.upgrade_log (version) VALUES ('0523'); -- dbs
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
'coust', 'description'),
'bool'
);
+
+INSERT into config.org_unit_setting_type
+( name, label, description, datatype, fm_class ) VALUES
+( 'cat.default_copy_status_fast',
+ oils_i18n_gettext( 'cat.default_copy_status_fast', 'Cataloging: Default copy status (fast add)', 'coust', 'label'),
+ oils_i18n_gettext( 'cat.default_copy_status_fast', 'Default status when a copy is created using the "Fast Add" interface.', 'coust', 'description'),
+ 'link', 'ccs'
+);
+
+INSERT into config.org_unit_setting_type
+( name, label, description, datatype, fm_class ) VALUES
+( 'cat.default_copy_status_normal',
+ oils_i18n_gettext( 'cat.default_copy_status_normal', 'Cataloging: Default copy status (normal)', 'coust', 'label'),
+ oils_i18n_gettext( 'cat.default_copy_status_normal', 'Default status when a copy is created using the normal volume/copy creator interface.', 'coust', 'description'),
+ 'link', 'ccs'
+);
--- /dev/null
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0523'); -- dbs
+
+INSERT into config.org_unit_setting_type
+( name, label, description, datatype, fm_class ) VALUES
+( 'cat.default_copy_status_fast',
+ oils_i18n_gettext( 'cat.default_copy_status_fast', 'Cataloging: Default copy status (fast add)', 'coust', 'label'),
+ oils_i18n_gettext( 'cat.default_copy_status_fast', 'Default status when a copy is created using the "Fast Add" interface.', 'coust', 'description'),
+ 'link', 'ccs'
+);
+
+INSERT into config.org_unit_setting_type
+( name, label, description, datatype, fm_class ) VALUES
+( 'cat.default_copy_status_normal',
+ oils_i18n_gettext( 'cat.default_copy_status_normal', 'Cataloging: Default copy status (normal)', 'coust', 'label'),
+ oils_i18n_gettext( 'cat.default_copy_status_normal', 'Default status when a copy is created using the normal volume/copy creator interface.', 'coust', 'description'),
+ 'link', 'ccs'
+);
+
+COMMIT;
return;
}
+ // Get the default copy status; default to available if unset, per 1.6
+ var fast_ccs = g.data.hash.aous['cat.default_copy_status_fast'] || 0;
+
var copy_obj = new acp();
copy_obj.id( -1 );
copy_obj.isnew('1');
copy_obj.fine_level(2); // Normal
copy_obj.loan_duration(2); // Normal
copy_obj.location(1); // Stacks
- copy_obj.status(5); // In Process
+ copy_obj.status(fast_ccs);
copy_obj.circulate(get_db_true());
copy_obj.holdable(get_db_true());
copy_obj.opac_visible(get_db_true());
cat.util.fast_item_add = function(doc_id,cn_label,cp_barcode) {
var error;
+ JSAN.use('OpenILS.data'); var data = new OpenILS.data();
try {
JSAN.use('util.error'); error = new util.error();
return;
}
+ // Get the default copy status; default to available if unset, per 1.6
+ var fast_ccs = data.hash.aous['cat.default_copy_status_fast'] || 0;
+
var copy_obj = new acp();
copy_obj.id( -1 );
copy_obj.isnew('1');
copy_obj.fine_level(2); // Normal
copy_obj.loan_duration(2); // Normal
copy_obj.location(1); // Stacks
- copy_obj.status(5); // In Process
+ copy_obj.status(fast_ccs);
copy_obj.circulate(get_db_true());
copy_obj.holdable(get_db_true());
copy_obj.opac_visible(get_db_true());
var copies = [];
var volume_data = {};
+ // Get the default copy status; default to "In Process" if unset, per 1.6
+ var normal_ccs = g.data.hash.aous['cat.default_copy_status_normal'] || 5;
+
function new_copy(acp_id,ou_id,acn_id,barcode) {
var copy = new acp();
copy.id( acp_id );
copy.fine_level(2); // Normal
copy.loan_duration(2); // Normal
copy.location(1); // Stacks
- copy.status(5); // In Process
+ copy.status(normal_ccs);
copy.circulate(get_db_true());
copy.holdable(get_db_true());
copy.opac_visible(get_db_true());