[otrs-cvs] otrs/var/httpd/htdocs/js Core.Agent.Admin.ProcessManagement.js, 1.62, 1.63

"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-serv4900/var/httpd/htdocs/js

Modified Files:
	Core.Agent.Admin.ProcessManagement.js 
Log Message:
Fixed bug#9043 - ProcessManagement: Transitions without EndActivity are not correctly removed.

Author: mn

Index: Core.Agent.Admin.ProcessManagement.js
===================================================================
RCS file: /home/cvs/otrs/var/httpd/htdocs/js/Core.Agent.Admin.ProcessManagement.js,v
retrieving revision 1.62
retrieving revision 1.63
diff -2 -u -d -r1.62 -r1.63
--- Core.Agent.Admin.ProcessManagement.js	10 Dec 2012 16:29:16 -0000	1.62
+++ Core.Agent.Admin.ProcessManagement.js	14 Jan 2013 14:40:16 -0000	1.63
@@ -1,5 +1,5 @@
 // --
 // Core.Agent.Admin.ProcessManagement.js - provides the special module functions for the Process Management.
-// Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+// Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 // --
 // $Id$
@@ -663,4 +663,14 @@
             $('input[name=ProcessLayout]').val(Core.JSON.Stringify(TargetNS.ProcessLayout));
 
+            // check if there are "open" transitions, e.g. transitions that have only a startpoint but no defined endpoint
+            // these open transitions must be deleted before saving
+            $.each(TargetNS.ProcessData.Process[ProcessEntityID].Path, function (Activity, ActivityData) {
+                $.each(ActivityData, function (Transition, TransitionData) {
+                    if (typeof TransitionData['ActivityEntityID'] === 'undefined') {
+                        delete ActivityData[Transition];
+                    }
+                });
+            });
+
             // get process path and store it into a hidden field as JSON string
             $('input[name=Path]').val(Core.JSON.Stringify(TargetNS.ProcessData.Process[ProcessEntityID].Path));
---------------------------------------------------------------------
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.