$copy->status(OILS_COPY_STATUS_IN_PROCESS);
$copy->edit_date('now');
$copy->editor($e->requestor->id);
+ $copy->creator($e->requestor->id) if $U->ou_ancestor_setting_value(
+ $e->requestor->ws_ou, 'acq.copy_creator_uses_receiver', $e);
$e->update_asset_copy($copy) or return 0;
$mgr->add_lid;
('z', oils_i18n_gettext('z','Other','at','name'), 1),
('|', oils_i18n_gettext('|','No attempt to code','at','name'), 1);
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+ 'acq.copy_creator_uses_receiver',
+ oils_i18n_gettext(
+ 'acq.copy_creator_uses_receiver',
+ 'Acq: Set copy creator as receiver',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'acq.copy_creator_uses_receiver',
+ 'When receiving a copy in acquisitions, set the copy "creator" to be the staff that received the copy',
+ 'coust',
+ 'label'
+ ),
+ 'bool'
+);
+
--- /dev/null
+-- Evergreen DB patch XXXX.data.acq-copy-creator-from-receiver.sql
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+ 'acq.copy_creator_uses_receiver',
+ oils_i18n_gettext(
+ 'acq.copy_creator_uses_receiver',
+ 'Acq: Set copy creator as receiver',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'acq.copy_creator_uses_receiver',
+ 'When receiving a copy in acquisitions, set the copy "creator" to be the staff that received the copy',
+ 'coust',
+ 'label'
+ ),
+ 'bool'
+);
+
+COMMIT;