From bcf489fee6e6e6896bbb66dffb89b9a0a8610ef6 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 15 Jul 2024 14:54:46 +0800 Subject: [PATCH] * [task#122676,done,1h,0h] The stage of recalculating OR requirements and business research requirements when restoring deleted requirements. --- module/action/model.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/action/model.php b/module/action/model.php index c21cf5c045..6c1ec2c51e 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1349,6 +1349,11 @@ class actionModel extends model $this->recoverRelatedData($action, $object); + /* 还原已删除的需求时重算OR需求和业用研需的阶段。 */ + /* The stage of recalculating OR requirements and industrial research needs when restoring deleted requirements. */ + if(in_array($action->objectType, array('story', 'epic', 'requirement'))) $this->loadModel('story')->setStage($action->objectID); + if($action->objectType == 'demand' && !empty($object->parent)) $this->loadModel('demand')->updateParentDemandStage($object->parent); + /* 在action表中更新action记录。 */ /* Update action record in action table. */ $this->dao->update(TABLE_ACTION)->set('extra')->eq(actionModel::BE_UNDELETED)->where('id')->eq($actionID)->exec();