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

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, master has been updated
       via  b9add5846c0faf392cdccc470efd19452843672e (commit)
       via  a2f33fedb3efb8a91775541084a963141f6b8cda (commit)
       via  b746411600bdd210a5ee4abb1ffa194b6c4f2a0d (commit)
       via  3c2e915019f1a5e740a66e18fe8bd7a8d587d1d8 (commit)
      from  de82391aa8379f95352a4e6f565f85bd1463a63b (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 b9add5846c0faf392cdccc470efd19452843672e
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 ea11be0..d2b94ed 100644
--- a/Open-ILS/src/templates/staff/circ/patron/index.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/index.tt2
@@ -61,7 +61,7 @@ angular.module('egCoreMod').run(['egStrings', function(s) {
   s.PATRON_PURGE_OVERRIDE_PROMPT = "[% l('The account has open transactions (circulations and/or unpaid bills). Purge anyway?') %]";
   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 a2f33fedb3efb8a91775541084a963141f6b8cda
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 9f2d4cc..ea11be0 100644
--- a/Open-ILS/src/templates/staff/circ/patron/index.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/index.tt2
@@ -61,6 +61,7 @@ angular.module('egCoreMod').run(['egStrings', function(s) {
   s.PATRON_PURGE_OVERRIDE_PROMPT = "[% l('The account has open transactions (circulations and/or unpaid bills). Purge anyway?') %]";
   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 b746411600bdd210a5ee4abb1ffa194b6c4f2a0d
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 21b875d..ce05bc0 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 3c2e915019f1a5e740a66e18fe8bd7a8d587d1d8
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 e24a3e9..54230dc 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