* Finish task #69015.
This commit is contained in:
@@ -381,21 +381,24 @@ class story extends control
|
||||
->fetch('id');
|
||||
}
|
||||
|
||||
/* Get users in team. */
|
||||
$teamUsers = $product->reviewer;
|
||||
if(!$teamUsers and $product->acl != 'open') $teamUsers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
|
||||
/* Get reviewers. */
|
||||
$reviewers = $product->reviewer;
|
||||
if(!$reviewers and $product->acl != 'open') $reviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
|
||||
|
||||
/* Hidden some fields of projects without products. */
|
||||
$this->view->hiddenProduct = false;
|
||||
$this->view->hiddenPlan = false;
|
||||
$this->view->hiddenURS = false;
|
||||
$this->view->teamUsers = array();
|
||||
|
||||
if($this->app->tab === 'project' || $this->app->tab === 'execution')
|
||||
{
|
||||
$project = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch();
|
||||
if(!empty($project->project)) $project = $this->dao->findById((int)$project->project)->from(TABLE_PROJECT)->fetch();
|
||||
|
||||
if(empty($project->hasProduct))
|
||||
{
|
||||
$this->view->teamUsers = $this->project->getTeamMemberPairs($project->id);
|
||||
$this->view->hiddenProduct = true;
|
||||
|
||||
if($project->model !== 'scrum') $this->view->hiddenPlan = true;
|
||||
@@ -428,7 +431,7 @@ class story extends control
|
||||
$this->view->stories = $this->story->getParentStoryPairs($productID);
|
||||
$this->view->productID = $productID;
|
||||
$this->view->product = $product;
|
||||
$this->view->teamUsers = $this->user->getPairs('noclosed|nodeleted', '', 0, $teamUsers);
|
||||
$this->view->reviewers = $this->user->getPairs('noclosed|nodeleted', '', 0, $reviewers);
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->estimate = $estimate;
|
||||
$this->view->storyTitle = $title;
|
||||
@@ -858,13 +861,16 @@ class story extends control
|
||||
$this->view->hiddenProduct = false;
|
||||
$this->view->hiddenPlan = false;
|
||||
$this->view->hiddenURS = false;
|
||||
$this->view->teamUsers = array();
|
||||
|
||||
if($this->app->tab === 'project' || $this->app->tab === 'execution')
|
||||
{
|
||||
$project = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch();
|
||||
if(!empty($project->project)) $project = $this->dao->findById((int)$project->project)->from(TABLE_PROJECT)->fetch();
|
||||
|
||||
if(empty($project->hasProduct))
|
||||
{
|
||||
$this->view->teamUsers = $this->project->getTeamMemberPairs($project->id);
|
||||
$this->view->hiddenProduct = true;
|
||||
|
||||
if($project->model !== 'scrum') $this->view->hiddenPlan = true;
|
||||
@@ -888,9 +894,9 @@ class story extends control
|
||||
$reviewedBy = explode(',', trim($story->reviewedBy, ','));
|
||||
foreach($reviewedBy as $reviewer) $reviewedReviewer[] = zget($users, $reviewer);
|
||||
|
||||
/* Get users in team. */
|
||||
$teamUsers = $product->reviewer;
|
||||
if(!$teamUsers and $product->acl != 'open') $teamUsers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
|
||||
/* Get product reviewers. */
|
||||
$productReviewers = $product->reviewer;
|
||||
if(!$productReviewers and $product->acl != 'open') $productReviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
|
||||
|
||||
/* Process the module when branch products are switched to normal products. */
|
||||
if($product->type == 'normal' and !empty($story->branch)) $this->view->moduleOptionMenu += $this->tree->getModulesName($story->module);
|
||||
@@ -911,7 +917,7 @@ class story extends control
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->reviewers = array_keys($reviewerList);
|
||||
$this->view->reviewedReviewer = $reviewedReviewer;
|
||||
$this->view->teamUsers = $this->user->getPairs('noclosed|nodeleted', array_keys($reviewerList), 0, $teamUsers);
|
||||
$this->view->productReviewers = $this->user->getPairs('noclosed|nodeleted', array_keys($reviewerList), 0, $productReviewers);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -2102,6 +2108,7 @@ class story extends control
|
||||
/* Get story and product. */
|
||||
$story = $this->story->getById($storyID);
|
||||
$products = $this->product->getPairs();
|
||||
$product = $this->product->getById($story->product);
|
||||
|
||||
/* Set menu. */
|
||||
$this->product->setMenu($story->product, $story->branch);
|
||||
@@ -2111,7 +2118,7 @@ class story extends control
|
||||
$this->view->story = $story;
|
||||
$this->view->storyType = $storyType;
|
||||
$this->view->actions = $this->action->getList('story', $storyID);
|
||||
$this->view->users = ($this->config->vision == 'lite') ? $this->loadModel('user')->getTeamMemberPairs($this->session->project) : $this->loadModel('user')->getPairs('nodeleted|noclosed|pofirst|noletter');
|
||||
$this->view->users = ($this->config->vision == 'lite' || !empty($product->shadow)) ? $this->loadModel('user')->getTeamMemberPairs($this->session->project) : $this->loadModel('user')->getPairs('nodeleted|noclosed|pofirst|noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ foreach(explode(',', $config->story->create->requiredFields) as $field)
|
||||
<tr>
|
||||
<th class='planTh'><?php echo $lang->story->assignedTo;?></th>
|
||||
<td colspan='2' id='assignedToBox'>
|
||||
<?php echo html::select('assignedTo', $users, '', "class='form-control picker-select'");?>
|
||||
<?php echo html::select('assignedTo', $hiddenProduct ? $teamUsers : $users, '', "class='form-control picker-select'");?>
|
||||
</td>
|
||||
<td colspan="2" class="sourceTd <?php echo $hiddenSource?> sourceBox">
|
||||
<div class="input-group">
|
||||
@@ -151,7 +151,7 @@ foreach(explode(',', $config->story->create->requiredFields) as $field)
|
||||
<?php $required = $this->story->checkForceReview() ? 'required' : '';?>
|
||||
<?php echo $this->story->checkForceReview() ? '' : html::hidden('needNotReview', 1);?>
|
||||
<div class="table-col">
|
||||
<?php echo html::select('reviewer[]', $teamUsers, empty($needReview) ? $product->PO : '', "class='form-control picker-select' multiple $required");?>
|
||||
<?php echo html::select('reviewer[]', $hiddenProduct ? $teamUsers : $reviewers, empty($needReview) ? $product->PO : '', "class='form-control picker-select' multiple $required");?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<div class="table-row">
|
||||
<?php if(!$this->story->checkForceReview()):?>
|
||||
<div class="table-col">
|
||||
<?php echo html::select('reviewer[]', $teamUsers, $reviewers, 'class="form-control picker-select" multiple')?>
|
||||
<?php echo html::select('reviewer[]', $hiddenProduct ? $teamUsers : $productReviewers, $reviewers, 'class="form-control picker-select" multiple')?>
|
||||
</div>
|
||||
<div class="table-col needNotReviewBox">
|
||||
<span class="input-group-addon" style="border: 1px solid #dcdcdc; border-left-width: 0px;">
|
||||
@@ -66,7 +66,7 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class="table-col">
|
||||
<?php echo html::select('reviewer[]', $teamUsers, $reviewers, 'class="form-control picker-select" multiple required')?>
|
||||
<?php echo html::select('reviewer[]', $hiddenProduct ? $teamUsers : $productReviewers, $reviewers, 'class="form-control picker-select" multiple required')?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -273,7 +273,7 @@
|
||||
<?php if($story->status == 'reviewing'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->reviewers;?></th>
|
||||
<td><?php echo html::select('reviewer[]', $teamUsers, $reviewers, 'class="form-control picker-select" multiple')?></td>
|
||||
<td><?php echo html::select('reviewer[]', $hiddenProduct ? $teamUsers : $productReviewers, $reviewers, 'class="form-control picker-select" multiple')?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($story->status == 'closed'):?>
|
||||
|
||||
Reference in New Issue
Block a user