[Fusionforge-commits] r10429 - trunk/src/common/tracker
Alain Peyrat
aljeux at libremir.placard.fr.eu.org
Wed Sep 8 20:22:46 CEST 2010
Author: aljeux
Date: 2010-09-08 20:22:45 +0200 (Wed, 08 Sep 2010)
New Revision: 10429
Modified:
trunk/src/common/tracker/ArtifactWorkflow.class.php
Log:
Add removeNode() in ArtifactWorkflow().
Modified: trunk/src/common/tracker/ArtifactWorkflow.class.php
===================================================================
--- trunk/src/common/tracker/ArtifactWorkflow.class.php 2010-09-08 18:22:39 UTC (rev 10428)
+++ trunk/src/common/tracker/ArtifactWorkflow.class.php 2010-09-08 18:22:45 UTC (rev 10429)
@@ -94,6 +94,22 @@
$this->_addEvent('100', $element_id);
}
+ /*
+ * When a new element is removed, remove all the events in the workflow.
+ */
+ function removeNode($element_id) {
+ $elearray = $this->ath->getExtraFieldElements($this->field_id);
+ foreach ($elearray as $e) {
+ if ($element_id !== $e['element_id']) {
+ $this->_removeEvent($e['element_id'], $element_id);
+ $this->_removeEvent($element_id, $e['element_id']);
+ }
+ }
+
+ // Allow the new element for the Submit form (Initial values).
+ $this->_removeEvent('100', $element_id);
+ }
+
// Returns all the possible following nodes (no roles involved).
function getNextNodes($from) {
More information about the Fusionforge-commits
mailing list