From d1cd51871cd10463516facf6d0f4a181b3ad4c26 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Sat, 6 Jul 2024 07:48:26 +0000 Subject: [PATCH] * [bug#52302,done,1h] fix bug. --- module/block/ui/assigntomeblock.html.php | 12 ++++++++++-- module/product/ui/browse.html.php | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/module/block/ui/assigntomeblock.html.php b/module/block/ui/assigntomeblock.html.php index 972005ce7f..4249e975c4 100644 --- a/module/block/ui/assigntomeblock.html.php +++ b/module/block/ui/assigntomeblock.html.php @@ -98,8 +98,14 @@ foreach($hasViewPriv as $type => $bool) $typeName = ''; if(isset($lang->{$review->type}->common)) $typeName = $lang->{$review->type}->common; - if($reviewType == 'story') $typeName = $review->storyType == 'story' ? $lang->SRCommon : $lang->URCommon; - if($review->type == 'projectreview') $typeName = $lang->project->common; + if($reviewType == 'story') + { + if($review->storyType == 'story') $typeName = $lang->SRCommon; + if($review->storyType == 'requirement') $typeName = $lang->URCommon; + if($review->storyType == 'epic') $typeName = $lang->ERCommon; + } + if($review->type == 'projectreview') $typeName = $lang->project->common; + if(in_array($reviewType, array('story', 'epic', 'requirement'))) $config->block->review->dtable->fieldList['title']['link']['method'] = 'storyView'; if(isset($lang->$reviewType->statusList)) $statusList = array_merge($statusList, $lang->$reviewType->statusList); if($reviewType == 'attend') $statusList = array_merge($statusList, $lang->attend->reviewStatusList); @@ -110,6 +116,8 @@ foreach($hasViewPriv as $type => $bool) $config->block->review->dtable->fieldList['status']['statusMap'] = $statusList; } if($type == 'requirement') $config->block->story->dtable->fieldList['title']['title'] = str_replace($lang->story->story, $lang->story->requirement, $lang->story->title); + if($type == 'epic') $config->block->story->dtable->fieldList['title']['title'] = str_replace($lang->story->story, $lang->story->epic, $lang->story->title); + if(in_array($type, array('story', 'epic', 'requirement'))) $config->block->story->dtable->fieldList['title']['link']['module'] = $type; if($type == 'ticket') $config->block->ticket->dtable->fieldList['product']['map'] = $products; if($type == 'feedback') $config->block->feedback->dtable->fieldList['product']['map'] = $products; if($type == 'meeting') $config->block->meeting->dtable->fieldList['dept']['map'] = $depts; diff --git a/module/product/ui/browse.html.php b/module/product/ui/browse.html.php index cd7ddcedef..15c332524d 100644 --- a/module/product/ui/browse.html.php +++ b/module/product/ui/browse.html.php @@ -226,7 +226,7 @@ foreach($stories as $story) } /* Generate toolbar of DataTable footer. */ -$fnGenerateFootToolbar = function() use ($lang, $product, $productID, $project, $storyType, $browseType, $isProjectStory, $projectHasProduct, $storyProductID, $projectID, $branch, $users, $branchTagOption, $modules, $plans, $branchID, $gradePairs, $config,$noclosedRoadmaps) +$fnGenerateFootToolbar = function() use ($lang, $product, $productID, $project, $storyType, $browseType, $isProjectStory, $projectHasProduct, $storyProductID, $projectID, $branch, $users, $branchTagOption, $modules, $plans, $branchID, $gradePairs, $config,$noclosedRoadmaps, $gradeGroup) { /* Flag variables of permissions. */ $canBeChanged = common::canModify('product', $product); @@ -251,7 +251,7 @@ $fnGenerateFootToolbar = function() use ($lang, $product, $productID, $project, $canBatchChangeStage = $canBeChanged && hasPriv('story', 'batchChangeStage') && $storyType == 'story'; $canBatchChangeBranch = $canBeChanged && hasPriv($storyType, 'batchChangeBranch') && $product && $product->type != 'normal' && $productID; $canBatchChangeModule = $canBeChanged && hasPriv($storyType, 'batchChangeModule') && $productID && (($product->type != 'normal' && $branchID != 'all') || $product->type == 'normal') && !$isProjectStory; - $canBatchChangeParent = $canBeChanged && hasPriv($storyType, 'batchChangeParent'); + $canBatchChangeParent = $canBeChanged && hasPriv($storyType, 'batchChangeParent') && !($storyType == 'epic' && count($gradeGroup['epic']) < 2); $canBatchUnlink = $canBeChanged && $projectHasProduct && hasPriv('projectstory', 'batchUnlinkStory'); $canBatchImportToLib = $canBeChanged && $isProjectStory && in_array($this->config->edition, array('max', 'ipd')) && hasPriv('story', 'batchImportToLib') && helper::hasFeature('storylib'); $canBatchChangeRoadmap = $canBeChanged && hasPriv('story', 'batchChangeRoadmap') && $config->vision == 'or' && $storyType == 'requirement';