diff options
Diffstat (limited to 'app/class/stage.class.php')
-rw-r--r-- | app/class/stage.class.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/class/stage.class.php b/app/class/stage.class.php index 08a3708..1142bdd 100644 --- a/app/class/stage.class.php +++ b/app/class/stage.class.php @@ -163,6 +163,25 @@ class stage extends object $stage->saveObj(); $this->saveObj(); } + + /* + * Remove this stage object and move all of its issues. Issues are + * moved to the given stage object. Additionally, the pad may be + * given, in which case, those issues will be closed. + */ + public function removeStage(object $mvt) : void + { + if (!($prev = $this->getPrev())) + $prev = $this->getParent(); + + foreach ($this->getIssues_ordByDueByNumb() as $i) + $i->setParent($mvt); + + $prev->stage = $this->stage; + $prev->saveObj(); + + $this->delObj(); + } } ?> |