diff --git a/module/upgrade/js/mergeprogram.js b/module/upgrade/js/mergeprogram.js index 4f821f2c47..986bab4d4c 100644 --- a/module/upgrade/js/mergeprogram.js +++ b/module/upgrade/js/mergeprogram.js @@ -573,6 +573,53 @@ $(function() $('[name=programAcl]').attr('disabled', 'disabled'); $('[name=projectAcl]').removeAttr('disabled'); } + + $('#submit').click(function() + { + if(type == 'productline') + { + var checkedProductCount = $("input[name^='products']:checked").length; + if(checkedProductCount <= 0) + { + alert(errorNoProduct); + return false; + } + } + else if(type == 'product') + { + var checkedProductCount = $("input[name^='products']:checked").length; + if(checkedProductCount <= 0) + { + alert(errorNoProduct); + return false; + } + + var executionCount = 0; + var checkedExecutionCount = 0; + $("input[name^='products']:checked").each(function() + { + var productID = $(this).val() + + executionCount += $("[data-product='" + productID + "']").length; + checkedExecutionCount += $("[data-product='" + productID + "']:checked").length; + }); + + if(executionCount !== 0 && checkedExecutionCount === 0) + { + alert(errorNoExecution); + return false; + } + } + else + { + var checkedExecutionCount = $("input[name^='sprints']:checked").length; + if(checkedExecutionCount === 0) + { + alert(errorNoExecution); + return false; + } + } + }) }); /** diff --git a/module/upgrade/lang/en.php b/module/upgrade/lang/en.php index 04e4aee7cb..e9fe9f80ea 100644 --- a/module/upgrade/lang/en.php +++ b/module/upgrade/lang/en.php @@ -134,6 +134,8 @@ $lang->upgrade->duplicateProject = "Project name in the same program cannot be $lang->upgrade->upgradeTips = "Historically deleted data cannot be upgraded, and restoration is not supported after the upgrade. Please be aware."; $lang->upgrade->moveEXTFileFail = 'The migration file failed, please execute the above command and refresh!'; $lang->upgrade->deleteDirTip = 'After the upgrade, the following folders will affect the use of system functions, please delete them.'; +$lang->upgrade->errorNoProduct = "Select the {$lang->productCommon} that you want to merge."; +$lang->upgrade->errorNoExecution = "Select the {$lang->projectCommon} that you want to merge."; $lang->upgrade->moveExtFileTip = <<The new version will be compatible with the extension mechanism of the historical customization/plug-in. You need to migrate the customization/plug-in related files to extension/custom, otherwise the customization/plug-in function will not be available.

Please confirm whether the system has been customized/plug-in. If no customization/plug-in has been done, you can uncheck the following files; Whether you have done customization/plug-in, you can also keep the file checked.

diff --git a/module/upgrade/lang/zh-cn.php b/module/upgrade/lang/zh-cn.php index d177cf83f3..e88539e414 100644 --- a/module/upgrade/lang/zh-cn.php +++ b/module/upgrade/lang/zh-cn.php @@ -134,6 +134,8 @@ $lang->upgrade->duplicateProject = "同一个项目集内项目名称不能重 $lang->upgrade->upgradeTips = "历史删除数据不参与升级,升级后将不支持还原,请知悉"; $lang->upgrade->moveEXTFileFail = '迁移文件失败, 请执行上面命令后刷新!'; $lang->upgrade->deleteDirTip = '升级后,如下文件夹会影响系统功能的使用,请删除。'; +$lang->upgrade->errorNoProduct = "请选择需要归并的{$lang->productCommon}。"; +$lang->upgrade->errorNoExecution = "请选择需要归并的{$lang->projectCommon}。"; $lang->upgrade->moveExtFileTip = <<新版本将对历史的定制/插件进行扩展机制兼容处理,需要将定制/插件相关的文件迁移到extension/custom下,否则定制/插件功能将无法使用。

请您确认系统是否有做过定制/插件,如没有做过定制/插件,可取消勾选如下文件;如果不清楚是否做过定制/插件,也可保持文件勾选。

diff --git a/module/upgrade/view/mergeprogram.html.php b/module/upgrade/view/mergeprogram.html.php index e2f8b73843..3e982def50 100644 --- a/module/upgrade/view/mergeprogram.html.php +++ b/module/upgrade/view/mergeprogram.html.php @@ -13,6 +13,8 @@ execution->weekend);?> +upgrade->errorNoProduct);?> +upgrade->errorNoExecution);?>