* Fix the bug of story recall change or review.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user