flesh => 4,
flesh_fields => {
circ => [ qw/ target_copy / ],
- acp => [ qw/ location status stat_cat_entry_copy_maps notes age_protect call_number / ],
+ acp => [ qw/ location status stat_cat_entry_copy_maps notes age_protect call_number parts / ],
ascecm => [ qw/ stat_cat stat_cat_entry / ],
acn => [ qw/ record / ],
}
$circulator->editor->update_asset_copy($copy);
$success_event->{"payload"}->{"record"} =
$U->record_to_mvr($copy->call_number->record);
+ $success_event->{"payload"}->{"volume"} = $copy->call_number;
$copy->call_number($copy->call_number->id);
$success_event->{"payload"}->{"copy"} = $copy;
}
OpenILS::Event->new('SUCCESS',
payload => {
copy => $U->unflesh_copy($self->copy),
+ volume => $self->volume,
circ => $self->circ,
record => $record,
holds_fulfilled => $self->fulfilled_holds,
my $payload = {};
$payload->{copy} = $U->unflesh_copy($self->copy);
+ $payload->{volume} = $self->volume;
$payload->{record} = $record,
$payload->{circ} = $self->circ;
$payload->{transit} = $self->transit;
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());
'mbts' : checkin.circ ? checkin.circ.billable_transaction().summary() : null,
'mvr' : checkin.record,
'acp' : checkin.copy,
+ 'acn' : checkin.volume,
'au' : checkin.patron,
'status' : checkin.status,
'route_to' : checkin.route_to,
'my' : {
'circ' : checkout.payload.circ,
'mvr' : checkout.payload.record,
- 'acp' : checkout.payload.copy
+ 'acp' : checkout.payload.copy,
+ 'acn' : checkout.payload.volume
}
},
'to_top' : true
'mbts' : renew.parent_circ ? renew.parent_circ.billable_transaction().summary() : null,
'mvr' : renew.record,
'acp' : renew.copy,
+ 'acn' : renew.volume,
'au' : renew.patron,
'status' : renew.status,
'route_to' : renew.route_to,
'hidden' : true,
'editable' : false, 'render' : function(my) {
if (typeof my.acn == 'undefined') return '';
- return (typeof my.acn.prefix() == 'object') ? my.acn.prefix().label() : my.acn.prefix();
+ return (typeof my.acn.prefix() == 'object')
+ ? my.acn.prefix().label()
+ : data.hash.acnp[ my.acn.prefix() ].label();
},
'persist' : 'hidden width ordinal'
},
'hidden' : true,
'editable' : false, 'render' : function(my) {
if (typeof my.acn == 'undefined') return '';
- return (typeof my.acn.suffix() == 'object') ? my.acn.suffix().label() : my.acn.suffix();
+ return (typeof my.acn.suffix() == 'object')
+ ? my.acn.suffix().label()
+ : data.hash.acns[ my.acn.suffix() ].label();
},
'persist' : 'hidden width ordinal'
},
JSAN.use('util.date');
JSAN.use('util.sound'); var sound = new util.sound();
- error.sdump('D_DEBUG','check = ' + error.pretty_print( js2JSON( check ) ) );
+ dump('check = ' + error.pretty_print( js2JSON( check ) ) + '\n' );
check.message = check.textcode;
if (check.payload && check.payload.copy) { check.copy = check.payload.copy; }
+ if (check.payload && check.payload.volume) { check.volume = check.payload.volume; }
if (check.payload && check.payload.record) { check.record = check.payload.record; }
if (check.payload && check.payload.circ) { check.circ = check.payload.circ; }
if (check.payload && check.payload.patron) { check.patron = check.payload.patron; }
staff.circ.utils.not_cataloged=Not Cataloged
staff.circ.utils.retrieving=Retrieving...
staff.circ.utils.owning_lib=Owning Library
-staff.circ.utils.prefix=Prefix
-staff.circ.utils.suffix=Suffix
+staff.circ.utils.prefix=CN Prefix
+staff.circ.utils.suffix=CN Suffix
staff.circ.utils.label_class=Classification
staff.circ.utils.loan_duration.short=Short
staff.circ.utils.loan_duration.normal=Normal
staff.au_master_account_label=Group Lead
staff.au_group_id_label=Group ID
staff.au_id_label=User ID
-staff.au_name_prefix_label=Prefix
+staff.au_name_prefix_label=Name Prefix
staff.au_family_name_label=Family Name
staff.au_first_given_name_label=First Name
staff.au_second_given_name_label=Middle Name
-staff.au_name_suffix_label=Suffix
+staff.au_name_suffix_label=Name Suffix
staff.z39_50.search_class.author=Author
staff.z39_50.search_class.isbn=ISBN
staff.z39_50.search_class.issn=ISSN