diff --git a/module/story/config/form.php b/module/story/config/form.php index 8b673880b3..5fd50b262f 100644 --- a/module/story/config/form.php +++ b/module/story/config/form.php @@ -161,6 +161,7 @@ $config->story->form->close['closeSync'] = array('type' => 'string', 'req $config->story->form->submitReview = array(); $config->story->form->submitReview['reviewer'] = array('type' => 'array', 'control' => 'multi-select', 'required' => false, 'default' => ''); $config->story->form->submitReview['reviewedBy'] = array('type' => 'string', 'control' => 'hidden', 'required' => false, 'default' => ''); +$config->story->form->submitReview['status'] = array('type' => 'string', 'control' => 'hidden', 'required' => false, 'default' => 'active'); $config->story->form->batchToTask['module'] = array('type' => 'int', 'required' => false, 'default' => 0); $config->story->form->batchToTask['story'] = array('type' => 'int', 'required' => false, 'default' => 0); diff --git a/module/story/model.php b/module/story/model.php index 3c929d338d..aecbb46e29 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1224,9 +1224,6 @@ class storyModel extends model */ public function submitReview(int $storyID, object $story): array|false { - $story->reviewer = array_filter($story->reviewer); - if(empty($story->reviewer)) return false; - $oldStory = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch(); $reviewerList = $this->getReviewerPairs($oldStory->id, $oldStory->version); $oldStory->reviewer = implode(',', array_keys($reviewerList)); @@ -1241,7 +1238,7 @@ class storyModel extends model } $story->reviewer = implode(',', $story->reviewer); - $story->status = ($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $story->status == 'active' and $this->config->vision == 'rnd') ? 'launched' : 'reviewing'; + if($story->reviewer) $story->status = ($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $story->status == 'active' and $this->config->vision == 'rnd') ? 'launched' : 'reviewing'; $this->dao->update(TABLE_STORY)->data($story, 'reviewer')->where('id')->in($twinsIdList)->exec(); diff --git a/module/story/tao.php b/module/story/tao.php index 6d79d7750a..ac870bdc6d 100644 --- a/module/story/tao.php +++ b/module/story/tao.php @@ -1631,7 +1631,7 @@ class storyTao extends storyModel $canRecall = common::hasPriv('story', 'recall') && $this->isClickable($story, 'recall'); $title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall; if(!$canRecall) $title = $this->lang->story->recallTip['actived']; - $actRecall = array('name' => $story->status == 'changing' ? 'recalledchange' : 'recall', 'className' => 'ajax-submit', 'url' => $canRecall ? $recallLink : null, 'hint' => $title, 'disabled' => !$canRecall); + $actRecall = array('name' => $story->status == 'changing' ? 'recalledchange' : 'recall', 'innerClass' => 'ajax-submit', 'url' => $canRecall ? $recallLink : null, 'hint' => $title, 'disabled' => !$canRecall); /* Change the render order. */ if(!empty($actSubmitreview))