From e3612f8fb67ed4982e9173ad17d0ea86dcc39ec2 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Fri, 21 Jun 2024 14:45:49 +0800 Subject: [PATCH] * [bug#51540] adjust mr operate btn check logic. --- module/mr/ui/actions.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/mr/ui/actions.html.php b/module/mr/ui/actions.html.php index b77c99f57a..c2dbfc025c 100644 --- a/module/mr/ui/actions.html.php +++ b/module/mr/ui/actions.html.php @@ -12,6 +12,7 @@ namespace zin; $hasNoChange = $MR->synced && empty($rawMR->changes_count) ? true : false; $hasConflict = $MR->synced === '1' ? $rawMR->has_conflicts : !$MR->hasNoConflict; +$mergeStatus = !empty($rawMR->merge_status) ? $rawMR->merge_status : $MR->mergeStatus; $compileNotSuccess = !empty($compile->id) && $compile->status != 'success'; $mainActions = array(); @@ -47,7 +48,7 @@ foreach($config->mr->view->operateList as $operate) if($operate == 'approval') { - if($hasNoChange || $hasConflict || $compileNotSuccess || $MR->approvalStatus == 'approved') + if($hasNoChange || $hasConflict || $compileNotSuccess || $MR->approvalStatus == 'approved' || $mergeStatus == 'cannot_be_merged') { $action['disabled'] = true; if($compileNotSuccess) $action['hint'] = $lang->mr->compileTip;