From 98061fa481351548cf5ec7fcd28976e6bfc3b3dc Mon Sep 17 00:00:00 2001 From: liyuchun Date: Mon, 22 Nov 2021 10:15:03 +0800 Subject: [PATCH] * Fix bug #16513. --- module/story/control.php | 16 +++++++++++----- module/story/view/change.html.php | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index e38f49790a..9b38c86512 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -869,13 +869,19 @@ class story extends control $story = $this->story->getById($storyID); $reviewer = $this->story->getReviewerPairs($storyID, $story->version); + $product = $this->loadModel('product')->getByID($story->product); + + /* Get product reviewers. */ + $productReviewers = $product->reviewer; + if(!$productReviewers) $productReviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', ''); /* Assign. */ - $this->view->title = $this->lang->story->change . "STORY" . $this->lang->colon . $this->view->story->title; - $this->view->users = $this->user->getPairs('pofirst|nodeleted|noclosed', $this->view->story->assignedTo); - $this->view->position[] = $this->lang->story->change; - $this->view->needReview = ($this->app->user->account == $this->view->product->PO || $this->config->story->needReview == 0) ? "checked='checked'" : ""; - $this->view->reviewer = implode(',', array_keys($reviewer)); + $this->view->title = $this->lang->story->change . "STORY" . $this->lang->colon . $this->view->story->title; + $this->view->users = $this->user->getPairs('pofirst|nodeleted|noclosed', $this->view->story->assignedTo); + $this->view->position[] = $this->lang->story->change; + $this->view->needReview = ($this->app->user->account == $this->view->product->PO || $this->config->story->needReview == 0) ? "checked='checked'" : ""; + $this->view->reviewer = implode(',', array_keys($reviewer)); + $this->view->productReviewers = $this->user->getPairs('noclosed|nodeleted', $reviewer, 0, $productReviewers); $this->display(); } diff --git a/module/story/view/change.html.php b/module/story/view/change.html.php index 9045db91cb..6c91ad5a47 100644 --- a/module/story/view/change.html.php +++ b/module/story/view/change.html.php @@ -26,7 +26,7 @@ story->reviewedBy;?>
- + story->checkForceReview()):?> story->needNotReview, '', "id='needNotReview' {$needReview}");?>