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

Evergreen Git git at git.evergreen-ils.org
Fri Feb 10 10:58:12 EST 2017


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  a8d0df0254bfd376b972e1784d30f197dd795ff4 (commit)
       via  a84d141d2ea456719fc18879f1e5bccbddec9972 (commit)
      from  4377948ba4254afcab91cc1640eb92bf06f73392 (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 a8d0df0254bfd376b972e1784d30f197dd795ff4
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Fri Feb 10 10:55:07 2017 -0500

    LP#1360347: Stamping upgrade script for custom status at receiving
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 1c5b717..e0e88fe 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,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 ('1008', :eg_version); -- Dpearl/kmlussier
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1009', :eg_version); -- csharp/kmlussier
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_status_on_lineitem_receiving.sql b/Open-ILS/src/sql/Pg/upgrade/1009.data.acq_status_on_lineitem_receiving.sql
similarity index 88%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_status_on_lineitem_receiving.sql
rename to Open-ILS/src/sql/Pg/upgrade/1009.data.acq_status_on_lineitem_receiving.sql
index ada8a1e..1815121 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_status_on_lineitem_receiving.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1009.data.acq_status_on_lineitem_receiving.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1009', :eg_version);
 
 INSERT into config.org_unit_setting_type
 ( name, grp, label, description, datatype, fm_class ) VALUES

commit a84d141d2ea456719fc18879f1e5bccbddec9972
Author: Chris Sharp <csharp at georgialibraries.org>
Date:   Tue Aug 23 08:53:41 2016 -0400

    LP#1360347 - Acq custom copy status at receiving
    
    Current acq behavior is that received items get a
    copy status of "In Process".  This status is typically
    holdable and opac_visible, and some libraries have a need
    for an intermediate status between "On Order" and "In Process".
    
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

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 d3a106e..2a64bdf 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
@@ -767,7 +767,12 @@ sub receive_lineitem_detail {
     if ($lid->eg_copy_id) {
         my $copy = $e->retrieve_asset_copy($lid->eg_copy_id) or return 0;
         # only update status if it hasn't already been updated
-        $copy->status(OILS_COPY_STATUS_IN_PROCESS) if $copy->status == OILS_COPY_STATUS_ON_ORDER;
+        if ($copy->status == OILS_COPY_STATUS_ON_ORDER) {
+            my $custom_status = $U->ou_ancestor_setting_value(
+                $e->requestor->ws_ou, 'acq.copy_status_on_receiving', $e);
+            my $new_status = $custom_status || OILS_COPY_STATUS_IN_PROCESS;
+            $copy->status($new_status);
+        }
         $copy->edit_date('now');
         $copy->editor($e->requestor->id);
         $copy->creator($e->requestor->id) if $U->ou_ancestor_setting_value(
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 bfff3e2..a0171f1 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -2640,7 +2640,14 @@ INSERT into config.org_unit_setting_type
         'When receiving a copy in acquisitions, set the copy "creator" to be the staff that received the copy',
         'coust', 'description'),
     'bool', null)
-
+,( 'acq.copy_status_on_receiving', 'acq',
+    oils_i18n_gettext('acq.copy_status_on_receiving',
+        'Initial status for received items',
+        'coust', 'label'),
+    oils_i18n_gettext('acq.copy_status_on_receiving',
+        'Allows staff to designate a custom copy status on received lineitems.  Default status is "In Process".',
+        'coust', 'description'),
+    'link', 'ccs')
 ,( 'acq.default_circ_modifier', 'acq',
     oils_i18n_gettext('acq.default_circ_modifier',
         'Default circulation modifier',
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_status_on_lineitem_receiving.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_status_on_lineitem_receiving.sql
new file mode 100644
index 0000000..ada8a1e
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_status_on_lineitem_receiving.sql
@@ -0,0 +1,16 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT into config.org_unit_setting_type
+( name, grp, label, description, datatype, fm_class ) VALUES
+( 'acq.copy_status_on_receiving', 'acq',
+    oils_i18n_gettext('acq.copy_status_on_receiving',
+        'Initial status for received items',
+        'coust', 'label'),
+    oils_i18n_gettext('acq.copy_status_on_receiving',
+        'Allows staff to designate a custom copy status on received lineitems.  Default status is "In Process".',
+        'coust', 'description'),
+    'link', 'ccs');
+
+COMMIT;

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

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Acq/Order.pm  |    7 ++++++-
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |    9 ++++++++-
 .../1009.data.acq_status_on_lineitem_receiving.sql |   16 ++++++++++++++++
 4 files changed, 31 insertions(+), 3 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/1009.data.acq_status_on_lineitem_receiving.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list