From 64adbc1a74f46fd39ef4641591708d24f88e2f24 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 17 Jul 2024 17:45:32 +0800 Subject: [PATCH] * [misc] Fix the bug of stage compute. --- module/story/tao.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/module/story/tao.php b/module/story/tao.php index 6263c009c7..c9a24ae9e1 100644 --- a/module/story/tao.php +++ b/module/story/tao.php @@ -1450,12 +1450,17 @@ class storyTao extends storyModel if($parentStage != $parent->stage && $parent->status != 'closed') { - if(!empty($parent->demand)) $demandList[$parent->demand] = $parent->demand; $this->dao->update(TABLE_STORY)->set('stage')->eq($parentStage)->where('id')->eq($parent->id)->exec(); + + if($this->config->edition == 'ipd') + { + if(!empty($parent->demand)) $demandList[$parent->demand] = $parent->demand; + if(!empty($story->demand)) $demandList[$story->demand] = $story->demand; + if(!empty($demandList)) $this->loadModel('demand')->updateDemandStage($demandList); + } + if($parent->parent > 0) $this->computeParentStage($parent); } - - if($this->config->edition == 'ipd' && !empty($demandList)) $this->loadModel('demand')->updateDemandStage($demandList); } /**