From 8e46aa45f5f1af89dccb6ae7056fb5e02e81f17e Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 25 Aug 2022 09:07:19 +0800 Subject: [PATCH] * Fix bug #26832. --- module/my/css/requirement.css | 1 + module/my/view/requirement.html.php | 14 +++++--------- module/product/css/browse.css | 1 + module/story/model.php | 5 +++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/module/my/css/requirement.css b/module/my/css/requirement.css index 13919b8117..c0389382d5 100644 --- a/module/my/css/requirement.css +++ b/module/my/css/requirement.css @@ -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;} diff --git a/module/my/view/requirement.html.php b/module/my/view/requirement.html.php index b26b4eec70..36bcc1c436 100644 --- a/module/my/view/requirement.html.php +++ b/module/my/view/requirement.html.php @@ -76,6 +76,7 @@ createLink('story', 'view', "id=$story->id"); $canBeChanged = common::canBeChanged('story', $story); + $spanClass = $canBatchAction ? 'c-span' : ''; ?> @@ -119,12 +120,7 @@ children)) ? ' table-child-bottom' : '';?> - -
- - -
- + id);?> pri;?>' title='story->priList, $child->pri, $child->pri);?>'>story->priList, $child->pri, $child->pri);?> @@ -185,7 +181,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 "
  • "; echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\""); echo "
  • "; @@ -218,7 +214,7 @@ 10; - $actionLink = $this->createLink('story', 'batchAssignTo'); + $actionLink = $this->createLink('story', 'batchAssignTo', 'storyType=requirement'); echo html::select('assignedTo', $users, '', 'class="hidden"'); if($withSearch) { diff --git a/module/product/css/browse.css b/module/product/css/browse.css index 1c3707a691..c2a8328f56 100644 --- a/module/product/css/browse.css +++ b/module/product/css/browse.css @@ -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;} diff --git a/module/story/model.php b/module/story/model.php index 3065c5edbf..a4868b8b69 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4710,7 +4710,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 ""; echo $canView ? html::a($storyLink, sprintf('%03d', $story->id), '', "data-app='$tab'") : sprintf('%03d', $story->id); break; case 'order': @@ -4735,7 +4736,7 @@ class storyModel extends model { $showBranch = isset($this->config->product->browse->showBranch) ? $this->config->product->browse->showBranch : 1; } - if($storyType == 'requirement') echo 'SR '; + if($storyType == 'requirement' and $story->type == 'story') echo 'SR '; 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 "branch]}>{$branches[$story->branch]} "; if($story->module and isset($modulePairs[$story->module])) echo "{$modulePairs[$story->module]} ";