Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #4173

Category None
Changed by Galen Charlton <gmcohnoyoudont@equinoxinitiative.org>
Changed at Fri 21 Apr 2017 10:29:51
Repository git://git.evergreen-ils.org/Evergreen.git
Project Evergreen
Branch master
Revision 8817b7536c97fe624cf8a243791360ee728e8c87

Comments

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@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>

Changed files