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

Evergreen Git git at git.evergreen-ils.org
Thu Aug 1 15:28:27 EDT 2013


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  72e2f9378361f990636e025d96b43e80a7967f50 (commit)
       via  d2ef1684cc4b71bc7714edb7a5dfdac19739fabc (commit)
      from  d6ec45265c0d1b4b1b9444d3525e0e7e13b646f7 (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 72e2f9378361f990636e025d96b43e80a7967f50
Author: Jason Stephenson <jstephenson at mvlc.org>
Date:   Thu Aug 1 15:27:18 2013 -0400

    Stamping upgrade script for LP1204273.
    
    Repair org unit settings for making state not required
    
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 8e8968f..0211ae6 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 ('0812', :eg_version); -- dbs/kmlussier
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0813', :eg_version); -- bshum/Dyrcona
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.state-field-settings-fix.sql b/Open-ILS/src/sql/Pg/upgrade/0813.data.state-field-settings-fix.sql
similarity index 94%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.state-field-settings-fix.sql
rename to Open-ILS/src/sql/Pg/upgrade/0813.data.state-field-settings-fix.sql
index f4fd4f6..071b26e 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.state-field-settings-fix.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0813.data.state-field-settings-fix.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0813', :eg_version);
 
 -- Don't require state in the auditor tracking for user addresses
 

commit d2ef1684cc4b71bc7714edb7a5dfdac19739fabc
Author: Ben Shum <bshum at biblio.org>
Date:   Mon Jul 22 15:10:37 2013 -0400

    LP1204273 - Repair org unit settings for making state not required
    
    As noted by tsbere in IRC, the org unit settings were using "au" instead of "aua"
    which led to issues applying the settings and making the addresses require the
    state field.
    
    Also, change the constraint for field_name on actor.org_unit_setting_type_log to
    be "DEFERRABLE INITIALLY DEFERRED" to be more flexible and consistent with other
    parts of the database relating to org unit setting names.
    
    And, the table auditor.actor_usr_address_history needs to be updated so that
    state can be NULL there as well.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 5d938ab..8e8968f 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -939,7 +939,7 @@ CREATE TABLE config.org_unit_setting_type_log (
     org             INT,   --REFERENCES actor.org_unit (id),
     original_value  TEXT,
     new_value       TEXT,
-    field_name      TEXT      REFERENCES config.org_unit_setting_type (name)
+    field_name      TEXT      REFERENCES config.org_unit_setting_type (name) DEFERRABLE INITIALLY DEFERRED
 );
 
 COMMENT ON TABLE config.org_unit_setting_type_log IS $$
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 fb3b637..89fb7c3 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -4593,29 +4593,29 @@ INSERT into config.org_unit_setting_type
         'coust', 'description'),
     'bool', null)
 
-,( 'ui.patron.edit.au.state.require', 'gui',
-    oils_i18n_gettext('ui.patron.edit.au.state.require',
+,( 'ui.patron.edit.aua.state.require', 'gui',
+    oils_i18n_gettext('ui.patron.edit.aua.state.require',
         'Require State field on patron registration',
         'coust', 'label'),
-    oils_i18n_gettext('ui.patron.edit.au.state.require',
+    oils_i18n_gettext('ui.patron.edit.aua.state.require',
         'The State field will be required on the patron registration screen.',
         'coust', 'description'),
     'bool', null)
 
-,( 'ui.patron.edit.au.state.show', 'gui',
-    oils_i18n_gettext('ui.patron.edit.au.state.show',
+,( 'ui.patron.edit.aua.state.show', 'gui',
+    oils_i18n_gettext('ui.patron.edit.aua.state.show',
         'Show State field on patron registration',
         'coust', 'label'),
-    oils_i18n_gettext('ui.patron.edit.au.state.show',
+    oils_i18n_gettext('ui.patron.edit.aua.state.show',
         'The State field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.',
         'coust', 'description'),
     'bool', null)
 
-,( 'ui.patron.edit.au.state.suggest', 'gui',
-    oils_i18n_gettext('ui.patron.edit.au.state.suggest',
+,( 'ui.patron.edit.aua.state.suggest', 'gui',
+    oils_i18n_gettext('ui.patron.edit.aua.state.suggest',
         'Suggest State field on patron registration',
         'coust', 'label'),
-    oils_i18n_gettext('ui.patron.edit.au.state.suggest',
+    oils_i18n_gettext('ui.patron.edit.aua.state.suggest',
         'The State field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.',
         'coust', 'description'),
     'bool', null)
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.state-field-settings-fix.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.state-field-settings-fix.sql
new file mode 100644
index 0000000..f4fd4f6
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.state-field-settings-fix.sql
@@ -0,0 +1,29 @@
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+-- Don't require state in the auditor tracking for user addresses
+
+ALTER TABLE auditor.actor_usr_address_history ALTER COLUMN state DROP NOT NULL;
+
+-- Change constraint on actor.org_unit_setting_log to be deferrable initially
+
+ALTER TABLE config.org_unit_setting_type_log
+  DROP CONSTRAINT org_unit_setting_type_log_field_name_fkey,
+  ADD CONSTRAINT org_unit_setting_type_log_field_name_fkey FOREIGN KEY (field_name)
+    REFERENCES config.org_unit_setting_type (name) MATCH SIMPLE
+    ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED;
+
+-- Fix names in the org unit setting configuration
+
+UPDATE config.org_unit_setting_type SET name = overlay(name placing 'aua' from 16 for 2) where name like 'ui.patron.edit.au.state.%';
+
+-- Fix names if they have already been set in the editor
+
+UPDATE actor.org_unit_setting SET name = overlay(name placing 'aua' from 16 for 2) where name like 'ui.patron.edit.au.state.%';
+
+-- and the logs too
+
+UPDATE config.org_unit_setting_type_log SET field_name = overlay(field_name placing 'aua' from 16 for 2) where field_name like 'ui.patron.edit.au.state.%';
+
+COMMIT;
diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js
index e70d867..32330a3 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -191,9 +191,9 @@ function load() {
         'opac.barcode_regex',
         'opac.username_regex',
         'sms.enable',
-        'ui.patron.edit.au.state.require',
-        'ui.patron.edit.au.state.suggest',
-        'ui.patron.edit.au.state.show'
+        'ui.patron.edit.aua.state.require',
+        'ui.patron.edit.aua.state.suggest',
+        'ui.patron.edit.aua.state.show'
     ]);
 
     for(k in orgSettings)

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

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    4 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   18 ++++++------
 .../upgrade/0813.data.state-field-settings-fix.sql |   29 ++++++++++++++++++++
 Open-ILS/web/js/ui/default/actor/user/register.js  |    6 ++--
 4 files changed, 43 insertions(+), 14 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0813.data.state-field-settings-fix.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list