From 70fa7efe4c19e890a95d18aaf9ae88d305eeef03 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Wed, 16 Apr 2014 10:15:34 -0400 Subject: [PATCH] BUG 14024 Issue in Case Tracker SOLVED - Missing validation for fields "CT_DERIVATION_HISTORY" and "CT_MESSAGE_HISTORY", this fields only accepts values 1 and 0 - Add data validation for fields "CT_DERIVATION_HISTORY" and "CT_MESSAGE_HISTORY" --- gulliver/js/ext/min/ext-all.js | 8 ++++---- gulliver/js/maborak/core/maborak.loader.js | 2 +- workflow/engine/classes/model/CaseTracker.php | 6 ++++++ workflow/engine/js/processmap/core/processmap.js | 4 ++-- workflow/engine/js/stagesmap/core/stagesmap.js | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/gulliver/js/ext/min/ext-all.js b/gulliver/js/ext/min/ext-all.js index ca099948b..7912bff9f 100644 --- a/gulliver/js/ext/min/ext-all.js +++ b/gulliver/js/ext/min/ext-all.js @@ -6,11 +6,11 @@ PMExtJSCommon=function(){this.version='1.8';this.notify_time_out=3;this.confirm= setTimeout(fnYes,0) else if(fnNo!=undefined) setTimeout(fnNo,0)});} -this.info=function(title,msg,fn){Ext.MessageBox.show({title:title,msg:msg,buttons:Ext.MessageBox.OK,animEl:'mb9',fn:fn!=undefined?fn:function(){},icon:Ext.MessageBox.INFO});} -this.question=function(title,msg,fn){Ext.MessageBox.show({title:title,msg:msg,buttons:Ext.MessageBox.YESNO,animEl:'mb9',fn:function(btn,text){if(btn=='yes') +this.info=function(title,msg,fn){Ext.MessageBox.show({id:'infoMessageBox',title:title,msg:msg,buttons:Ext.MessageBox.OK,animEl:'mb9',fn:fn!=undefined?fn:function(){},icon:Ext.MessageBox.INFO});} +this.question=function(title,msg,fn){Ext.MessageBox.show({id:'questionMessageBox',title:title,msg:msg,buttons:Ext.MessageBox.YESNO,animEl:'mb9',fn:function(btn,text){if(btn=='yes') setTimeout(fn,0);},icon:Ext.MessageBox.QUESTION});} -this.warning=function(title,msg,fn){Ext.MessageBox.show({title:title,msg:msg,buttons:Ext.MessageBox.OK,animEl:'mb9',fn:fn!=undefined?fn:function(){},icon:Ext.MessageBox.WARNING});} -this.error=function(title,msg,fn){Ext.MessageBox.show({title:title,msg:msg,buttons:Ext.MessageBox.OK,animEl:'mb9',fn:fn!=undefined?fn:function(){},icon:Ext.MessageBox.ERROR});} +this.warning=function(title,msg,fn){Ext.MessageBox.show({id:'warningMessageBox',title:title,msg:msg,buttons:Ext.MessageBox.OK,animEl:'mb9',fn:fn!=undefined?fn:function(){},icon:Ext.MessageBox.WARNING});} +this.error=function(title,msg,fn){Ext.MessageBox.show({id:'errorMessageBox',title:title,msg:msg,buttons:Ext.MessageBox.OK,animEl:'mb9',fn:fn!=undefined?fn:function(){},icon:Ext.MessageBox.ERROR});} this.notify=function(title,msg,type,time) {Ext.msgBoxSlider.msg(title,msg,type,time);} this.getBrowser=function() diff --git a/gulliver/js/maborak/core/maborak.loader.js b/gulliver/js/maborak/core/maborak.loader.js index b87e81c97..840db2286 100644 --- a/gulliver/js/maborak/core/maborak.loader.js +++ b/gulliver/js/maborak/core/maborak.loader.js @@ -833,7 +833,7 @@ var r=new leimnud.module.rpc.xmlhttp({url:this.options.dataServer,args:"action=d {panel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();panel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this,panel);r.make();}.extend(this)},{image:"/images/dynaforms.gif",text:G_STRINGS.ID_PROCESSMAP_SUPERVISORS_DYNAFORMS,launch:function(event){this.tmp.editProcessPanel=panel=new leimnud.module.panel();panel.options={limit:true,size:{w:500,h:380},position:{x:50,y:50,center:true},title:G_STRINGS.ID_PROCESSMAP_SUPERVISORS_DYNAFORMS,theme:this.options.theme,control:{close:true,resize:false},fx:{modal:true},statusBar:false,fx:{shadow:true,modal:true}};panel.make();panel.loader.show();var r=new leimnud.module.rpc.xmlhttp({url:this.options.dataServer,args:"action=supervisorDynaforms&data="+{pro_uid:this.options.uid}.toJSONString()});r.callback=function(rpc,panel) {panel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();panel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this,panel);r.make();}.extend(this)},{image:"/images/inputdocument.gif",text:G_STRINGS.ID_PROCESSMAP_SUPERVISORS_INPUTS,launch:function(event){this.tmp.editProcessPanel=panel=new leimnud.module.panel();panel.options={limit:true,size:{w:500,h:380},position:{x:50,y:50,center:true},title:G_STRINGS.ID_PROCESSMAP_SUPERVISORS_INPUTS,theme:this.options.theme,control:{close:true,resize:false},fx:{modal:true},statusBar:false,fx:{shadow:true,modal:true}};panel.make();panel.loader.show();var r=new leimnud.module.rpc.xmlhttp({url:this.options.dataServer,args:"action=supervisorInputs&data="+{pro_uid:this.options.uid}.toJSONString()});r.callback=function(rpc,panel) {panel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();panel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this,panel);r.make();}.extend(this)}]},{separator:true},{image:"/images/dynaforms.gif",text:G_STRINGS.ID_WEB_ENTRY,launch:function(event){this.tmp.editProcessPanel=panel=new leimnud.module.panel();panel.options={limit:true,size:{w:500,h:380},position:{x:50,y:50,center:true},title:G_STRINGS.ID_WEB_ENTRY,theme:this.options.theme,control:{close:true,resize:true},fx:{modal:true},statusBar:false,fx:{shadow:true,modal:true}};panel.make();panel.loader.show();var r=new leimnud.module.rpc.xmlhttp({url:this.options.dataServer,args:"action=webEntry&data="+{pro_uid:this.options.uid}.toJSONString()});r.callback=function(rpc,panel) -{panel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();panel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this,panel);r.make();}.extend(this)},{image:"/images/tracker.gif",text:G_STRINGS.ID_CASE_TRACKER,submenu:[{image:"/images/tracker.gif",text:G_STRINGS.ID_CASE_TRACKER_PROPERTIES,launch:function(event){this.tmp.caseTrackerPanel=panel=new leimnud.module.panel();panel.options={limit:true,size:{w:300,h:180},position:{x:50,y:50,center:true},title:G_STRINGS.ID_CASE_TRACKER,theme:this.options.theme,control:{close:true,resize:false},fx:{modal:true},statusBar:false,fx:{shadow:true,modal:true}};panel.make();panel.loader.show();var r=new leimnud.module.rpc.xmlhttp({url:this.options.dataServer,args:"action=caseTracker&data="+{pro_uid:this.options.uid}.toJSONString()});r.callback=function(rpc,panel) +{panel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();panel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this,panel);r.make();}.extend(this)},{image:"/images/tracker.gif",text:G_STRINGS.ID_CASE_TRACKER,submenu:[{image:"/images/tracker.gif",text:G_STRINGS.ID_CASE_TRACKER_PROPERTIES,launch:function(event){this.tmp.caseTrackerPanel=panel=new leimnud.module.panel();panel.options={limit:true,size:{w:300,h:200},position:{x:50,y:50,center:true},title:G_STRINGS.ID_CASE_TRACKER,theme:this.options.theme,control:{close:true,resize:false},fx:{modal:true},statusBar:false,fx:{shadow:true,modal:true}};panel.make();panel.loader.show();var r=new leimnud.module.rpc.xmlhttp({url:this.options.dataServer,args:"action=caseTracker&data="+{pro_uid:this.options.uid}.toJSONString()});r.callback=function(rpc,panel) {panel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();panel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this,panel);r.make();}.extend(this)},{image:"/images/tracker.gif",text:G_STRINGS.ID_CASE_TRACKER_OBJECTS,launch:function(event){this.tmp.caseTrackerPanel=panel=new leimnud.module.panel();panel.options={limit:true,size:{w:500,h:380},position:{x:50,y:50,center:true},title:G_STRINGS.ID_CASE_TRACKER_OBJECTS,theme:this.options.theme,control:{close:true,resize:false},fx:{modal:true},statusBar:false,fx:{shadow:true,modal:true}};panel.make();panel.loader.show();var r=new leimnud.module.rpc.xmlhttp({url:this.options.dataServer,args:"action=caseTrackerObjects&data="+{pro_uid:this.options.uid}.toJSONString()});r.callback=function(rpc,panel) {panel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();panel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this,panel);r.make();}.extend(this)}]},{image:"/images/folder.gif",text:G_STRINGS.ID_PROCESS_FILES_MANAGER,launch:function(event){this.tmp.processFilesManagerPanel=panel=new leimnud.module.panel();panel.options={limit:true,size:{w:500,h:380},position:{x:50,y:50,center:true},title:G_STRINGS.ID_PROCESS_FILES_MANAGER,theme:this.options.theme,control:{close:true,resize:false},fx:{modal:true},statusBar:false,fx:{shadow:true,modal:true}};panel.make();panel.loader.show();var r=new leimnud.module.rpc.xmlhttp({url:this.options.dataServer,args:"action=processFilesManager&data="+{pro_uid:this.options.uid}.toJSONString()});r.callback=function(rpc,panel) {panel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();panel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this,panel);r.make();}.extend(this)},{image:"/images/events.gif",text:G_STRINGS.ID_EVENTS,submenu:[{image:"/images/event_messageThrow.png",text:G_STRINGS.ID_INTERMEDIATE_MESSAGE_EVENT,launch:function(event){this.tmp.eventsPanel=panel=new leimnud.module.panel();panel.options={limit:true,size:{w:700,h:380},position:{x:50,y:50,center:true},title:G_STRINGS.ID_EVENT_MESSAGE,theme:this.options.theme,control:{close:true,resize:false},fx:{modal:true},statusBar:false,fx:{shadow:true,modal:true}};panel.make();panel.loader.show();var r=new leimnud.module.rpc.xmlhttp({url:this.options.dataServer,args:"action=events&data="+{pro_uid:this.options.uid,type:"message"}.toJSONString()});r.callback=function(rpc,panel) diff --git a/workflow/engine/classes/model/CaseTracker.php b/workflow/engine/classes/model/CaseTracker.php index 0a06f7a4e..b8207bc4c 100755 --- a/workflow/engine/classes/model/CaseTracker.php +++ b/workflow/engine/classes/model/CaseTracker.php @@ -71,6 +71,12 @@ class CaseTracker extends BaseCaseTracker try { $oCaseTracker = CaseTrackerPeer::retrieveByPK( $aData['PRO_UID'] ); if (! is_null( $oCaseTracker )) { + if ($aData['CT_DERIVATION_HISTORY'] == '') { + $aData['CT_DERIVATION_HISTORY'] = 0; + } + if ($aData['CT_MESSAGE_HISTORY'] == '') { + $aData['CT_MESSAGE_HISTORY'] = 0; + } $oCaseTracker->fromArray( $aData, BasePeer::TYPE_FIELDNAME ); if ($oCaseTracker->validate()) { $oConnection->begin(); diff --git a/workflow/engine/js/processmap/core/processmap.js b/workflow/engine/js/processmap/core/processmap.js index 8b155ea9a..09ebaddd8 100755 --- a/workflow/engine/js/processmap/core/processmap.js +++ b/workflow/engine/js/processmap/core/processmap.js @@ -600,7 +600,7 @@ var processmap=function(){ this.tmp.caseTrackerPanel = panel =new leimnud.module.panel(); panel.options={ limit :true, - size :{w:300,h:180}, + size :{w:300,h:200}, position:{x:50,y:50,center:true}, title :G_STRINGS.ID_CASE_TRACKER, theme :this.options.theme, @@ -2472,7 +2472,7 @@ processmap.prototype={ height:25 }); } catch(e) { - + } } diff --git a/workflow/engine/js/stagesmap/core/stagesmap.js b/workflow/engine/js/stagesmap/core/stagesmap.js index 2fb901a1a..ba0a8942d 100755 --- a/workflow/engine/js/stagesmap/core/stagesmap.js +++ b/workflow/engine/js/stagesmap/core/stagesmap.js @@ -452,8 +452,8 @@ stagesmap.prototype={ this.panels.editor=new leimnud.module.panel(); this.panels.editor.options={ limit:true, - size:{w:this.options.size.w,h:this.options.size.h}, - position:{x:200,y:0,centerX:true}, + size:{w:this.options.size.w,h:this.options.size.h - 10}, + position:{x:0,y:0}, title:"", titleBar:false, control:{