diff --git a/module/execution/js/all.ui.js b/module/execution/js/all.ui.js index 48e20855cd..ed01179ab4 100644 --- a/module/execution/js/all.ui.js +++ b/module/execution/js/all.ui.js @@ -10,7 +10,11 @@ $(document).off('click','.batch-btn').on('click', '.batch-btn', function() const getNonClosableLink = $.createLink('execution', 'ajaxGetNonClosableExecutions', 'executionID=' + checkedList.join(',')); $.getJSON(getNonClosableLink, function(exeuctions) { - if(!exeuctions) return; + if(!exeuctions || exeuctions.length == 0) + { + postBatchBtn($target, checkedList); + return; + } const confirmCloseTip = confirmBatchCloseExecution.replace('%s', exeuctions.join(', ')); zui.Modal.confirm(confirmCloseTip).then((res) => diff --git a/module/execution/ui/close.html.php b/module/execution/ui/close.html.php index 9f51e52c2c..c4c1f9a569 100644 --- a/module/execution/ui/close.html.php +++ b/module/execution/ui/close.html.php @@ -10,7 +10,7 @@ declare(strict_types=1); */ namespace zin; -$confirmTip = !empty($unclosedTasks) ? sprintf($this->lang->execution->confirmCloseExecution, implode($this->lang->comma, $unclosedTasks)) : ''; +$confirmTip = !empty($unclosedTasks) ? sprintf($this->lang->execution->confirmCloseExecution, implode($this->lang->comma, array_keys($unclosedTasks))) : ''; $confirmURL = $this->createLink('execution', 'close', "executionID={$executionID}&from={$from}"); $beforeSubmit = jsRaw("() => { diff --git a/module/execution/ui/edit.html.php b/module/execution/ui/edit.html.php index 0cb4f2de31..ada9c62e95 100644 --- a/module/execution/ui/edit.html.php +++ b/module/execution/ui/edit.html.php @@ -17,7 +17,7 @@ jsVar('executionAttr', $execution->attribute); jsVar('window.lastProjectID', $execution->project); jsVar('weekend', $config->execution->weekend); -$confirmTip = !empty($unclosedTasks) ? sprintf($this->lang->execution->confirmCloseExecution, implode($this->lang->comma, $unclosedTasks)) : ''; +$confirmTip = !empty($unclosedTasks) ? sprintf($this->lang->execution->confirmCloseExecution, implode($this->lang->comma, array_keys($unclosedTasks))) : ''; $beforeSubmit = jsRaw("() => { if($('[name=status]').val() != 'closed') return true;