[open-ils-commits] [GIT] Evergreen ILS branch master updated. c2e848c0bb731c3d3667d4fee037e52754db1d04

Evergreen Git git at git.evergreen-ils.org
Wed Aug 24 20:21:23 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  c2e848c0bb731c3d3667d4fee037e52754db1d04 (commit)
       via  82640d0ec16b4f4277d22301d1029686b0195636 (commit)
      from  b5c55145272313c13b3e92e75361cb27772773ba (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c2e848c0bb731c3d3667d4fee037e52754db1d04
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Aug 24 20:16:28 2011 -0400

    Stamped upgrade script for acq-copy-creator-from-receiver
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 5f5cabf..941ea93 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0609', :eg_version); -- miker/berick
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0610', :eg_version); -- miker/berick
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq-copy-creator-from-receiver.sql b/Open-ILS/src/sql/Pg/upgrade/0610.data.acq-copy-creator-from-receiver.sql
similarity index 90%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq-copy-creator-from-receiver.sql
rename to Open-ILS/src/sql/Pg/upgrade/0610.data.acq-copy-creator-from-receiver.sql
index 14b22d4..afc8fc8 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq-copy-creator-from-receiver.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0610.data.acq-copy-creator-from-receiver.sql
@@ -2,7 +2,7 @@
 BEGIN;
 
 -- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0610', :eg_version);
 
 INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
     'acq.copy_creator_uses_receiver',

commit 82640d0ec16b4f4277d22301d1029686b0195636
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Aug 24 13:57:11 2011 -0400

    Option to set copy creator value to ACQ receiver
    
    YAOUS to support updating the asset.copy.creator value to match the
    staff user that marked the ACQ-copy (acq.lineitem_detail) as received.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
index 8dc31ab..7313cc1 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
@@ -527,6 +527,8 @@ sub receive_lineitem_detail {
     $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;
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 44f0f21..5213ff9 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -9692,3 +9692,20 @@ INSERT INTO authority.thesaurus (code, name, control_set) VALUES
     ('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'
+);
+
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq-copy-creator-from-receiver.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq-copy-creator-from-receiver.sql
new file mode 100644
index 0000000..14b22d4
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq-copy-creator-from-receiver.sql
@@ -0,0 +1,24 @@
+-- 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;

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Acq/Order.pm  |    2 +
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   17 ++++++++++++++
 .../0610.data.acq-copy-creator-from-receiver.sql   |   24 ++++++++++++++++++++
 4 files changed, 44 insertions(+), 1 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0610.data.acq-copy-creator-from-receiver.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list