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

Evergreen Git git at git.evergreen-ils.org
Fri Apr 21 10:40:46 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  8817b7536c97fe624cf8a243791360ee728e8c87 (commit)
      from  4d636e544449f8e67fe38552d74e96b12aff6201 (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 8817b7536c97fe624cf8a243791360ee728e8c87
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Fri Apr 21 10:06:17 2017 -0400

    LP#1685232: fix egCore.pcrud.apply()
    
    This patch fixes egCore.pcrud.apply() method so that it
    behaves as intended (i.e., process an array of fieldmapper
    objects and either creates, updates, or deletes them based
    on the value of the isnew(), ischanged(), and isdeleted()
    flags).
    
    To test
    -------
    Currently no code uses this method (but some will soon), but
    it can be tested by writing some code like this:
    
       var notes = [];
       var n1 = new egCore.idl.aun();
       n1.usr(userid); // etc.
       n1.isnew(true);
       notes.push(n1);
       var n2 = new egCore.idl.aun();
       n2.usr(userid); // etc.
       n2.isnew(true);
       notes.push(n1);
    
       egCore.pcrud.apply(notes).then(...
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/web/js/ui/default/staff/services/pcrud.js b/Open-ILS/web/js/ui/default/staff/services/pcrud.js
index 1f78b17..66fdba9 100644
--- a/Open-ILS/web/js/ui/default/staff/services/pcrud.js
+++ b/Open-ILS/web/js/ui/default/staff/services/pcrud.js
@@ -267,12 +267,12 @@ angular.module('egCoreMod')
             var action = this.cud_action;
             var fm_obj = this.cud_list[this.cud_idx++];
 
-            if (action == 'auto') {
+            if (action == 'apply') {
                 if (fm_obj.ischanged()) action = 'update';
                 if (fm_obj.isnew())     action = 'create';
                 if (fm_obj.isdeleted()) action = 'delete';
 
-                if (action == 'auto') {
+                if (action == 'apply') {
                     // object does not need updating; move along
                     this._CUD_next_request();
                 }

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

Summary of changes:
 Open-ILS/web/js/ui/default/staff/services/pcrud.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list