* Fix bug#46709. Finish task#114584

This commit is contained in:
xieqiyu
2024-04-02 15:41:54 +08:00
parent 77a4bbe393
commit b809d30490
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -268,7 +268,7 @@ $checkObject->execution = $execution->id;
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = common::hasPriv('story', 'batchClose') && $storyType != 'requirement';
$canBatchChangeStage = common::hasPriv('story', 'batchChangeStage') && $storyType != 'requirement';
$canBatchUnlink = common::hasPriv('execution', 'batchUnlinkStory');
$canBatchUnlink = $canLinkStory && common::hasPriv('execution', 'batchUnlinkStory');
$canBatchToTask = common::hasPriv('story', 'batchToTask', $checkObject) && $storyType != 'requirement';
$canBatchAssignTo = common::hasPriv($storyType, 'batchAssignTo');
$canBatchAction = $canBeChanged && in_array(true, array($canBatchEdit, $canBatchClose, $canBatchChangeStage, $canBatchUnlink, $canBatchToTask, $canBatchAssignTo));
+2 -2
View File
@@ -208,7 +208,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)
$fnGenerateFootToolbar = function() use ($lang, $product, $productID, $project, $storyType, $browseType, $isProjectStory, $projectHasProduct, $storyProductID, $projectID, $branch, $users, $branchTagOption, $modules, $plans, $branchID)
{
/* Flag variables of permissions. */
$canBeChanged = common::canModify('product', $product);
@@ -217,7 +217,7 @@ $fnGenerateFootToolbar = function() use ($lang, $product, $productID, $project,
$canBatchReview = $canBeChanged && hasPriv($storyType, 'batchReview');
$canBatchChangeStage = $canBeChanged && hasPriv('story', 'batchChangeStage') && $storyType == 'story';
$canBatchChangeBranch = $canBeChanged && hasPriv($storyType, 'batchChangeBranch') && $product && $product->type != 'normal' && $productID;
$canBatchChangeModule = $canBeChanged && hasPriv($storyType, 'batchChangeModule') && $productID && $product && $product->type == 'normal';
$canBatchChangeModule = $canBeChanged && hasPriv($storyType, 'batchChangeModule') && $productID && (($product->type != 'normal' && $branchID != 'all') || $product->type == 'normal') && !$isProjectStory;
$canBatchChangePlan = $canBeChanged && hasPriv('story', 'batchChangePlan') && $storyType == 'story' && (!$isProjectStory || $projectHasProduct || ($isProjectStory && isset($project->model) && $project->model == 'scrum')) && $productID && $product && $product->type == 'normal';
$canBatchAssignTo = $canBeChanged && hasPriv($storyType, 'batchAssignTo');
$canBatchUnlink = $canBeChanged && $projectHasProduct && hasPriv('projectstory', 'batchUnlinkStory');