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

Evergreen Git git at git.evergreen-ils.org
Tue Feb 14 00:11:46 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  a96b65be518926b1c4065506c2843c7d21cfebb9 (commit)
       via  01c3c04e87d17c3d24aeb55bed37b1e87c5a1832 (commit)
       via  8aa0fe4c6622f6e86727311048e3b326a236e036 (commit)
       via  1a0e8b2e75ece09694810cd7f3ba8b4c0cf0cec0 (commit)
       via  9067b32763637299597bbe9ad4dc9bc084b1c102 (commit)
      from  90c5c52e2f97a2f6a9a48ac8efb1330c26b73668 (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 a96b65be518926b1c4065506c2843c7d21cfebb9
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Tue Feb 14 00:09:06 2017 -0500

    LP#1507807: Stamping upgrade script for in-house copy alerts
    
    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 ed66ee3..10eee0c 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 ('1010', :eg_version); -- csharp/jeff/bshum
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1011', :eg_version); -- Dyrcona/kmlussier
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.in-house-use_copy_alert.sql b/Open-ILS/src/sql/Pg/upgrade/1011.data.in-house-use_copy_alert.sql
similarity index 93%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.in-house-use_copy_alert.sql
rename to Open-ILS/src/sql/Pg/upgrade/1011.data.in-house-use_copy_alert.sql
index ea5364c..667b12e 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.in-house-use_copy_alert.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1011.data.in-house-use_copy_alert.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1011', :eg_version);
 
 INSERT INTO config.org_unit_setting_type
     (name, grp, label, description, datatype)

commit 01c3c04e87d17c3d24aeb55bed37b1e87c5a1832
Author: Jason Stephenson <jason at sigio.com>
Date:   Thu Mar 24 21:35:27 2016 -0400

    LP 1507807: Release Notes for In-House-Use Copy Alerts
    
    Add a release notes document explaining how the settings work.
    
    If you want to test the functionality, you should set the settings to
    true.  Next, find a copy with an alert message and another copy with
    the check in alert set to true on its location.  Recording an
    in-house-use for either of these copies should cause an alert to
    display the respective message.  If a copy has both, then two alerts
    will appear one after the other.
    
    Resetting the settings to false or deleting the settings should stop
    the alerts from displaying.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/docs/RELEASE_NOTES_NEXT/Circulation/lp1507807_in-house-use_copy_alerts.adoc b/docs/RELEASE_NOTES_NEXT/Circulation/lp1507807_in-house-use_copy_alerts.adoc
new file mode 100644
index 0000000..3566032
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Circulation/lp1507807_in-house-use_copy_alerts.adoc
@@ -0,0 +1,18 @@
+Display Copy Alerts With In-House-Use
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Two library settings are used to control the display of copy alert
+messages or copy location check in alerts when recording in-house-use
+in Evergreen.
+
+Setting 'Display copy alert for in-house-use' to true for an
+organization will cause an alert to appear with the copy's alert
+message, if it has one, when recording in-house-use for the copy.
+
+Setting 'Display copy location check in alert for in-house-use' to true
+for an organization will cause an alert to display a message
+indicating that the item needs to be routed to its location if the
+location has check in alert set to true.
+
+The settings are independent of one another because you may want to
+display one and not the other when recording in-house-use.

commit 8aa0fe4c6622f6e86727311048e3b326a236e036
Author: Jason Stephenson <jason at sigio.com>
Date:   Tue Mar 22 21:25:17 2016 -0400

    LP 1507807: Show Alert dialogs in XUL staff client.
    
    If the circ.in_house_use.copy_alert org setting is true and the copy
    has an alert_message, then we display an alert dialog with the copy
    alert message when doing an in-house-use in the XUL staff client.
    
    If the circ.in_house_use.checkin_alert org setting is true and the
    copy location checkin_alert field is also true, then we display an
    alert dialog with the "item needs to be routed to..." alert message
    when doing an in-house-use in the XUL staff client.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/xul/staff_client/server/circ/in_house_use.js b/Open-ILS/xul/staff_client/server/circ/in_house_use.js
index 2287448..a6cfe94 100644
--- a/Open-ILS/xul/staff_client/server/circ/in_house_use.js
+++ b/Open-ILS/xul/staff_client/server/circ/in_house_use.js
@@ -292,6 +292,16 @@ circ.in_house_use.prototype = {
                     [ ses(), { 'copyid' : copy.id(), 'location' : obj.data.list.au[0].ws_ou(), 'count' : multiplier } ]
                 );
 
+                // LP1507807: Display the copy alert if the setting is on.
+                if (obj.data.hash.aous['circ.in_house_use.copy_alert'] && copy.alert_message()) {
+                    alert(copy.alert_message());
+                }
+
+                // LP1507807: Display the location alert if the setting is on.
+                if (obj.data.hash.aous['circ.in_house_use.checkin_alert'] && isTrue(copy.location().checkin_alert())) {
+                    alert(document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [copy.location().name()]));
+                }
+
             } else {
                 var result = obj.network.simple_request('FM_ANCIHU_CREATE',
                     [ ses(), { 'non_cat_type' : obj.controller.view.in_house_use_menu.value, 'location' : obj.data.list.au[0].ws_ou(), 'count' : multiplier } ]

commit 1a0e8b2e75ece09694810cd7f3ba8b4c0cf0cec0
Author: Jason Stephenson <jason at sigio.com>
Date:   Sat Mar 19 20:36:55 2016 -0400

    LP 1507807: Show Alert dialogs in browser staff client.
    
    If the circ.in_house_use.copy_alert org setting is true and the copy
    has an alert_message, then we display an alert dialog with the copy
    alert message when doing an in-house-use in the browser staff client.
    
    If the circ.in_house_use.checkin_alert org setting is true and the
    copy location checkin_alert field is also true, then we display an
    alert dialog with the "item needs to be routed to..." alert message
    when doing an in-house-use in the browser staff client.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 b/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2
index 34b7ef0..254d804 100644
--- a/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2
+++ b/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2
@@ -8,6 +8,7 @@
 [% BLOCK APP_JS %]
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/grid.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/ui.js"></script>
+[% INCLUDE 'staff/circ/share/circ_strings.tt2' %]
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/in_house_use/app.js"></script>
 [% END %]
 
diff --git a/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js b/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js
index 2183d96..dab5420 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js
@@ -9,8 +9,8 @@ angular.module('egInHouseUseApp',
 })
 
 .controller('InHouseUseCtrl',
-       ['$scope','egCore','egGridDataProvider','egConfirmDialog',
-function($scope,  egCore,  egGridDataProvider , egConfirmDialog) {
+       ['$scope','egCore','egGridDataProvider','egConfirmDialog', 'egAlertDialog',
+function($scope,  egCore,  egGridDataProvider , egConfirmDialog, egAlertDialog) {
 
     var countCap;
     var countMax;
@@ -31,11 +31,17 @@ function($scope,  egCore,  egGridDataProvider , egConfirmDialog) {
         
         egCore.org.settings([
             'ui.circ.in_house_use.entry_cap',
-            'ui.circ.in_house_use.entry_warn'
+            'ui.circ.in_house_use.entry_warn',
+            'circ.in_house_use.copy_alert',
+            'circ.in_house_use.checkin_alert'
         ]).then(function(set) {
             countWarn = set['ui.circ.in_house_use.entry_warn'] || 20;
             $scope.countMax = countMax = 
                 set['ui.circ.in_house_use.entry_cap'] || 99;
+            $scope.copyAlert = copyAlert =
+                set['circ.in_house_use.copy_alert'] || false;
+            $scope.checkinAlert = checkinAlert =
+                set['circ.in_house_use.checkin_alert'] || false;
         });
     });
 
@@ -86,6 +92,16 @@ function($scope,  egCore,  egGridDataProvider , egConfirmDialog) {
 
                 coArgs.copyid = copy.id();
 
+                // LP1507807: Display the copy alert if the setting is on.
+                if ($scope.copyAlert && copy.alert_message()) {
+                    egAlertDialog.open(copy.alert_message()).result;
+                }
+
+                // LP1507807: Display the location alert if the setting is on.
+                if ($scope.checkinAlert && copy.location().checkin_alert() == 't') {
+                    egAlertDialog.open(egCore.strings.LOCATION_ALERT_MSG, {copy: copy}).result;
+                }
+
                 performCheckout(
                     'open-ils.circ.in_house_use.create',
                     coArgs, {copy:copy}

commit 9067b32763637299597bbe9ad4dc9bc084b1c102
Author: Jason Stephenson <jason at sigio.com>
Date:   Thu Mar 10 21:13:57 2016 -0500

    LP 1507807: Add org unit settings for in-house-use copy alerts.
    
    Add circ.in_house_use.copy_alert and circ.in_house_use.checkin_alert
    org. unit setting types to seed data and upgrade script.
    
    No default values are provided for the new settings.  They are not
    defined (i.e. off) by default.
    
    Add a PgTap test to verify that the org. unit setting types exist in
    the database.
    
    See the release notes for what these settings do.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

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 52ac033..56408b2 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -16476,3 +16476,25 @@ INSERT INTO action_trigger.environment (
     currval('action_trigger.event_definition_id_seq'),
     'circ_lib'
 );
+
+INSERT INTO config.org_unit_setting_type
+(name, grp, label, description, datatype)
+VALUES
+('circ.in_house_use.copy_alert',
+ 'circ',
+ oils_i18n_gettext('circ.in_house_use.copy_alert',
+     'Display copy alert for in-house-use',
+     'coust', 'label'),
+ oils_i18n_gettext('circ.in_house_use.copy_alert',
+     'Display copy alert for in-house-use',
+     'coust', 'description'),
+ 'bool'),
+('circ.in_house_use.checkin_alert',
+ 'circ',
+ oils_i18n_gettext('circ.in_house_use.checkin_alert',
+     'Display copy location checkin alert for in-house-use',
+     'coust', 'label'),
+ oils_i18n_gettext('circ.in_house_use.checkin_alert',
+     'Display copy location checkin alert for in-house-use',
+     'coust', 'description'),
+ 'bool');
diff --git a/Open-ILS/src/sql/Pg/t/lp1507807_in-house-use_alerts.pg b/Open-ILS/src/sql/Pg/t/lp1507807_in-house-use_alerts.pg
new file mode 100644
index 0000000..8d6f351
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/t/lp1507807_in-house-use_alerts.pg
@@ -0,0 +1,21 @@
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(2);
+
+-- Run the tests.
+
+SELECT isnt_empty(
+    'SELECT * FROM config.org_unit_setting_type WHERE name = $$circ.in_house_use.copy_alert$$',
+    'circ.in_house_use.copy_alert exists'
+);
+
+SELECT isnt_empty(
+    'SELECT * FROM config.org_unit_setting_type WHERE name = $$circ.in_house_use.checkin_alert$$',
+    'circ.in_house_use.checkin_alert exists'
+);
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.in-house-use_copy_alert.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.in-house-use_copy_alert.sql
new file mode 100644
index 0000000..ea5364c
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.in-house-use_copy_alert.sql
@@ -0,0 +1,27 @@
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO config.org_unit_setting_type
+    (name, grp, label, description, datatype)
+    VALUES
+        ('circ.in_house_use.copy_alert',
+         'circ',
+         oils_i18n_gettext('circ.in_house_use.copy_alert',
+             'Display copy alert for in-house-use',
+             'coust', 'label'),
+         oils_i18n_gettext('circ.in_house_use.copy_alert',
+             'Display copy alert for in-house-use',
+             'coust', 'description'),
+         'bool'),
+        ('circ.in_house_use.checkin_alert',
+         'circ',
+         oils_i18n_gettext('circ.in_house_use.checkin_alert',
+             'Display copy location checkin alert for in-house-use',
+             'coust', 'label'),
+         oils_i18n_gettext('circ.in_house_use.checkin_alert',
+             'Display copy location checkin alert for in-house-use',
+             'coust', 'description'),
+         'bool');
+
+COMMIT;

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

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   22 ++++++++++++++++
 .../src/sql/Pg/t/lp1507807_in-house-use_alerts.pg  |   21 +++++++++++++++
 .../upgrade/1011.data.in-house-use_copy_alert.sql  |   27 ++++++++++++++++++++
 .../templates/staff/circ/in_house_use/index.tt2    |    1 +
 .../js/ui/default/staff/circ/in_house_use/app.js   |   22 ++++++++++++++--
 .../xul/staff_client/server/circ/in_house_use.js   |   10 +++++++
 .../lp1507807_in-house-use_copy_alerts.adoc        |   18 +++++++++++++
 8 files changed, 119 insertions(+), 4 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/t/lp1507807_in-house-use_alerts.pg
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/1011.data.in-house-use_copy_alert.sql
 create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/lp1507807_in-house-use_copy_alerts.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list