From bd748a805cc1dbd1d2645f24bb1fd29a371892ec Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Fri, 22 Feb 2013 15:55:26 -0400 Subject: [PATCH 1/2] BUG 10850 Cuando se borra una tarea de un proceso no se borra... SOLVED - Derivation no were erased correctly. - Was add validation in file processmap. with '#' will be ignored, and an empty message aborts the commit. --- .../engine/js/processmap/core/processmap.js | 45 ++++++++++++++----- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/workflow/engine/js/processmap/core/processmap.js b/workflow/engine/js/processmap/core/processmap.js index a6e99e4f9..fb5a1f203 100755 --- a/workflow/engine/js/processmap/core/processmap.js +++ b/workflow/engine/js/processmap/core/processmap.js @@ -958,7 +958,9 @@ var processmap=function(){ this.parent.dom.setStyle(task.object.elements.derivation,{ background:"" }); - task.derivation={to:[]}; + if (spec == false && typeof(rec) == 'undefined') { + task.derivation={to:[]}; + } /* Delete derivation recursive */ if(rec) @@ -1556,6 +1558,24 @@ var processmap=function(){ this.dropables.derivation.unregister(data.object.dropIndex); this.data.render.deleteDerivation(data.uid, true); this.parent.dom.remove(data.object.elements); + var taskUidDelete = this.data.db.task[data.object.dropIndex].uid; + for (var i= 0; i<(this.data.db.task).length;i++) { + for (var j= 0; j<(this.data.db.task[i]).length;j++) { + this.data.db.task[i] = this.data.db.task[i+1]; + } + var j = 0; + var itemDelete = (this.data.db.task[i]).derivation; + while (j < itemDelete.to.length) { + if (itemDelete.to[j].task == taskUidDelete) { + for (var k= j; k