* Finish task #69015.
This commit is contained in:
+30
-21
@@ -384,9 +384,9 @@ class story extends control
|
||||
->fetch('id');
|
||||
}
|
||||
|
||||
/* Get reviewers. */
|
||||
$reviewers = $product->reviewer;
|
||||
if(!$reviewers and $product->acl != 'open') $reviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
|
||||
/* Get users in team. */
|
||||
$teamUsers = $product->reviewer;
|
||||
if(!$teamUsers and $product->acl != 'open') $teamUsers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
|
||||
|
||||
/* Hidden some fields of projects without products. */
|
||||
$this->view->hiddenProduct = false;
|
||||
@@ -395,16 +395,7 @@ class story extends control
|
||||
|
||||
if($this->app->tab === 'project' || $this->app->tab === 'execution')
|
||||
{
|
||||
if($this->app->tab === 'project')
|
||||
{
|
||||
$project = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch();
|
||||
}
|
||||
else
|
||||
{
|
||||
$execution = $this->dao->findById((int)$objectID)->from(TABLE_EXECUTION)->fetch();
|
||||
$projectID = $execution->project;
|
||||
$project = $this->dao->findById((int)$projectID)->from(TABLE_PROJECT)->fetch();
|
||||
}
|
||||
$project = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch();
|
||||
|
||||
if(empty($project->hasProduct))
|
||||
{
|
||||
@@ -440,7 +431,7 @@ class story extends control
|
||||
$this->view->stories = $this->story->getParentStoryPairs($productID);
|
||||
$this->view->productID = $productID;
|
||||
$this->view->product = $product;
|
||||
$this->view->reviewers = $this->user->getPairs('noclosed|nodeleted', '', 0, $reviewers);
|
||||
$this->view->teamUsers = $this->user->getPairs('noclosed|nodeleted', '', 0, $teamUsers);
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->estimate = $estimate;
|
||||
$this->view->storyTitle = $title;
|
||||
@@ -877,6 +868,24 @@ class story extends control
|
||||
$this->view->objectID = $objectID;
|
||||
}
|
||||
|
||||
/* Hidden some fields of projects without products. */
|
||||
$this->view->hiddenProduct = false;
|
||||
$this->view->hiddenPlan = false;
|
||||
$this->view->hiddenURS = false;
|
||||
|
||||
if($this->app->tab === 'project' || $this->app->tab === 'execution')
|
||||
{
|
||||
$project = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch();
|
||||
|
||||
if(empty($project->hasProduct))
|
||||
{
|
||||
$this->view->hiddenProduct = true;
|
||||
|
||||
if($project->model !== 'scrum') $this->view->hiddenPlan = true;
|
||||
if($project->model === 'kanban') $this->view->hiddenURS = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Display status of branch. */
|
||||
$branches = $this->loadModel('branch')->getList($product->id, isset($objectID) ? $objectID : 0, 'all');
|
||||
$branchOption = array();
|
||||
@@ -893,9 +902,9 @@ class story extends control
|
||||
$reviewedBy = explode(',', trim($story->reviewedBy, ','));
|
||||
foreach($reviewedBy as $reviewer) $reviewedReviewer[] = zget($users, $reviewer);
|
||||
|
||||
/* Get product reviewers. */
|
||||
$productReviewers = $product->reviewer;
|
||||
if(!$productReviewers and $product->acl != 'open') $productReviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
|
||||
/* Get users in team. */
|
||||
$teamUsers = $product->reviewer;
|
||||
if(!$teamUsers and $product->acl != 'open') $teamUsers = $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);
|
||||
@@ -916,7 +925,7 @@ class story extends control
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->reviewers = array_keys($reviewerList);
|
||||
$this->view->reviewedReviewer = $reviewedReviewer;
|
||||
$this->view->productReviewers = $this->user->getPairs('noclosed|nodeleted', array_keys($reviewerList), 0, $productReviewers);
|
||||
$this->view->teamUsers = $this->user->getPairs('noclosed|nodeleted', array_keys($reviewerList), 0, $teamUsers);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1197,9 +1206,9 @@ class story extends control
|
||||
$reviewer = $this->story->getReviewerPairs($storyID, $story->version);
|
||||
$product = $this->loadModel('product')->getByID($story->product);
|
||||
|
||||
/* Get product reviewers. */
|
||||
$productReviewers = $product->reviewer;
|
||||
if(!$productReviewers and $product->acl != 'open') $productReviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
|
||||
/* Get users in team. */
|
||||
$teamUsers = $product->reviewer;
|
||||
if(!$teamUsers and $product->acl != 'open') $productReviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->lang->story->change . "STORY" . $this->lang->colon . $this->view->story->title;
|
||||
|
||||
@@ -100,7 +100,7 @@ foreach(explode(',', $config->story->create->requiredFields) as $field)
|
||||
<?php if(!$hiddenPlan):?>
|
||||
<div class="input-group-addon assignedTo"><?php echo $lang->story->assignedTo;?></div>
|
||||
<?php endif;?>
|
||||
<?php echo html::select('assignedTo', $users, '', "class='form-control picker-select'");?>
|
||||
<?php echo html::select('assignedTo', $hiddenProduct ? $teamUsers : $users, '', "class='form-control picker-select'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -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[]', $reviewers, empty($needReview) ? $product->PO : '', "class='form-control picker-select' multiple $required");?>
|
||||
<?php echo html::select('reviewer[]', $teamUsers, 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[]', $productReviewers, $reviewers, 'class="form-control picker-select" multiple')?>
|
||||
<?php echo html::select('reviewer[]', $teamUsers, $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[]', $productReviewers, $reviewers, 'class="form-control picker-select" multiple required')?>
|
||||
<?php echo html::select('reviewer[]', $teamUsers, $reviewers, 'class="form-control picker-select" multiple required')?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -128,7 +128,7 @@
|
||||
<div class='detail-title'><?php echo $lang->story->legendBasicInfo;?></div>
|
||||
<table class='table table-form'>
|
||||
<?php if($story->parent <= 0):?>
|
||||
<tr>
|
||||
<tr class="<?php if($hiddenProduct) echo 'hidden';?>">
|
||||
<th class='thWidth'><?php echo $lang->story->product;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
@@ -169,7 +169,7 @@
|
||||
<th><?php echo $lang->story->parent;?></th>
|
||||
<td><?php echo html::select('parent', $stories, $story->parent, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="<?php if($hiddenPlan) echo 'hidden';?>">
|
||||
<th><?php echo $lang->story->plan;?></th>
|
||||
<td>
|
||||
<div class='input-group' id='planIdBox'>
|
||||
@@ -268,12 +268,12 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->story->assignedTo;?></th>
|
||||
<?php $assignedToList = $story->status == 'closed' ? $users + array('closed' => 'Closed') : $users;?>
|
||||
<td><?php echo html::select('assignedTo', $assignedToList, $story->assignedTo, 'class="form-control chosen"');?></td>
|
||||
<td><?php echo html::select('assignedTo', $hiddenProduct ? $teamUsers : $assignedToList, $story->assignedTo, 'class="form-control chosen"');?></td>
|
||||
</tr>
|
||||
<?php if($story->status == 'reviewing'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->reviewers;?></th>
|
||||
<td><?php echo html::select('reviewer[]', $productReviewers, $reviewers, 'class="form-control picker-select" multiple')?></td>
|
||||
<td><?php echo html::select('reviewer[]', $teamUsers, $reviewers, 'class="form-control picker-select" multiple')?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($story->status == 'closed'):?>
|
||||
|
||||
Reference in New Issue
Block a user