From b0291eeba4ec2e6ef36ac8763ee5ca01e0bddfdd Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Tue, 1 Jun 2021 09:29:30 +0800 Subject: [PATCH 1/5] * Fix bug #38644. --- module/custom/control.php | 13 ------------- module/custom/lang/de.php | 1 - module/custom/lang/en.php | 1 - module/custom/lang/fr.php | 1 - module/custom/lang/vi.php | 1 - module/custom/lang/zh-cn.php | 1 - module/custom/lang/zh-tw.php | 1 - module/custom/view/browsestoryconcept.html.php | 15 +-------------- module/group/lang/resource.php | 5 +---- 9 files changed, 2 insertions(+), 37 deletions(-) diff --git a/module/custom/control.php b/module/custom/control.php index f0b13b6818..485c0b7b36 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -420,19 +420,6 @@ class custom extends control $this->display(); } - /** - * Set story concept. - * - * @param int $key - * @access public - * @return void - */ - public function setDefaultConcept($key = 0) - { - $this->loadModel('setting')->setItem('system.custom.URSR', $key); - die(js::reload('parent')); - } - /** * Delete story concept. * diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index 0066022c91..6107d9937b 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -38,7 +38,6 @@ $lang->custom->waterfallCommon = "Waterfall"; $lang->custom->buildin = "Buildin"; $lang->custom->editStoryConcept = "Edit Story Concept"; $lang->custom->setStoryConcept = "Set Story Concept"; -$lang->custom->setDefaultConcept = "Set Default Concept"; $lang->custom->browseStoryConcept = "List of story concepts"; $lang->custom->deleteStoryConcept = "Delete story Concept"; $lang->custom->URConcept = "UR Concept"; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 6473f51d14..00235b1846 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -38,7 +38,6 @@ $lang->custom->waterfallCommon = "Waterfall"; $lang->custom->buildin = "Buildin"; $lang->custom->editStoryConcept = "Edit Story Concept"; $lang->custom->setStoryConcept = "Set Story Concept"; -$lang->custom->setDefaultConcept = "Set Default Concept"; $lang->custom->browseStoryConcept = "List of story concepts"; $lang->custom->deleteStoryConcept = "Delete story Concept"; $lang->custom->URConcept = "UR Concept"; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index dc63dcbc5b..77a1a51ad0 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -38,7 +38,6 @@ $lang->custom->waterfallCommon = "Waterfall"; $lang->custom->buildin = "Buildin"; $lang->custom->editStoryConcept = "Edit Story Concept"; $lang->custom->setStoryConcept = "Set Story Concept"; -$lang->custom->setDefaultConcept = "Set Default Concept"; $lang->custom->browseStoryConcept = "List of story concepts"; $lang->custom->deleteStoryConcept = "Delete story Concept"; $lang->custom->URConcept = "UR Concept"; diff --git a/module/custom/lang/vi.php b/module/custom/lang/vi.php index f4a8b48a17..ddffc57c45 100644 --- a/module/custom/lang/vi.php +++ b/module/custom/lang/vi.php @@ -38,7 +38,6 @@ $lang->custom->waterfallCommon = "Waterfall"; $lang->custom->buildin = "Buildin"; $lang->custom->editStoryConcept = "Edit Story Concept"; $lang->custom->setStoryConcept = "Set Story Concept"; -$lang->custom->setDefaultConcept = "Set Default Concept"; $lang->custom->browseStoryConcept = "List of story concepts"; $lang->custom->deleteStoryConcept = "Delete story Concept"; $lang->custom->URConcept = "UR Concept"; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 60b1e10b0b..23a648b109 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -38,7 +38,6 @@ $lang->custom->waterfallCommon = "瀑布"; $lang->custom->buildin = "系统内置"; $lang->custom->editStoryConcept = "编辑需求概念"; $lang->custom->setStoryConcept = "设置需求概念"; -$lang->custom->setDefaultConcept = "设置默认概念"; $lang->custom->browseStoryConcept = "需求概念列表"; $lang->custom->deleteStoryConcept = "删除需求概念"; $lang->custom->URConcept = "用需概念"; diff --git a/module/custom/lang/zh-tw.php b/module/custom/lang/zh-tw.php index 5dff2482e1..2e63c697f2 100644 --- a/module/custom/lang/zh-tw.php +++ b/module/custom/lang/zh-tw.php @@ -38,7 +38,6 @@ $lang->custom->waterfallCommon = "瀑布"; $lang->custom->buildin = "系統內置"; $lang->custom->editStoryConcept = "編輯需求概念"; $lang->custom->setStoryConcept = "設置需求概念"; -$lang->custom->setDefaultConcept = "設置預設概念"; $lang->custom->browseStoryConcept = "需求概念列表"; $lang->custom->deleteStoryConcept = "刪除需求概念"; $lang->custom->URConcept = "用需概念"; diff --git a/module/custom/view/browsestoryconcept.html.php b/module/custom/view/browsestoryconcept.html.php index d7555e869f..a369471976 100644 --- a/module/custom/view/browsestoryconcept.html.php +++ b/module/custom/view/browsestoryconcept.html.php @@ -11,7 +11,7 @@ ?> - diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 1259b6bf83..cbca515e89 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -1081,7 +1081,6 @@ $lang->resource->custom->timezone = 'timezone'; $lang->resource->custom->setStoryConcept = 'setStoryConcept'; $lang->resource->custom->editStoryConcept = 'editStoryConcept'; $lang->resource->custom->browseStoryConcept = 'browseStoryConcept'; -$lang->resource->custom->setDefaultConcept = 'setDefaultConcept'; $lang->resource->custom->deleteStoryConcept = 'deleteStoryConcept'; $lang->custom->methodOrder[5] = 'index'; @@ -1096,8 +1095,7 @@ $lang->custom->methodOrder[45] = 'timezone'; $lang->custom->methodOrder[50] = 'setStoryConcept'; $lang->custom->methodOrder[55] = 'editStoryConcept'; $lang->custom->methodOrder[60] = 'browseStoryConcept'; -$lang->custom->methodOrder[65] = 'setDefaultConcept'; -$lang->custom->methodOrder[70] = 'deleteStoryConcept'; +$lang->custom->methodOrder[65] = 'deleteStoryConcept'; $lang->resource->datatable = new stdclass(); $lang->resource->datatable->setGlobal = 'setGlobal'; @@ -1808,7 +1806,6 @@ $lang->changelog['15.0.rc1'][] = 'user-execution'; $lang->changelog['15.0.rc1'][] = 'custom-setStoryConcept'; $lang->changelog['15.0.rc1'][] = 'custom-editStoryConcept'; $lang->changelog['15.0.rc1'][] = 'custom-browseStoryConcept'; -$lang->changelog['15.0.rc1'][] = 'custom-setDefaultConcept'; $lang->changelog['15.0.rc1'][] = 'custom-deleteStoryConcept'; $lang->changelog['15.0.rc1'][] = 'search-index'; $lang->changelog['15.0.rc1'][] = 'search-buildIndex'; From add67a90394e48a398f1ddc7ba20e8fdfe86d9fd Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 1 Jun 2021 09:38:58 +0800 Subject: [PATCH 2/5] * Fix the priority issue of creating todo. --- module/my/view/todo.html.php | 2 +- module/todo/model.php | 45 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index 27db4a2da4..4409ea124d 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -98,7 +98,7 @@ date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?> todo->typeList, $todo->type, '');?> pri;?>' title='todo->priList, $todo->pri, $todo->pri);?>'>todo->priList, $todo->pri)?> - createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "data-toggle='modal' data-width='75%' data-type='iframe' data-title='" . $lang->todo->view . "' data-icon='check'");?> + createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "data-toggle='modal' data-width='80%' data-type='iframe' data-title='" . $lang->todo->view . "' data-icon='check'");?> assignedBy);?> begin;?> end;?> diff --git a/module/todo/model.php b/module/todo/model.php index 98728838f9..67dd7b7327 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -26,6 +26,7 @@ class todoModel extends model $idvalue = 0; if($hasObject && $objectType) $idvalue = $this->post->uid ? $this->post->$objectType : $this->post->idvalue; + $todo = fixer::input('post') ->add('account', $this->app->user->account) ->setDefault('idvalue', 0) @@ -38,6 +39,50 @@ class todoModel extends model ->remove(implode(',', $this->config->todo->moduleList) . ',uid') ->get(); + if(!isset($todo->pri)) + { + if($this->post->type == 'task') + { + $todo->pri = $this->dao->select('pri')->from(TABLE_TASK)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'bug') + { + $todo->pri = $this->dao->select('pri')->from(TABLE_BUG)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'story') + { + $todo->pri = $this->dao->select('pri')->from(TABLE_STORY)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'testtask') + { + $todo->pri = $this->dao->select('pri')->from(TABLE_TESTTASK)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'issue' and isset($this->config->maxVersion)) + { + $todo->pri = $this->dao->select('pri')->from(TABLE_ISSUE)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'risk' and isset($this->config->maxVersion)) + { + $todo->pri = $this->dao->select('pri')->from(TABLE_RISK)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'review' and isset($this->config->maxVersion)) + { + $todo->pri = $this->dao->select('pri')->from(TABLE_REVIEW)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'feedback' and isset($this->config->maxVersion)) + { + $todo->pri = $this->dao->select('pri')->from(TABLE_FEEDBACK)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'opportunity' and isset($this->config->maxVersion)) + { + $todo->pri = $this->dao->select('pri')->from(TABLE_OPPORTUNITY)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + + if($todo->pri == 'high') $todo->pri = 1; + if($todo->pri == 'middle') $todo->pri = 2; + if($todo->pri == 'low') $todo->pri = 3; + } + if($todo->type != 'custom') { $type = $todo->type; From e92289c2c6ce3365c8fcc0e0a1c4c70162fcb5db Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 1 Jun 2021 09:50:19 +0800 Subject: [PATCH 3/5] * Fix the issue of assigned to single-select drop-down when switching is performed. --- module/task/js/create.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/task/js/create.js b/module/task/js/create.js index 519a1581d3..71bb2b8f52 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -21,6 +21,8 @@ function loadAll(executionID) */ function loadExecutionMembers(executionID) { + $("#multipleBox").removeAttr("checked"); + $('.team-group').addClass('hidden'); $.get(createLink('execution', 'ajaxGetMembers', 'executionID=' + executionID + '&assignedTo=' + $('#assignedTo').val()), function(data) { $('#assignedTo_chosen').remove(); From 3f446e63a66ca94a35355e17f0149086424254d7 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Tue, 1 Jun 2021 10:09:45 +0800 Subject: [PATCH 4/5] * Fix bug 12732. --- module/project/model.php | 17 +++++++++-------- module/upgrade/model.php | 31 ++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index 9fac539104..a90d45c753 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -757,14 +757,15 @@ class projectModel extends model { /* If parent not empty, link products or create products. */ $product = new stdclass(); - $product->name = $this->post->productName ? $this->post->productName : $project->name; - $product->bind = $this->post->parent ? 0 : 1; - $product->program = $project->parent ? current(array_filter(explode(',', $program->path))) : 0; - $product->acl = $project->acl = 'open' ? 'open' : 'private'; - $product->PO = $project->PM; - $product->createdBy = $this->app->user->account; - $product->createdDate = helper::now(); - $product->status = 'normal'; + $product->name = $this->post->productName ? $this->post->productName : $project->name; + $product->bind = $this->post->parent ? 0 : 1; + $product->program = $project->parent ? current(array_filter(explode(',', $program->path))) : 0; + $product->acl = $project->acl = 'open' ? 'open' : 'private'; + $product->PO = $project->PM; + $product->createdBy = $this->app->user->account; + $product->createdDate = helper::now(); + $product->status = 'normal'; + $product->createdVersion = $this->config->version; $this->dao->insert(TABLE_PRODUCT)->data($product)->exec(); $productID = $this->dao->lastInsertId(); diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 21672ab41c..4231747f6f 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -674,6 +674,10 @@ class upgradeModel extends model $this->execSQL($this->getUpgradeFile('15.0')); $this->updateProjectLifeTime(); $this->appendExec('15_0'); + case '15_0_1': + $this->saveLogs('Execute 15_0_1'); + $this->updateProductVersion(); + $this->appendExec('15_0_1'); } $this->deletePatch(); @@ -4635,13 +4639,14 @@ class upgradeModel extends model if(isset($data->name)) { $product = new stdclass(); - $product->program = $data->program; - $product->name = $data->name; - $product->acl = 'open'; - $product->PO = isset($this->app->user->account) ? $this->app->user->account : ''; - $product->createdBy = isset($this->app->user->account) ? $this->app->user->account : ''; - $product->createdDate = helper::now(); - $product->status = 'normal'; + $product->program = $data->program; + $product->name = $data->name; + $product->acl = 'open'; + $product->PO = isset($this->app->user->account) ? $this->app->user->account : ''; + $product->createdBy = isset($this->app->user->account) ? $this->app->user->account : ''; + $product->createdDate = helper::now(); + $product->status = 'normal'; + $product->createdVersion = $this->config->version; $this->dao->insert(TABLE_PRODUCT)->data($product)->exec(); $productID = $this->dao->lastInsertID(); @@ -5050,4 +5055,16 @@ class upgradeModel extends model return true; } + + /** + * Update the createdVersion field of the zt_product table. + * + * @access public + * @return void + */ + public function updateProductVersion() + { + $this->dao->update(TABLE_PRODUCT)->set('createdVersion')->eq($this->config->version)->where('createdVersion')->eq('')->exec(); + return true; + } } From 9fb469a9acb29e7d19e60d25ad99156e96eb7ad9 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Tue, 1 Jun 2021 10:53:49 +0800 Subject: [PATCH 5/5] * Add the language item. --- module/action/lang/de.php | 1 + module/action/lang/en.php | 1 + module/action/lang/fr.php | 1 + module/action/lang/vi.php | 1 + module/action/lang/zh-cn.php | 1 + 5 files changed, 5 insertions(+) diff --git a/module/action/lang/de.php b/module/action/lang/de.php index f64cfcded0..35f440b1d3 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -263,6 +263,7 @@ $lang->action->label->reviewclosed = 'Review Failed'; $lang->action->label->passreviewed = 'Pass'; $lang->action->label->clarifyreviewed = 'Clarify'; $lang->action->label->commitsummary = 'Commit Summary'; +$lang->action->label->updatetrainee = 'Update Trainee'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 22304e017c..02243c1cb5 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -267,6 +267,7 @@ $lang->action->label->reviewclosed = 'Review Failed'; $lang->action->label->passreviewed = 'Pass'; $lang->action->label->clarifyreviewed = 'Clarify'; $lang->action->label->commitsummary = 'Commit Summary'; +$lang->action->label->updatetrainee = 'Update Trainee'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index ede7c8810c..8e24a6249a 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -263,6 +263,7 @@ $lang->action->label->reviewclosed = 'Review Failed'; $lang->action->label->passreviewed = 'Pass'; $lang->action->label->clarifyreviewed = 'Clarify'; $lang->action->label->commitsummary = 'Commit Summary'; +$lang->action->label->updatetrainee = 'Update Trainee'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass(); diff --git a/module/action/lang/vi.php b/module/action/lang/vi.php index e7a5138a63..012d12c75f 100644 --- a/module/action/lang/vi.php +++ b/module/action/lang/vi.php @@ -263,6 +263,7 @@ $lang->action->label->reviewclosed = 'Review Failed'; $lang->action->label->passreviewed = 'Pass'; $lang->action->label->clarifyreviewed = 'Clarify'; $lang->action->label->commitsummary = 'Commit Summary'; +$lang->action->label->updatetrainee = 'Update Trainee'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index c0e235f942..ed9dcede53 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -267,6 +267,7 @@ $lang->action->label->reviewclosed = '评审失败'; $lang->action->label->passreviewed = '确认通过'; $lang->action->label->clarifyreviewed = '有待明确'; $lang->action->label->commitsummary = '提交培训总结'; +$lang->action->label->updatetrainee = '更新培训人员'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass();