From f0dec448ce2804031bed335b4c8ceaefde4bd81d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 20 Jul 2022 08:36:04 +0800 Subject: [PATCH] * Finish task #61177. --- module/custom/lang/de.php | 2 +- module/custom/lang/en.php | 2 +- module/custom/lang/fr.php | 2 +- module/custom/lang/zh-cn.php | 2 +- module/project/config.php | 2 +- module/project/model.php | 5 ++++- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index 9fc629e618..91a0a869b9 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -210,7 +210,7 @@ $lang->custom->notice->confirmReviewCase = 'Set the case in Wait to Normal?'; $lang->custom->notice->storyReviewTip = 'After selecting by individual, position, and department, take the union of these three filters. '; $lang->custom->notice->selectAllTip = 'After selecting all people, the reviewers will be emptied and grayed out while hiding their positions and departments.'; $lang->custom->notice->repeatKey = 'Repeat Key %s'; -$lang->custom->notice->readOnlyOfCode = 'A code is a management term that exists for secrecy or as an antonym. When code management is enabled, the code information of program, product, project, and execution in the system will be displayed in the creation, editing, detail, and list pages.'; +$lang->custom->notice->readOnlyOfCode = 'A code is a management term that exists for secrecy or as an antonym. When code management is enabled, the code information of product, project, and execution in the system will be displayed in the creation, editing, detail, and list pages.'; $lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Homepage. Do you want to go to Product Homepage?"; $lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Homepage. Do you want to go to Project Homepage?"; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 390b25c77e..e7f36d9a8e 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -210,7 +210,7 @@ $lang->custom->notice->confirmReviewCase = 'Set the case in Wait to Normal?'; $lang->custom->notice->storyReviewTip = 'After selecting by individual, position, and department, take the union of these three filters. '; $lang->custom->notice->selectAllTip = 'After selecting all people, the reviewers will be emptied and grayed out while hiding their positions and departments.'; $lang->custom->notice->repeatKey = 'Repeat Key %s'; -$lang->custom->notice->readOnlyOfCode = 'A code is a management term that exists for secrecy or as an antonym. When code management is enabled, the code information of program, product, project, and execution in the system will be displayed in the creation, editing, detail, and list pages.'; +$lang->custom->notice->readOnlyOfCode = 'A code is a management term that exists for secrecy or as an antonym. When code management is enabled, the code information of product, project, and execution in the system will be displayed in the creation, editing, detail, and list pages.'; $lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Home. Do you want to go to Product Home?"; $lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Home. Do you want to go to Project Home?"; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index dbf5f93961..b7318ed979 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -210,7 +210,7 @@ $lang->custom->notice->confirmReviewCase = 'Set the case in Wait to Normal?'; $lang->custom->notice->storyReviewTip = 'After selecting by individual, position, and department, take the union of these three filters. '; $lang->custom->notice->selectAllTip = 'After selecting all people, the reviewers will be emptied and grayed out while hiding their positions and departments.'; $lang->custom->notice->repeatKey = 'Repeat Key %s'; -$lang->custom->notice->readOnlyOfCode = "Le code est un terme de gestion utilisé pour la confidentialité ou comme alias. Lorsque la gestion du code est activée, le programme, le produit, le projet et l'exécution dans le système afficheront les informations de code sur les pages de création, de modification, de détails et de liste."; +$lang->custom->notice->readOnlyOfCode = "Le code est un terme de gestion utilisé pour la confidentialité ou comme alias. Lorsque la gestion du code est activée, le produit, le projet et l'exécution dans le système afficheront les informations de code sur les pages de création, de modification, de détails et de liste."; $lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ possède une page d'accueil. Voulez-vous consulter la page d'accueil du produit ?"; $lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ possède une page d'accueil. Voulez-vous consulter la page d'accueil du produit ?"; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 4ea7776a77..4d9a67aeeb 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -210,7 +210,7 @@ $lang->custom->notice->confirmReviewCase = '是否将待评审的用例修改 $lang->custom->notice->storyReviewTip = '按人员、职位、部门勾选后,取所有人员的并集。'; $lang->custom->notice->selectAllTip = '勾选所有人员后,会清空并置灰评审人员,同时隐藏职位、部门。'; $lang->custom->notice->repeatKey = '%s键重复'; -$lang->custom->notice->readOnlyOfCode = '代号是一种管理话术,主要便于保密或作为别名存在。启用代号管理后,系统中的项目集、产品、项目、执行在创建、编辑、详情、列表等页面均会展示代号信息。'; +$lang->custom->notice->readOnlyOfCode = '代号是一种管理话术,主要便于保密或作为别名存在。启用代号管理后,系统中的产品、项目、执行在创建、编辑、详情、列表等页面均会展示代号信息。'; $lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?"; $lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?"; diff --git a/module/project/config.php b/module/project/config.php index e742862ec9..6df296e022 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -137,7 +137,7 @@ $config->project->maxCheckList->waterfall = array('execution', 'design', 'doc', $config->project->search['module'] = 'project'; $config->project->search['fields']['name'] = $lang->project->name; -$config->project->search['fields']['code'] = $lang->project->code; +if(!isset($config->setCode) or $config->setCode == 1 )$config->project->search['fields']['code'] = $lang->project->code; $config->project->search['fields']['id'] = $lang->project->id; $config->project->search['fields']['model'] = $lang->project->model; $config->project->search['fields']['parent'] = $lang->project->parent; diff --git a/module/project/model.php b/module/project/model.php index d3c887f5c6..5a78b6ed6a 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1570,6 +1570,9 @@ class projectModel extends model } if(dao::isError()) return false; + $requiredFields = $this->config->project->edit->requiredFields; + if(isset($this->config->setCode) and $this->config->setCode == 0) $requiredFields = trim(str_replace(',code,', ',', ",{$requiredFields},"), ','); + foreach($projects as $projectID => $project) { $oldProject = $oldProjects[$projectID]; @@ -1577,7 +1580,7 @@ class projectModel extends model $this->dao->update(TABLE_PROJECT)->data($project) ->autoCheck($skipFields = 'begin,end') - ->batchCheck($this->config->project->edit->requiredFields , 'notempty') + ->batchCheck($requiredFields, 'notempty') ->checkIF($project->begin != '', 'begin', 'date') ->checkIF($project->end != '', 'end', 'date') ->checkIF($project->end != '', 'end', 'gt', $project->begin)