From d52e26f52c16e31eb6329a2fdcc3f78829f2e1b0 Mon Sep 17 00:00:00 2001 From: wangxuepeng Date: Thu, 16 Mar 2023 07:42:55 +0000 Subject: [PATCH 1/9] # Fixed #bug23998. --- module/doc/control.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 62a201ffee..336439b4e8 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -236,8 +236,7 @@ class doc extends control $response['message'] = $this->lang->saveSuccess; $response['result'] = 'success'; - $response['closeModal'] = true; - $response['callback'] = "redirectParentWindow($hasLibPriv, $libID, $objectID)"; + $response['locate'] = 'parent'; return $this->send($response); } From c18770de91dcf0fab7157ed327b4f1737c96f367 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 16 Mar 2023 08:28:27 +0000 Subject: [PATCH 2/9] * Fix bug #32939. --- module/bug/css/browse.css | 1 + module/task/model.php | 1 + 2 files changed, 2 insertions(+) diff --git a/module/bug/css/browse.css b/module/bug/css/browse.css index 260ea0ab1d..557dba00db 100644 --- a/module/bug/css/browse.css +++ b/module/bug/css/browse.css @@ -22,6 +22,7 @@ th.c-confirmed {text-align: center;} .c-severity {overflow: hidden; white-space: nowrap;} .c-keywords {overflow: hidden; white-space: nowrap;} .c-id {text-overflow: ellipsis; white-space: nowrap;} +.c-toTask {overflow: hidden; white-space: nowrap;} .body-modal #mainMenu>.btn-toolbar {width: auto;} diff --git a/module/task/model.php b/module/task/model.php index 085e38fa20..71ca9f9516 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -189,6 +189,7 @@ class taskModel extends model if($bugID > 0) { $this->dao->update(TABLE_TASK)->set('fromBug')->eq($bugID)->where('id')->eq($taskID)->exec(); + $this->dao->update(TABLE_BUG)->set('toTask')->eq($taskID)->where('id')->eq($bugID)->exec(); $this->loadModel('action')->create('bug', $bugID, 'converttotask', '', $taskID); } From 60e1885ccb786a22b834cbb00b6068d188cdb849 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 16 Mar 2023 16:38:24 +0800 Subject: [PATCH 3/9] * Revert the code for BI nav. --- module/upgrade/config.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/module/upgrade/config.php b/module/upgrade/config.php index cdb1c343b8..7227c0aab4 100644 --- a/module/upgrade/config.php +++ b/module/upgrade/config.php @@ -405,18 +405,6 @@ $config->delete['17_8'][] = 'extension/max/common/ext/lang/fr/crystal.php'; $config->delete['17_8'][] = 'extension/max/common/ext/lang/vi/crystal.php'; $config->delete['18_0'][] = 'extension/max/custom/ext/view/mode.zentaomax.html.hook.php'; $config->delete['18_0'][] = 'extension/max/my/ext/view/audit.html.php'; -$config->delete['18_0'][] = 'extension/biz/common/ext/lang/de/report.php'; -$config->delete['18_0'][] = 'extension/biz/common/ext/lang/en/report.php'; -$config->delete['18_0'][] = 'extension/biz/common/ext/lang/fr/report.php'; -$config->delete['18_0'][] = 'extension/biz/common/ext/lang/vi/report.php'; -$config->delete['18_0'][] = 'extension/biz/common/ext/lang/zh-cn/report.php'; -$config->delete['18_0'][] = 'extension/biz/common/ext/lang/zh-tw/report.php'; -$config->delete['18_0'][] = 'extension/max/common/ext/lang/de/report.php'; -$config->delete['18_0'][] = 'extension/max/common/ext/lang/en/report.php'; -$config->delete['18_0'][] = 'extension/max/common/ext/lang/fr/report.php'; -$config->delete['18_0'][] = 'extension/max/common/ext/lang/vi/report.php'; -$config->delete['18_0'][] = 'extension/max/common/ext/lang/zh-cn/report.php'; -$config->delete['18_0'][] = 'extension/max/common/ext/lang/zh-tw/report.php'; $config->delete['18_0'][] = 'extension/max/block/ext/config/zentaomax.php'; $config->delete['18_0'][] = 'extension/biz/repo/ext/control/ajaxgetcommitinfo.php'; $config->delete['18_0'][] = 'extension/biz/repo/ext/control/ajaxgetbranchesandtags.php'; From cb7b7561c48c554dfb5d616b9d01202c9dbc69ae Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 16 Mar 2023 17:11:31 +0800 Subject: [PATCH 4/9] * Fixed an issue where requirement concepts are inconsistent across language items. --- module/dev/model.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/module/dev/model.php b/module/dev/model.php index 9d6ff2126f..47e14f5198 100644 --- a/module/dev/model.php +++ b/module/dev/model.php @@ -418,6 +418,7 @@ class devModel extends model $originalLangs['SRCommon'] = $this->lang->dev->SR; $URSRList = $this->loadModel('custom')->getItems("lang={$language}&module=custom§ion=URSRList&key={$this->config->custom->URSR}&vision={$this->config->vision}"); + if(empty($URSRList)) $URSRList = $this->custom->getItems("lang={$language}&module=custom§ion=URSRList&vision={$this->config->vision}"); $URSRList = array_shift($URSRList); if($URSRList) { @@ -505,6 +506,7 @@ class devModel extends model $customedLangs['URCommon'] = $this->lang->dev->UR == $this->lang->URCommon ? '' : $this->lang->URCommon; $customedLangs['SRCommon'] = $this->lang->dev->SR == $this->lang->SRCommon ? '' : $this->lang->SRCommon; $URSRList = $this->custom->getItems("lang={$language}&module=custom§ion=URSRList&key={$this->config->custom->URSR}&vision={$this->config->vision}"); + if(empty($URSRList)) $URSRList = $this->custom->getItems("lang={$language}&module=custom§ion=URSRList&vision={$this->config->vision}"); $URSRList = array_shift($URSRList); if($URSRList) { @@ -1040,7 +1042,12 @@ class devModel extends model $_POST = array(); $oldValue = $this->dao->select('*')->from(TABLE_LANG)->where('`key`')->eq($this->config->custom->URSR)->andWhere('section')->eq('URSRList')->andWhere('lang')->eq($language)->andWhere('module')->eq('custom')->fetch('value'); - $oldValue = json_decode($oldValue); + $URSRList = $this->loadModel('custom')->getItems("lang={$language}&module=custom§ion=URSRList&key={$this->config->custom->URSR}&vision={$this->config->vision}"); + if(empty($URSRList)) $URSRList = $this->custom->getItems("lang={$language}&module=custom§ion=URSRList&vision={$this->config->vision}"); + $URSRList = array_shift($URSRList); + + $this->config->custom->URSR = $URSRList->key; + $oldValue = json_decode($URSRList->value); $_POST['SRName'] = !empty($post['common_SRCommon']) ? $post['common_SRCommon'] : zget($oldValue, 'defaultSRName', $oldValue->SRName); $_POST['URName'] = !empty($post['common_URCommon']) ? $post['common_URCommon'] : zget($oldValue, 'defaultURName', $oldValue->URName); From 2921c625d4bb1c5efc378ca71f9511389a05959c Mon Sep 17 00:00:00 2001 From: guofeilong Date: Thu, 16 Mar 2023 17:14:02 +0800 Subject: [PATCH 5/9] * Code for bug #33000 --- module/caselib/view/create.html.php | 2 +- www/js/my.full.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/caselib/view/create.html.php b/module/caselib/view/create.html.php index 81db56d2c2..2c8ee99723 100644 --- a/module/caselib/view/create.html.php +++ b/module/caselib/view/create.html.php @@ -25,7 +25,7 @@ caselib->desc;?> - + printExtendFields('', 'table');?> diff --git a/www/js/my.full.js b/www/js/my.full.js index cced1e4556..478adaf7c5 100755 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -31,7 +31,7 @@ { if(config.currentMethod.indexOf(skipMethods[i]) === 0) return; }; - var $messager; + var $messager = ''; setTimeout(function() { @@ -43,7 +43,7 @@ if($(form).attr('target') == 'hiddenwin') { var needSkip = true; - var keepModules = ['program', 'product', 'project', 'testcase']; + var keepModules = ['program', 'product', 'project', 'testcase', 'execution', 'caselib']; for(var i = 0; i < keepModules.length; i++) { if(needSkip && config.currentModule.indexOf(keepModules[i]) === 0) needSkip = false; @@ -62,7 +62,7 @@ if(formDataStored && formDataStored.length) { message = lang.confirmDraft.replace('%name%', lang[config.currentModule] ? lang[config.currentModule] : ''); - $messager = new $.zui.Messager(message, { + $messager = new $.zui.Messager(message, { close: true, type: 'info', placement: 'top', From 7dc5533817891cb4597cff133529e5af72a96315 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 17 Mar 2023 08:48:22 +0800 Subject: [PATCH 6/9] * fix bug #33002. --- module/my/model.php | 12 +++++++----- module/my/view/audit.html.php | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/module/my/model.php b/module/my/model.php index 9b462d72f1..06456510bc 100644 --- a/module/my/model.php +++ b/module/my/model.php @@ -1112,11 +1112,12 @@ class myModel extends model { if($checkExists) return true; $story = new stdclass(); - $story->id = $data->id; - $story->title = $data->title; - $story->type = 'story'; - $story->time = $data->openedDate; - $story->status = $data->status; + $story->id = $data->id; + $story->title = $data->title; + $story->type = 'story'; + $story->storyType = $data->type; + $story->time = $data->openedDate; + $story->status = $data->status; $stories[$story->id] = $story; } @@ -1435,6 +1436,7 @@ class myModel extends model $review->status = $objectType == 'attend' ? $object->reviewStatus : ((isset($object->status) and !isset($flows[$objectType])) ? $object->status : 'done'); if(strpos($review->result, ',') !== false) list($review->result) = explode(',', $review->result); + if($objectType == 'story') $review->storyType = $object->type; if($review->type == 'review') $review->type = 'projectreview'; if($review->type == 'case') $review->type = 'testcase'; $review->title = ''; diff --git a/module/my/view/audit.html.php b/module/my/view/audit.html.php index 20b6198d42..d6e7345166 100644 --- a/module/my/view/audit.html.php +++ b/module/my/view/audit.html.php @@ -57,7 +57,7 @@ $typeName = ''; if(isset($lang->{$review->type}->common)) $typeName = $lang->{$review->type}->common; - if($type == 'story') $typeName = $lang->SRCommon; + if($type == 'story') $typeName = $review->storyType == 'story' ? $lang->SRCommon : $lang->URCommon; if($review->type == 'projectreview') $typeName = $lang->project->common; if(isset($flows[$review->type])) $typeName = $flows[$review->type]; From 8dcfe4a48ad2a81b886e26c4ec460410198b1973 Mon Sep 17 00:00:00 2001 From: wangxuepeng Date: Wed, 15 Mar 2023 05:23:10 +0000 Subject: [PATCH 7/9] * Fix bug 32706. --- module/action/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/config.php b/module/action/config.php index 77eaec4b92..d7e9abdb8f 100755 --- a/module/action/config.php +++ b/module/action/config.php @@ -65,7 +65,7 @@ $config->action->majorList['project'] = array('opened', 'edited'); $config->action->majorList['execution'] = array('opened', 'edited'); $config->action->needGetProjectType = 'build,task,bug,case,testcase,caselib,testtask,testsuite,testreport,doc,issue,release,risk,design,opportunity,trainplan,gapanalysis,researchplan,researchreport,'; -$config->action->needGetRelateField = ',story,productplan,release,task,build,bug,testcase,case,testtask,testreport,doc,doclib,issue,risk,opportunity,trainplan,gapanalysis,team,whitelist,researchplan,researchreport,meeting,kanbanlane,kanbancolumn,module,review,'; +$config->action->needGetRelateField = ',branch,story,productplan,release,task,build,bug,testcase,case,testtask,testreport,doc,doclib,issue,risk,opportunity,trainplan,gapanalysis,team,whitelist,researchplan,researchreport,meeting,kanbanlane,kanbancolumn,module,review,'; $config->action->noLinkModules = ',doclib,module,webhook,gitlab,gitea,gogs,sonarqube,pipeline,jenkins,kanban,kanbanspace,kanbancolumn,kanbanlane,kanbanregion,kanbancard,execution,project,traincategory,apistruct,program,product,user,entry,repo,'; $config->action->ignoreObjectType4Dynamic = 'kanbanregion,kanbanlane,kanbancolumn'; From 4c88c29318c533123f1c1d39d73b9392382fad5e Mon Sep 17 00:00:00 2001 From: Yagami Date: Fri, 17 Mar 2023 09:14:07 +0800 Subject: [PATCH 8/9] * Fix bug #33009. --- module/execution/model.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/module/execution/model.php b/module/execution/model.php index 58be5f9996..6acd189014 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1311,6 +1311,27 @@ class executionModel extends model unset($execution->end); } + if($this->post->readjustTime && $oldExecution->grade > 1) + { + $parent = $this->getByID($oldExecution->parent); + $begin = $execution->begin; + $end = $execution->end; + $parentBegin = $parent->begin; + $parentEnd = $parent->end; + + if($begin < $parentBegin) + { + dao::$errors["message"][] = sprintf($this->lang->execution->errorLetterParent, $parentBegin); + } + + if($end > $parentEnd) + { + dao::$errors["message"][] = sprintf($this->lang->execution->errorGreaterParent, $parentEnd); + } + } + + if(dao::isError()) return false; + $execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->activate['id'], $this->post->uid); $this->dao->update(TABLE_EXECUTION)->data($execution) ->autoCheck() From ec80eedcc91723b4335b277ce002adbfd72043d2 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Fri, 17 Mar 2023 09:19:36 +0800 Subject: [PATCH 9/9] * Code for bug #32973. --- www/js/my.full.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/js/my.full.js b/www/js/my.full.js index 478adaf7c5..b2fd32bdec 100755 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -135,7 +135,13 @@ { KindEditor.remove('#' + item.name); formItem.val(item.value); - $(formItem).kindeditor(); + $(formItem).kindeditor( + { + afterChange: function() + { + $(formItem).closest('.main-form').trigger('change'); + } + }); } else {