Merge branch 'sprint/231_tianshujie_bug' into 'master'

Sprint/231 tianshujie bug

See merge request easycorp/zentaopms!5104
This commit is contained in:
孙广明
2022-08-25 01:57:26 +00:00
12 changed files with 54 additions and 42 deletions
+22 -20
View File
@@ -554,6 +554,7 @@ if($config->URAndSR)
$lang->resource->requirement->create = 'create';
$lang->resource->requirement->batchCreate = 'batchCreate';
$lang->resource->requirement->edit = 'editAction';
$lang->resource->requirement->linkStory = 'linkStory';
$lang->resource->requirement->batchEdit = 'batchEdit';
$lang->resource->requirement->export = 'exportAction';
$lang->resource->requirement->delete = 'deleteAction';
@@ -573,26 +574,27 @@ if($config->URAndSR)
$lang->resource->requirement->batchChangeModule = 'batchChangeModule';
$lang->resource->requirement->linkRequirements = 'linkRequirementsAB';
$lang->requirement->methodOrder[5] = 'create';
$lang->requirement->methodOrder[10] = 'batchCreate';
$lang->requirement->methodOrder[15] = 'edit';
$lang->requirement->methodOrder[20] = 'export';
$lang->requirement->methodOrder[25] = 'delete';
$lang->requirement->methodOrder[30] = 'view';
$lang->requirement->methodOrder[35] = 'change';
$lang->requirement->methodOrder[40] = 'review';
$lang->requirement->methodOrder[44] = 'submitReview';
$lang->requirement->methodOrder[45] = 'batchReview';
$lang->requirement->methodOrder[50] = 'recall';
$lang->requirement->methodOrder[55] = 'close';
$lang->requirement->methodOrder[60] = 'batchClose';
$lang->requirement->methodOrder[65] = 'assignTo';
$lang->requirement->methodOrder[70] = 'batchAssignTo';
$lang->requirement->methodOrder[75] = 'activate';
$lang->requirement->methodOrder[80] = 'report';
$lang->requirement->methodOrder[85] = 'batchChangeBranch';
$lang->requirement->methodOrder[90] = 'batchChangeModule';
$lang->requirement->methodOrder[95] = 'linkRequirements';
$lang->requirement->methodOrder[5] = 'create';
$lang->requirement->methodOrder[10] = 'batchCreate';
$lang->requirement->methodOrder[15] = 'edit';
$lang->requirement->methodOrder[20] = 'export';
$lang->requirement->methodOrder[25] = 'delete';
$lang->requirement->methodOrder[30] = 'view';
$lang->requirement->methodOrder[35] = 'change';
$lang->requirement->methodOrder[40] = 'review';
$lang->requirement->methodOrder[44] = 'submitReview';
$lang->requirement->methodOrder[45] = 'batchReview';
$lang->requirement->methodOrder[50] = 'recall';
$lang->requirement->methodOrder[55] = 'close';
$lang->requirement->methodOrder[60] = 'batchClose';
$lang->requirement->methodOrder[65] = 'assignTo';
$lang->requirement->methodOrder[70] = 'batchAssignTo';
$lang->requirement->methodOrder[75] = 'activate';
$lang->requirement->methodOrder[80] = 'report';
$lang->requirement->methodOrder[85] = 'linkStory';
$lang->requirement->methodOrder[90] = 'batchChangeBranch';
$lang->requirement->methodOrder[95] = 'batchChangeModule';
$lang->requirement->methodOrder[100] = 'linkRequirements';
}
/* Product plan. */
+1
View File
@@ -10,3 +10,4 @@
.table td.c-hours {padding-right: 12px;}
.main-table tbody > tr.table-children > td:first-child::before {width: 3px;}
@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;};}
.c-span {margin-left: 22px;}
+5 -9
View File
@@ -76,6 +76,7 @@
<?php
$storyLink = $this->createLink('story', 'view', "id=$story->id");
$canBeChanged = common::canBeChanged('story', $story);
$spanClass = $canBatchAction ? 'c-span' : '';
?>
<tr>
<td class="c-id">
@@ -127,12 +128,7 @@
<?php $class .= ($i + 1 == count($story->children)) ? ' table-child-bottom' : '';?>
<tr class='table-children<?php echo $class;?> parent-<?php echo $story->id;?>' data-id='<?php echo $child->id?>' data-status='<?php echo $child->status?>' data-estimate='<?php echo $child->estimate?>'>
<td class="c-id">
<?php if($canBatchAction):?>
<div class="checkbox-primary">
<input type='checkbox' name='storyIdList[<?php echo $child->id;?>]' value='<?php echo $child->id;?>' />
<label></label>
</div>
<?php endif;?>
<span class="<?php echo $spanClass?>"></span>
<?php printf('%03d', $child->id);?>
</td>
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $child->pri;?>' title='<?php echo zget($lang->story->priList, $child->pri, $child->pri);?>'><?php echo zget($lang->story->priList, $child->pri, $child->pri);?></span></td>
@@ -202,7 +198,7 @@
unset($lang->story->reviewResultList['revert']);
foreach($lang->story->reviewResultList as $key => $result)
{
$actionLink = $this->createLink('story', 'batchReview', "result=$key");
$actionLink = $this->createLink('story', 'batchReview', "result=$key&reason=&storyType=requirement");
if($key == 'reject')
{
echo "<li class='dropdown-submenu'>";
@@ -214,7 +210,7 @@
foreach($lang->story->reasonList as $key => $reason)
{
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key&storyType=requirement");
echo "<li>";
echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
echo "</li>";
@@ -235,7 +231,7 @@
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->assignedTo?> <span class="caret"></span></button>
<?php
$withSearch = count($users) > 10;
$actionLink = $this->createLink('story', 'batchAssignTo');
$actionLink = $this->createLink('story', 'batchAssignTo', 'storyType=requirement');
echo html::select('assignedTo', $users, '', 'class="hidden"');
if($withSearch)
{
+1
View File
@@ -39,3 +39,4 @@ a.removeModule:hover {color: red;}
#batchUnlinkStoryTip .table th:first-child {width: 460px;}
#mainMenu .dropdown-menu>li>a>.icon {top: 4px;}
#productStoryForm tbody tr td .label {max-width: 100px; text-overflow: unset;}
.c-span {margin-left: 19px;}
+3 -1
View File
@@ -388,8 +388,10 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
$disabled = $canBatchEdit ? '' : "disabled='disabled'";
$actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=$projectID&branch=$branch&storyType=$storyType");
?>
<?php echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled");?>
<?php if($canBatchEdit or $canBatchClose or $canBatchUnlink or $canBatchReview or $canBatchChangeStage) echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled");?>
<?php if($canBatchEdit or $canBatchClose or $canBatchUnlink or $canBatchReview or $canBatchChangeStage):?>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
<?php endif;?>
<ul class='dropdown-menu'>
<?php
$class = $canBatchClose ? '' : "class='disabled'";
+4 -3
View File
@@ -2152,11 +2152,12 @@ class story extends control
* @param int $storyID
* @param string $type
* @param string $browseType
* @param int $param
* @param int $queryID
* @param string $storyType story|requirement
* @access public
* @return void
*/
public function linkStory($storyID, $type = 'linkStories', $linkedStoryID = 0, $browseType = '', $queryID = 0)
public function linkStory($storyID, $type = 'linkStories', $linkedStoryID = 0, $browseType = '', $queryID = 0, $storyType = 'story')
{
$this->commonAction($storyID);
@@ -2190,7 +2191,7 @@ class story extends control
}
/* Build search form. */
$actionURL = $this->createLink('story', 'linkStory', "storyID=$storyID&type=$type&linkedStoryID=$linkedStoryID&browseType=bySearch&queryID=myQueryID", '', true);
$actionURL = $this->createLink('story', 'linkStory', "storyID=$storyID&type=$type&linkedStoryID=$linkedStoryID&browseType=bySearch&queryID=myQueryID&storyType=$storyType", '', true);
$this->product->buildSearchForm($story->product, $products, $queryID, $actionURL);
/* Get stories to link. */
+2 -1
View File
@@ -54,7 +54,7 @@ $lang->story->caseCount = 'Fälle';
$lang->story->taskCountAB = 'T';
$lang->story->bugCountAB = 'B';
$lang->story->caseCountAB = 'C';
$lang->story->linkStory = 'Verküpfen';
$lang->story->linkStory = 'Link Requirement';
$lang->story->unlinkStory = 'Verknüpfung aufheben';
$lang->story->linkStoriesAB = "Link {$lang->SRCommon}";
$lang->story->linkRequirementsAB = "Link {$lang->URCommon}";
@@ -491,3 +491,4 @@ $lang->requirement->batchChangeBranch = "Batch Change Branches";
$lang->requirement->batchAssignTo = "Batch Assign";
$lang->requirement->batchChangeModule = "Batch Change Modules";
$lang->requirement->submitReview = $lang->story->submitReview;
$lang->requirement->linkStory = 'Link Story';
+2 -1
View File
@@ -54,7 +54,7 @@ $lang->story->caseCount = 'Cases';
$lang->story->taskCountAB = 'T';
$lang->story->bugCountAB = 'B';
$lang->story->caseCountAB = 'C';
$lang->story->linkStory = 'Link Story';
$lang->story->linkStory = 'Link Requirement';
$lang->story->unlinkStory = 'UnLinked';
$lang->story->linkStoriesAB = "Link {$lang->SRCommon}";
$lang->story->linkRequirementsAB = "Link {$lang->URCommon}";
@@ -491,3 +491,4 @@ $lang->requirement->batchChangeBranch = "Batch Change Branches";
$lang->requirement->batchAssignTo = "Batch Assign";
$lang->requirement->batchChangeModule = "Batch Change Modules";
$lang->requirement->submitReview = $lang->story->submitReview;
$lang->requirement->linkStory = 'Link Story';
+2 -1
View File
@@ -54,7 +54,7 @@ $lang->story->caseCount = 'CasTests';
$lang->story->taskCountAB = 'T';
$lang->story->bugCountAB = 'B';
$lang->story->caseCountAB = 'C';
$lang->story->linkStory = 'Lier Story';
$lang->story->linkStory = 'Lier Requirement';
$lang->story->unlinkStory = 'Dissocier';
$lang->story->linkStoriesAB = "Lier {$lang->SRCommon}";
$lang->story->linkRequirementsAB = "Lier {$lang->URCommon}";
@@ -491,3 +491,4 @@ $lang->requirement->batchChangeBranch = "Batch Change Branches";
$lang->requirement->batchAssignTo = "Batch Assign";
$lang->requirement->batchChangeModule = "Batch Change Modules";
$lang->requirement->submitReview = $lang->story->submitReview;
$lang->requirement->linkStory = 'Lier Story';
+2 -1
View File
@@ -54,7 +54,7 @@ $lang->story->caseCount = '用例数';
$lang->story->taskCountAB = 'T';
$lang->story->bugCountAB = 'B';
$lang->story->caseCountAB = 'C';
$lang->story->linkStory = "关联{$lang->SRCommon}";
$lang->story->linkStory = "关联{$lang->URCommon}";
$lang->story->unlinkStory = "移除相关{$lang->SRCommon}";
$lang->story->linkStoriesAB = "关联相关{$lang->SRCommon}";
$lang->story->linkRequirementsAB = "关联相关{$lang->URCommon}";
@@ -491,3 +491,4 @@ $lang->requirement->batchChangeBranch = "批量修改分支";
$lang->requirement->batchAssignTo = "批量指派";
$lang->requirement->batchChangeModule = "批量修改模块";
$lang->requirement->submitReview = $lang->story->submitReview;
$lang->requirement->linkStory = "关联{$lang->SRCommon}";
+8 -3
View File
@@ -4609,10 +4609,14 @@ class storyModel extends model
{
$canBatchAction = ($canBeChanged and ($canBatchEdit or $canBatchClose or $canBatchChangeStage or $canBatchUnlink or $canBatchToTask));
}
else
elseif($tab == 'project')
{
$canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchChangeStage or $canBatchChangeBranch or $canBatchChangeModule or $canBatchChangePlan or $canBatchAssignTo or $canBatchUnlinkStory);
}
else
{
$canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchChangeStage or $canBatchChangeBranch or $canBatchChangeModule or $canBatchChangePlan or $canBatchAssignTo);
}
$id = $col->id;
if($col->show)
@@ -4701,7 +4705,8 @@ class storyModel extends model
switch($id)
{
case 'id':
if($canBatchAction) echo html::checkbox('storyIdList', array($story->id => ''));
if($canBatchAction and ($storyType == 'story' or ($storyType == 'requirement' and $story->type == 'requirement'))) echo html::checkbox('storyIdList', array($story->id => ''));
if($canBatchAction and $storyType == 'requirement' and $story->type == 'story') echo "<span class='c-span'></span>";
echo $canView ? html::a($storyLink, sprintf('%03d', $story->id), '', "data-app='$tab'") : sprintf('%03d', $story->id);
break;
case 'order':
@@ -4726,7 +4731,7 @@ class storyModel extends model
{
$showBranch = isset($this->config->product->browse->showBranch) ? $this->config->product->browse->showBranch : 1;
}
if($storyType == 'requirement') echo '<span class="label label-badge label-light">SR</span> ';
if($storyType == 'requirement' and $story->type == 'story') echo '<span class="label label-badge label-light">SR</span> ';
if($story->parent > 0 and isset($story->parentName)) $story->title = "{$story->parentName} / {$story->title}";
if(isset($branches[$story->branch]) and $showBranch and $this->config->vision == 'rnd') echo "<span class='label label-outline label-badge' title={$branches[$story->branch]}>{$branches[$story->branch]}</span> ";
if($story->module and isset($modulePairs[$story->module])) echo "<span class='label label-gray label-badge'>{$modulePairs[$story->module]}</span> ";
+2 -2
View File
@@ -409,11 +409,11 @@
foreach($relation as $id => $title)
{
echo "<li title='$title'>" . ($canViewLinkStory ? html::a($this->createLink('story', 'view', "id=$id&version=0&param=0&storyType=$relationType", '', true), "#$id $title", '', "class='iframe' data-width='80%'") : "#$id $title");
echo html::a($this->createLink('story', 'linkStory', "storyID=$story->id&type=remove&linkedID=$id"), '<i class="icon icon-close"></i>', 'hiddenwin', "class='deleter hide removeButton'");
echo html::a($this->createLink('story', 'linkStory', "storyID=$story->id&type=remove&linkedID=$id&browseType=&queryID=0&storyType=$story->type"), '<i class="icon icon-close"></i>', 'hiddenwin', "class='deleter hide removeButton'");
}
?>
<?php $linkLang = ($story->type == 'story') ? $lang->story->requirement : $lang->story->story;?>
<li><?php echo html::a($this->createLink('story', 'linkStory', "storyID=$story->id", '', true), $lang->story->link . $linkLang, '', "class='btn btn-info iframe' data-width='95%' id='linkButton'");?>
<li><?php if(common::hasPriv($story->type, 'linkStory')) echo html::a($this->createLink('story', 'linkStory', "storyID=$story->id&type=linkStories&linkedID=0&browseType=&queryID=0&storyType=$story->type", '', true), $lang->story->link . $linkLang, '', "class='btn btn-info iframe' data-width='95%' id='linkButton'");?>
<?php if(!empty($relations)) echo html::a('javascript:void(0)', $lang->story->unlink, '', "class='btn btn-info' id='unlinkStory'");?></li>
</ul>
</div>