[otrs-cvs] otrs/var/httpd/htdocs/js Core.Agent.Admin.ProcessManagement.Canvas.js, 1.34, 1.35

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/var/httpd/htdocs/js
In directory lancelot:/tmp/cvs-serv14028/var/httpd/htdocs/js

Modified Files:
	Core.Agent.Admin.ProcessManagement.Canvas.js 
Log Message:
Fixed bug, where TransitionActions weren't correctly saved.

Author: mn

Index: Core.Agent.Admin.ProcessManagement.Canvas.js
===================================================================
RCS file: /home/cvs/otrs/var/httpd/htdocs/js/Core.Agent.Admin.ProcessManagement.Canvas.js,v
retrieving revision 1.34
retrieving revision 1.35
diff -2 -u -d -r1.34 -r1.35
--- Core.Agent.Admin.ProcessManagement.Canvas.js	21 Nov 2012 11:52:05 -0000	1.34
+++ Core.Agent.Admin.ProcessManagement.Canvas.js	26 Nov 2012 10:22:05 -0000	1.35
@@ -619,7 +619,15 @@
 
                 // set new Path
-                Path[Data.sourceId][TransitionID] = {
-                    ActivityEntityID: Data.targetId
-                };
+                // this event also fires on the initial drawing of the diagram
+                // we have to make sure, that existing data is not overwritten
+                // if the config entry already exists, there is no need to redefine it
+                if (typeof Path[Data.sourceId][TransitionID] === 'undefined') {
+                    Path[Data.sourceId][TransitionID] = {
+                        ActivityEntityID: Data.targetId
+                    };
+                }
+                else if (Path[Data.sourceId][TransitionID].ActivityEntityID !== Data.targetId) {
+                    Path[Data.sourceId][TransitionID].ActivityEntityID = Data.targetId;
+                }
 
                 // Correcting connection: setting parameters and overlays
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.