[open-ils-commits] [GIT] Evergreen ILS branch rel_2_12 updated. 22a50b0dbec8a2abf1ccff313b81a9a2d851f603

Evergreen Git git at git.evergreen-ils.org
Mon Aug 7 11:05:36 EDT 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, rel_2_12 has been updated
       via  22a50b0dbec8a2abf1ccff313b81a9a2d851f603 (commit)
       via  c693e67afd61743a16d1eb425a4983a459cf1ec9 (commit)
       via  2f3573bb228768480de067de0792abc4dbad512e (commit)
       via  999b87f3df8df46e578f4099439eaa168daa6a2a (commit)
      from  d4394198b7deb382857a9f4cc15db4cf43f68568 (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 22a50b0dbec8a2abf1ccff313b81a9a2d851f603
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Mon Aug 7 11:15:57 2017 -0400

    LP#1694529: tweak wording of collision alert message
    
    And here's a test plan for the patch series as a whole:
    
    [1] In the web staff client, retrieve a patron that has some
        loans. In a separate window, open the patron editor
        for that same patron.
    [2] In the first window, mark one of the patron's loans
        as either claims returned or claims never checked out.
    [3] In the second window, make a change and attempt to save
        the record. You should see a alert dialog saying that
        the record could not be saved.
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/circ/patron/index.tt2 b/Open-ILS/src/templates/staff/circ/patron/index.tt2
index 1bcb439..2589306 100644
--- a/Open-ILS/src/templates/staff/circ/patron/index.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/index.tt2
@@ -53,7 +53,7 @@ angular.module('egCoreMod').run(['egStrings', function(s) {
   s.PATRON_NOTE_DELETE_CONFIRM = "[% l('Delete the note titled \"[_1]\" created on [_2]?', '{{note_title}}', '{{create_date | date}}') %]";
   s.OPT_IN_DIALOG_TITLE = "[% l('Verify Permission to Share Personal Information') %]";
   s.OPT_IN_DIALOG = "[% l('Does patron [_1], [_2] from [_3] ([_4]) consent to having their personal information shared with your library?', '{{family_name}}', '{{first_given_name}}', '{{org_name}}', '{{org_shortname}}') %]";
-  s.PATRON_EDIT_COLLISION = "[% l('Patron record was modified while editing.  Please reapply changes.') %]";
+  s.PATRON_EDIT_COLLISION = "[% l('Patron record was modified by another user while you were editing it. Your changes were not saved; please reapply them.') %]";
 }]);
 </script>
 

commit c693e67afd61743a16d1eb425a4983a459cf1ec9
Author: Bill Erickson <berickxx at gmail.com>
Date:   Thu Jun 29 17:53:56 2017 -0400

    LP#1694529 Patron editor friendly xact ID collision alert
    
    Display a friendly alert dialog message to staff when attempting to save
    a patron record that has been externally modified during editing.  This
    is an improvement over the existing debug alert with JSON data.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/circ/patron/index.tt2 b/Open-ILS/src/templates/staff/circ/patron/index.tt2
index 95701fe..1bcb439 100644
--- a/Open-ILS/src/templates/staff/circ/patron/index.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/index.tt2
@@ -53,6 +53,7 @@ angular.module('egCoreMod').run(['egStrings', function(s) {
   s.PATRON_NOTE_DELETE_CONFIRM = "[% l('Delete the note titled \"[_1]\" created on [_2]?', '{{note_title}}', '{{create_date | date}}') %]";
   s.OPT_IN_DIALOG_TITLE = "[% l('Verify Permission to Share Personal Information') %]";
   s.OPT_IN_DIALOG = "[% l('Does patron [_1], [_2] from [_3] ([_4]) consent to having their personal information shared with your library?', '{{family_name}}', '{{first_given_name}}', '{{org_name}}', '{{org_shortname}}') %]";
+  s.PATRON_EDIT_COLLISION = "[% l('Patron record was modified while editing.  Please reapply changes.') %]";
 }]);
 </script>
 
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
index 3cc9348..f40a9c0 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
@@ -1810,6 +1810,14 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
                 return patronRegSvc.save_user_settings(
                     new_user, $scope.user_settings); 
             } else {
+                var evt = egCore.evt.parse(new_user);
+
+                if (evt && evt.textcode == 'XACT_COLLISION') {
+                    return egAlertDialog.open(
+                        egCore.strings.PATRON_EDIT_COLLISION).result;
+                }
+
+                // debug only -- should not get here.
                 alert('Patron update failed. \n\n' + js2JSON(new_user));
             }
 

commit 2f3573bb228768480de067de0792abc4dbad512e
Author: Bill Erickson <berickxx at gmail.com>
Date:   Thu Jun 29 17:53:33 2017 -0400

    LP#1694529 Claims never checked out updates patron last-xact-id
    
    Force an upate to the user last_xact_id value when marking an item claims
    never checked out, since the process results in patron record changes.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
index e12828c..60c938a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -290,6 +290,16 @@ sub run_method {
 
     } else {
 
+        # checkin and reservation return can result in modifications to
+        # actor.usr.claims_never_checked_out_count without also modifying
+        # actor.last_xact_id.  Perform a no-op update on the patron to
+        # force an update to last_xact_id.
+        if ($circulator->claims_never_checked_out && $circulator->patron) {
+            $circulator->editor->update_actor_user(
+                $circulator->editor->retrieve_actor_user($circulator->patron->id))
+                or return $circulator->editor->die_event;
+        }
+
         $circulator->editor->commit;
     }
     

commit 999b87f3df8df46e578f4099439eaa168daa6a2a
Author: Bill Erickson <berickxx at gmail.com>
Date:   Thu Jun 29 17:53:14 2017 -0400

    LP#1694529 Claims returned updates patron last-xact-id
    
    Force an upate to the user last_xact_id value when making an item claims
    returned, since the process results in patron record changes.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm
index 4d9f881..165ae1c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm
@@ -538,6 +538,11 @@ sub set_circ_claims_returned {
         }
     }
 
+    # Now that all data has been munged, do a no-op update of 
+    # the patron to force a change of the last_xact_id value.
+    $e->update_actor_user($e->retrieve_actor_user($circ->usr))
+        or return $e->die_event;
+
     $e->commit;
     return 1;
 }

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

Summary of changes:
 .../src/perlmods/lib/OpenILS/Application/Circ.pm   |    5 +++++
 .../lib/OpenILS/Application/Circ/Circulate.pm      |   10 ++++++++++
 Open-ILS/src/templates/staff/circ/patron/index.tt2 |    1 +
 .../web/js/ui/default/staff/circ/patron/regctl.js  |    8 ++++++++
 4 files changed, 24 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list