From 79540ab48071b0e777bbbb8e15035ae3869768cb Mon Sep 17 00:00:00 2001 From: Lufei Date: Thu, 8 Dec 2022 14:23:23 +0800 Subject: [PATCH 01/23] * Use string instead of varchar. --- module/dept/model.php | 4 ++-- module/holiday/model.php | 4 ++-- module/program/control.php | 4 ++-- module/todo/control.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/dept/model.php b/module/dept/model.php index 7fd5752c90..fa432bda96 100644 --- a/module/dept/model.php +++ b/module/dept/model.php @@ -371,10 +371,10 @@ class deptModel extends model /** * Get users of a deparment. * - * @param varchar $browseType inside|outside|all + * @param string $browseType inside|outside|all * @param int $deptID * @param object $pager - * @param varchar $orderBy + * @param string $orderBy * @access public * @return array */ diff --git a/module/holiday/model.php b/module/holiday/model.php index cfffe7ff23..2b4a05d0f3 100644 --- a/module/holiday/model.php +++ b/module/holiday/model.php @@ -250,8 +250,8 @@ class holidayModel extends model /** * Get diff days. * - * @param varchar $begin - * @param varchar $end + * @param string $begin + * @param string $end * @access public * @return bool */ diff --git a/module/program/control.php b/module/program/control.php index 57555ca63f..85b733eaf0 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -29,8 +29,8 @@ class program extends control /** * Program list. * - * @param varchar $status - * @param varchar $orderBy + * @param string $status + * @param string $orderBy * @access public * @return void */ diff --git a/module/todo/control.php b/module/todo/control.php index 173526d4f4..b8b41150a8 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -668,7 +668,7 @@ class todo extends control * AJAX: get program id. * * @param int $objectID - * @param varchar $objectType + * @param string $objectType * @access public * @return void */ From ee78bb255b8e9aff34acfe751c1b54733d226ee6 Mon Sep 17 00:00:00 2001 From: zenggang Date: Mon, 12 Dec 2022 02:53:26 +0000 Subject: [PATCH 02/23] * Resolve feedback#1692 --- module/product/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/product/control.php b/module/product/control.php index 4045f5c654..385e17f7e9 100755 --- a/module/product/control.php +++ b/module/product/control.php @@ -249,7 +249,7 @@ class product extends control $showBranch = $this->loadModel('branch')->showBranch($productID); /* Get stories. */ - if($isProjectStory) + if($isProjectStory and $storyType == 'story') { $showBranch = $this->loadModel('branch')->showBranch($productID, 0, $projectID); From ad203dfbf91ed3707bbf8309152c9c1f910ccea7 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Mon, 12 Dec 2022 13:25:39 +0800 Subject: [PATCH 03/23] * Finish Task #79450 --- module/story/js/edit.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/story/js/edit.js b/module/story/js/edit.js index 21116b0f48..f1f75fb8dd 100644 --- a/module/story/js/edit.js +++ b/module/story/js/edit.js @@ -90,4 +90,9 @@ $(function() maxAutoDropWidth : document.body.scrollWidth + document.getElementById('duplicateStory').offsetWidth - document.getElementById('duplicateStoryBox').getBoundingClientRect().right }); } + + $('#planIdBox').click(function() + { + $('#planIdBox .chosen-container').find('div').css('width', '280px') + }); }) From 295bfadc5b3d753d6bf5d03cae3532a6ea7b69c6 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Mon, 12 Dec 2022 15:38:55 +0800 Subject: [PATCH 04/23] * Finish Task #79671 --- module/story/js/close.js | 2 ++ module/story/js/common.js | 20 ++++++++++++-------- module/story/lang/de.php | 3 +++ module/story/lang/en.php | 3 +++ module/story/lang/fr.php | 3 +++ module/story/lang/zh-cn.php | 3 +++ module/story/model.php | 14 +++++++++++++- module/story/view/close.html.php | 19 +++++++++++-------- 8 files changed, 50 insertions(+), 17 deletions(-) diff --git a/module/story/js/close.js b/module/story/js/close.js index 4a8e9ffe28..b14bff76a6 100644 --- a/module/story/js/close.js +++ b/module/story/js/close.js @@ -24,4 +24,6 @@ $(function() disableEmptySearch : true, dropWidth : 'auto' }); + + $('[data-toggle="popover"]').popover(); }); diff --git a/module/story/js/common.js b/module/story/js/common.js index 40bf164e82..12d4b7e398 100644 --- a/module/story/js/common.js +++ b/module/story/js/common.js @@ -106,14 +106,18 @@ $('.twins').mouseout(function() { $(this).find('.unlink').addClass('hide'); }); -$('[data-toggle="popover"]').each(function(item) { - $index = $(this).attr('data-id'); - $(this).popover({ - placement: 'bottom', - html: true, - content: '
' + relievedTip + '
' - }); -}) +if(typeof(relievedTip) != 'undefined') +{ + $('[data-toggle="popover"]').each(function(item) { + $index = $(this).attr('data-id'); + $(this).popover({ + placement: 'bottom', + html: true, + content: '
' + relievedTip + '
' + }); + }) +} + function relieve(index) { diff --git a/module/story/lang/de.php b/module/story/lang/de.php index 27757b5344..0b0bd60e0d 100644 --- a/module/story/lang/de.php +++ b/module/story/lang/de.php @@ -522,3 +522,6 @@ $lang->requirement->linkStory = 'Link Story'; $lang->story->addBranch = 'Add %s'; $lang->story->deleteBranch = 'Delete %s'; $lang->story->notice->branch = 'Each branch will establish a requirement. The requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later'; + +$lang->story->relievedTwinsRelation = 'Relieved twins relationship'; +$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.'; \ No newline at end of file diff --git a/module/story/lang/en.php b/module/story/lang/en.php index ca7186698f..1e9b3386c9 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -522,3 +522,6 @@ $lang->requirement->linkStory = 'Link Story'; $lang->story->addBranch = 'Add %s'; $lang->story->deleteBranch = 'Delete %s'; $lang->story->notice->branch = 'Each branch will establish a requirement. The requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later'; + +$lang->story->relievedTwinsRelation = 'Relieved twins relationship'; +$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.'; \ No newline at end of file diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php index 4abae6310a..ba944e1faf 100644 --- a/module/story/lang/fr.php +++ b/module/story/lang/fr.php @@ -522,3 +522,6 @@ $lang->requirement->linkStory = 'Lier Story'; $lang->story->addBranch = 'Add %s'; $lang->story->deleteBranch = 'Delete %s'; $lang->story->notice->branch = 'Each branch will establish a requirement. The requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later'; + +$lang->story->relievedTwinsRelation = 'Relieved twins relationship'; +$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.'; \ No newline at end of file diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index 296aadab02..24ca7c30b9 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -522,3 +522,6 @@ $lang->requirement->linkStory = "关联{$lang->SRCommon}"; $lang->story->addBranch = '添加%s'; $lang->story->deleteBranch = '删除%s'; $lang->story->notice->branch = '每个分支会建立一个需求,需求间互为孪生关系。孪生需求间除产品、分支、模块、计划、阶段字段外均保持同步,后期您可以手动解除孪生关系。'; + +$lang->story->relievedTwinsRelation = '解除孪生关系'; +$lang->story->relievedTwinsRelationTips = '孪生关系解除后无法恢复,需求的关闭将不再同步。'; \ No newline at end of file diff --git a/module/story/model.php b/module/story/model.php index c1b8633253..4dcf38e19e 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2014,6 +2014,7 @@ class storyModel extends model ->stripTags($this->config->story->editor->close['id'], $this->config->allowedTags) ->removeIF($this->post->closedReason != 'duplicate', 'duplicateStory') ->removeIF($this->post->closedReason != 'subdivided', 'childStories') + ->remove('closeSync') ->get(); if(!empty($story->duplicateStory)) @@ -2050,7 +2051,18 @@ class storyModel extends model } $changes = common::createChanges($oldStory, $story); - if(!empty($oldStory->twins)) $this->syncTwins($storyID, $oldStory->twins, $changes, 'Closed'); + if($this->post->closeSync) + { + /* batchUnset twinID from twins.*/ + $replaceSql = "UPDATE " . TABLE_STORY . " SET twins = REPLACE(twins,',$storyID,', ',') WHERE `product` = $oldStory->product"; + $this->dbh->exec($replaceSql); + + /* Update twins to empty by twinID and if twins eq ','.*/ + $this->dao->update(TABLE_STORY)->set('twins')->eq('')->where('id')->eq($storyID)->orWhere('twins')->eq(',')->exec(); + + if(!dao::isError()) $this->loadModel('action')->create('story', $storyID, 'relieved'); + } + if(!empty($oldStory->twins) and !$this->post->closeSync) $this->syncTwins($storyID, $oldStory->twins, $changes, 'Closed'); return $changes; } diff --git a/module/story/view/close.html.php b/module/story/view/close.html.php index 82d0a9683b..9b927c4b6c 100644 --- a/module/story/view/close.html.php +++ b/module/story/view/close.html.php @@ -26,14 +26,17 @@ - - - twins)):?> - - - - - + + + From c3d53daa5aa074f597b67fee412254850e18f78e Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Mon, 12 Dec 2022 16:36:32 +0800 Subject: [PATCH 05/23] * Finish Task #79665 --- module/task/lang/de.php | 4 ++-- module/task/lang/en.php | 4 ++-- module/task/lang/fr.php | 4 ++-- module/task/lang/zh-cn.php | 4 ++-- module/task/view/create.html.php | 9 +++------ 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/module/task/lang/de.php b/module/task/lang/de.php index f3dbd8518d..2aa3ae522e 100644 --- a/module/task/lang/de.php +++ b/module/task/lang/de.php @@ -212,8 +212,8 @@ $lang->task->reasonList[''] = ''; $lang->task->reasonList['done'] = 'Erledigt'; $lang->task->reasonList['cancel'] = 'Abgebrochen'; -$lang->task->modeList['linear'] = 'Serial'; -$lang->task->modeList['multi'] = 'Parallel'; +$lang->task->modeList['linear'] = 'Multiple Person Serial'; +$lang->task->modeList['multi'] = 'Multiple Person Parallel'; $lang->task->afterChoices['continueAdding'] = ' Weitere Aufgaben erfassen'; $lang->task->afterChoices['toTaskList'] = 'Zurück zur Aufgabenliste'; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index 374e09c778..9abac62024 100755 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -212,8 +212,8 @@ $lang->task->reasonList[''] = ''; $lang->task->reasonList['done'] = 'Done'; $lang->task->reasonList['cancel'] = 'Cancelled'; -$lang->task->modeList['linear'] = 'Serial'; -$lang->task->modeList['multi'] = 'Parallel'; +$lang->task->modeList['linear'] = 'Multiple Person Serial'; +$lang->task->modeList['multi'] = 'Multiple Person Parallel'; $lang->task->afterChoices['continueAdding'] = ' Continue Adding Tasks'; $lang->task->afterChoices['toTaskList'] = 'Go to Task List'; diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php index 0501411684..8bf9f99c54 100644 --- a/module/task/lang/fr.php +++ b/module/task/lang/fr.php @@ -212,8 +212,8 @@ $lang->task->reasonList[''] = ''; $lang->task->reasonList['done'] = 'Fait'; $lang->task->reasonList['cancel'] = 'Annulé'; -$lang->task->modeList['linear'] = 'Serial'; -$lang->task->modeList['multi'] = 'Parallel'; +$lang->task->modeList['linear'] = 'Multiple Person Serial'; +$lang->task->modeList['multi'] = 'Multiple Person Parallel'; $lang->task->afterChoices['continueAdding'] = ' Continuer Ajouter Tâches'; $lang->task->afterChoices['toTaskList'] = 'Aller à la liste des Tâches'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 25d58abdbd..9e7904633c 100755 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -212,8 +212,8 @@ $lang->task->reasonList[''] = ''; $lang->task->reasonList['done'] = '已完成'; $lang->task->reasonList['cancel'] = '已取消'; -$lang->task->modeList['linear'] = '串行'; -$lang->task->modeList['multi'] = '并行'; +$lang->task->modeList['linear'] = '多人串行'; +$lang->task->modeList['multi'] = '多人并行'; $lang->task->afterChoices['continueAdding'] = "继续为该{$lang->SRCommon}添加任务"; $lang->task->afterChoices['toTaskList'] = '返回任务列表'; diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index 91b0a6d413..a3fb8a3d31 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -79,16 +79,13 @@ foreach(explode(',', $config->task->create->requiredFields) as $field) - - - - type == 'kanban'):?> From a46ddf8ee73ae7ee239990b34916aa4bf6d03161 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 12 Dec 2022 16:40:23 +0800 Subject: [PATCH 06/23] * Code for task#79663. --- module/productplan/lang/de.php | 1 + module/productplan/lang/en.php | 1 + module/productplan/lang/fr.php | 1 + module/productplan/lang/zh-cn.php | 1 + module/productplan/model.php | 38 ++++++++++++++++++++++++--- module/productplan/view/edit.html.php | 2 +- 6 files changed, 40 insertions(+), 4 deletions(-) diff --git a/module/productplan/lang/de.php b/module/productplan/lang/de.php index e418f42088..1e77f9e257 100644 --- a/module/productplan/lang/de.php +++ b/module/productplan/lang/de.php @@ -139,6 +139,7 @@ $lang->productplan->endLetterChildTip = "The completion date of the parent pl $lang->productplan->beginLetterParentTip = "The start date of the child plan[%s]: %s, cannot be less than the start date of the parent plan: %s."; $lang->productplan->endGreaterParentTip = "The completion date of the child plan[%s]: %s, cannot be greater than the completion date of the parent plan: %s."; $lang->productplan->diffBranchesTip = "The @branch@『%s』 of parent plan is not linked with the child plan. @branch@'s stories and bugs whill be removed from the plan. Do you want to save?"; +$lang->productplan->deleteBranchTip = "@branch@『%s』are linked with sub plans and cannot be modified."; $lang->productplan->featureBar['browse']['all'] = 'Alle'; $lang->productplan->featureBar['browse']['undone'] = 'Undone'; diff --git a/module/productplan/lang/en.php b/module/productplan/lang/en.php index 86a0808f04..65233b5eb2 100644 --- a/module/productplan/lang/en.php +++ b/module/productplan/lang/en.php @@ -139,6 +139,7 @@ $lang->productplan->endLetterChildTip = "The completion date of the parent pl $lang->productplan->beginLetterParentTip = "The start date of the child plan[%s]: %s, cannot be less than the start date of the parent plan: %s."; $lang->productplan->endGreaterParentTip = "The completion date of the child plan[%s]: %s, cannot be greater than the completion date of the parent plan: %s."; $lang->productplan->diffBranchesTip = "The @branch@『%s』of parent plan is not linked with the child plan. @branch@'s stories and bugs whill be removed from the plan. Do you want to save?"; +$lang->productplan->deleteBranchTip = "@branch@『%s』are linked with sub plans and cannot be modified."; $lang->productplan->featureBar['browse']['all'] = 'All'; $lang->productplan->featureBar['browse']['undone'] = 'Undone'; diff --git a/module/productplan/lang/fr.php b/module/productplan/lang/fr.php index ad1e414469..263bb511a7 100644 --- a/module/productplan/lang/fr.php +++ b/module/productplan/lang/fr.php @@ -139,6 +139,7 @@ $lang->productplan->endLetterChildTip = "The completion date of the parent pl $lang->productplan->beginLetterParentTip = "The start date of the child plan[%s]: %s, cannot be less than the start date of the parent plan: %s."; $lang->productplan->endGreaterParentTip = "The completion date of the child plan[%s]: %s, cannot be greater than the completion date of the parent plan: %s."; $lang->productplan->diffBranchesTip = "The @branch@『%s』of parent plan is not linked with the child plan. @branch@'s stories and bugs whill be removed from the plan. Do you want to save?"; +$lang->productplan->deleteBranchTip = "@branch@『%s』are linked with sub plans and cannot be modified."; $lang->productplan->featureBar['browse']['all'] = 'Tous'; $lang->productplan->featureBar['browse']['undone'] = 'Undone'; diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php index aee350b57a..b756ef52d2 100644 --- a/module/productplan/lang/zh-cn.php +++ b/module/productplan/lang/zh-cn.php @@ -139,6 +139,7 @@ $lang->productplan->endLetterChildTip = "父计划[%s]的完成日期:%s, $lang->productplan->beginLetterParentTip = "子计划[%s]的开始日期:%s,不能小于父计划的开始日期: %s"; $lang->productplan->endGreaterParentTip = "子计划[%s]的完成日期:%s,不能大于父计划的完成日期: %s"; $lang->productplan->diffBranchesTip = "父计划的@branch@『%s』未被子计划关联,对应@branch@的需求和bug将自动从计划中移除,是否保存?"; +$lang->productplan->deleteBranchTip = "@branch@『%s』被子计划关联,无法修改。"; $lang->productplan->featureBar['browse']['all'] = '全部'; $lang->productplan->featureBar['browse']['undone'] = '未完成'; diff --git a/module/productplan/model.php b/module/productplan/model.php index dbb8372e66..c063da4ec4 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -595,10 +595,42 @@ class productplanModel extends model ->get(); $product = $this->loadModel('product')->getByID($oldPlan->product); - if($product->type != 'normal' and $oldPlan->parent != -1 and !isset($_POST['branch'])) + if($product->type != 'normal') { - $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); - dao::$errors['branch'] = sprintf($this->lang->error->notempty, $this->lang->product->branch); + if(!isset($_POST['branch'])) + { + $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); + dao::$errors['branch'] = sprintf($this->lang->error->notempty, $this->lang->product->branch); + } + else + { + if($oldPlan->parent == -1) + { + /* Get branches of child plans. */ + $childBranches = array(); + $childPlans = $this->getChildren($oldPlan->id); + $branchPairs = $this->loadModel('branch')->getPairs($oldPlan->product); + foreach($childPlans as $children) + { + foreach(explode(',', $children->branch) as $childBranchID) $childBranches[$childBranchID] = $childBranchID; + } + + /* Get branches of parent plan that cannot delete. */ + $canDeleteBranch = true; + $deleteBranches = ''; + foreach(explode(',', $oldPlan->branch) as $oldBranchID) + { + if(strpos(",$plan->branch,", ",$oldBranchID,") === false and isset($childBranches[$oldBranchID])) + { + $canDeleteBranch = false; + if(isset($branchPairs[$oldBranchID])) $deleteBranches .= "{$branchPairs[$oldBranchID]},"; + } + } + + $this->lang->productplan->deleteBranchTip = str_replace('@branch@', $this->lang->product->branchName[$product->type], $this->lang->productplan->deleteBranchTip); + if(!$canDeleteBranch) dao::$errors[] = sprintf($this->lang->productplan->deleteBranchTip, trim($deleteBranches, ',')); + } + } } $parentPlan = $this->getByID($plan->parent); diff --git a/module/productplan/view/edit.html.php b/module/productplan/view/edit.html.php index 81ffe5e5b2..0f783196c1 100644 --- a/module/productplan/view/edit.html.php +++ b/module/productplan/view/edit.html.php @@ -40,7 +40,7 @@ - shadow and $product->type != 'normal' and $plan->parent != '-1'):?> + shadow and $product->type != 'normal'):?> From d2cb9938b5c3b50d7c868af3e7bd37f8cca83bd0 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Mon, 12 Dec 2022 17:34:43 +0800 Subject: [PATCH 07/23] * Finish Task #79670 --- module/execution/control.php | 12 ++++++++++++ module/execution/lang/de.php | 3 +++ module/execution/lang/en.php | 3 +++ module/execution/lang/fr.php | 3 +++ module/execution/lang/zh-cn.php | 3 +++ module/execution/view/story.html.php | 5 ++++- module/product/view/browse.html.php | 6 +++++- module/project/lang/de.php | 3 +++ module/project/lang/en.php | 3 +++ module/project/lang/fr.php | 3 +++ module/project/lang/zh-cn.php | 3 +++ 11 files changed, 45 insertions(+), 2 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 0e3a109c25..5379ec4ddb 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -934,6 +934,17 @@ class execution extends control $moduleTree = $this->tree->getProjectStoryTreeMenu($executionID, 0, array('treeModel', $createModuleLink)); } + $executionProductList = $this->loadModel('product')->getProducts($executionID); + $multiBranch = false; + foreach($executionProductList as $executionProduct) + { + if($executionProduct->type != 'normal') + { + $multiBranch = true; + break; + } + } + /* Assign. */ $this->view->title = $title; $this->view->position = $position; @@ -963,6 +974,7 @@ class execution extends control $this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable. $this->view->showBranch = $showBranch; $this->view->storyStages = $this->product->batchGetStoryStage($stories); + $this->view->multiBranch = $multiBranch; $this->display(); } diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index e325edbcdc..1aad7582a6 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -597,3 +597,6 @@ $lang->execution->gantt->exporting = 'Exporting...'; $lang->execution->gantt->exportFail = 'Failed to export.'; $lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761'); + +$lang->execution->linkBranchStoryByPlanTips = "When a scheduled association requirement is executed, only the active requirements associated with the %s of this execution are imported."; +$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated."; \ No newline at end of file diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index d273799d4b..412c0c9f74 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -597,3 +597,6 @@ $lang->execution->gantt->exporting = 'Exporting...'; $lang->execution->gantt->exportFail = 'Failed to export.'; $lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761'); + +$lang->execution->linkBranchStoryByPlanTips = "When a scheduled association requirement is executed, only the active requirements associated with the %s of this execution are imported."; +$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated."; \ No newline at end of file diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index a107beff48..4e87634ef9 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -597,3 +597,6 @@ $lang->execution->gantt->exporting = 'Exporting...'; $lang->execution->gantt->exportFail = 'Failed to export.'; $lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761'); + +$lang->execution->linkBranchStoryByPlanTips = "When a scheduled association requirement is executed, only the active requirements associated with the %s of this execution are imported."; +$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated."; \ No newline at end of file diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index decdee30da..2c93cb2e76 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -597,3 +597,6 @@ $lang->execution->gantt->exporting = '正在导出……'; $lang->execution->gantt->exportFail = '导出失败。'; $lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761'); + +$lang->execution->linkBranchStoryByPlanTips = "执行按计划关联需求时,只导入本执行所关联%s的激活状态的需求。"; +$lang->execution->linkNormalStoryByPlanTips = "执行按计划关联需求时,只导入激活状态的需求。"; \ No newline at end of file diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index 6ca7343939..bb35137bae 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -402,7 +402,10 @@ - + - - - - - - - - - + + + + + + + + + @@ -165,13 +165,13 @@ - + - - + + + - + - - + + + - - + @@ -447,12 +445,10 @@ - + - + + - + + + + team) and $task->mode == 'linear') ? "disabled='disabled'" : '';?> @@ -159,15 +153,13 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field) $taskMembers = $members; } ?> - - - - - - - ' id='teamTr'> - - + diff --git a/module/task/view/taskteam.html.php b/module/task/view/taskteam.html.php index 9a12387608..febf882d29 100644 --- a/module/task/view/taskteam.html.php +++ b/module/task/view/taskteam.html.php @@ -87,7 +87,7 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal - - - + + + From 8dc609e4a0d37e73a1ee0ec7f889cd56da0149cd Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 13 Dec 2022 14:15:39 +0800 Subject: [PATCH 15/23] * code task #79859,79858,79857,79856,79855,79854. --- module/build/css/view.css | 16 ++++++ module/build/view/view.html.php | 62 ++++++++++++------------ module/productplan/css/view.css | 2 +- module/projectrelease/css/view.css | 12 +++++ module/projectrelease/view/view.html.php | 54 ++++++++++----------- module/release/css/view.css | 12 +++++ module/release/view/view.html.php | 56 ++++++++++----------- 7 files changed, 126 insertions(+), 88 deletions(-) diff --git a/module/build/css/view.css b/module/build/css/view.css index 0789a2c0c3..baaa980afa 100644 --- a/module/build/css/view.css +++ b/module/build/css/view.css @@ -7,3 +7,19 @@ .body-modal #mainContent {min-height: 200px;} td.article-content{overflow:auto !important;} td.c-build{white-space: nowrap; overflow:hidden;} + +#stories th, #stories td{padding-left:16px;} +#stories .c-estimate{width:90px; text-align:right} +#stories .c-status{width:120px} +#stories .c-stage{width:130px; text-align:left;} +#bugs .c-status{width:100px;} +#bugs .c-build{width:160px; text-align:left} +#bugs .c-user{width:120px;} +#bugs .c-date{width:130px;} +#bugs .c-actions-1{width:60px;} +#generatedBugs .c-id {width:60px;} +#generatedBugs .c-severity {width:70px;} +#generatedBugs .c-status {width:100px;} +#generatedBugs .c-build {width:160px; text-align:left} +#generatedBugs .c-user {width:100px;} +#generatedBugs .c-date {width:120px;} diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index 036a9518f5..9ccf26e647 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -88,15 +88,15 @@ tbody tr td:first-child input {display: none;} idAB);?> - + + - - - - + + + @@ -125,11 +125,6 @@ tbody tr td:first-child input {display: none;} id);?> - + + - - - + + - + + - + - + @@ -254,7 +252,7 @@ tbody tr td:first-child input {display: none;} - + @@ -297,14 +295,14 @@ tbody tr td:first-child input {display: none;} id}&type=generatedBug&link=$link¶m=$param&orderBy=%s";?> - - - - - + + + + + - + @@ -324,6 +322,9 @@ tbody tr td:first-child input {display: none;} createLink('bug', 'view', "bugID=$bug->id", '', true);?> + - + diff --git a/module/productplan/css/view.css b/module/productplan/css/view.css index 64fc550a1c..b924713e90 100644 --- a/module/productplan/css/view.css +++ b/module/productplan/css/view.css @@ -34,5 +34,5 @@ ol, ul {padding-left: 20px;} #actionsBox a:last-of-type + .divider {display: none;} #actionsBox div.divider:first-child {display: none;} -#bugs th.c-pri, #bugs th.c-actions {width:72px !important;} +#bugs th.c-pri, #bugs th.c-actions {width:70px !important;} #bugs th.c-status, #bugs th.c-user {width:120px !important;} diff --git a/module/projectrelease/css/view.css b/module/projectrelease/css/view.css index a35a23f770..b229853430 100644 --- a/module/projectrelease/css/view.css +++ b/module/projectrelease/css/view.css @@ -10,3 +10,15 @@ ol, ul {padding-left: 20px;} .c-id {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} td.c-build{white-space: nowrap; overflow:hidden;} + +#stories th, #stories td{padding-left:16px;} +#stories .c-build{width:160px; text-align:left;} +#stories .c-status{width:120px;} +#stories .c-stage{width:130px; text-align:left;} +#stories .c-estimate{width:90px; text-align:right;} +#bugs .c-build{width:160px; text-align:left;} +#bugs .c-user{width:120px;} +#bugs .c-date{width:130px;} +#leftBugs .c-build{width:160px; text-align:left;} +#leftBugs .c-user{width:120px;} +#leftBugs .c-date{width:160px;} diff --git a/module/projectrelease/view/view.html.php b/module/projectrelease/view/view.html.php index d8c5b7d6cd..7475a422a2 100644 --- a/module/projectrelease/view/view.html.php +++ b/module/projectrelease/view/view.html.php @@ -60,7 +60,7 @@ ?> id}&type=story&link=$link¶m=$param&orderBy=%s";?> - + + - - - - - - + + + + + - + $story):?> createLink('story', 'view', "storyID=$story->id&version=0¶m={$this->session->project}", '', true);?> @@ -92,20 +92,20 @@ id);?> - - - - + - + + + + - - + + + - - - - + + + + @@ -259,13 +259,13 @@ idAB);?> + - - - - - - + + + + + id);?> + - id}&type=story&link=$link¶m=$param&orderBy=%s";?> - + + - - - - - - + + + + + - + $story):?> createLink('story', 'view', "storyID=$story->id", '', true);?> @@ -94,20 +94,20 @@ id);?> - - - - - + - + + + + - - + + + - - - - + + + + @@ -261,13 +261,13 @@ idAB);?> + - - - - - - + + + + + id);?> + - Date: Tue, 13 Dec 2022 15:19:54 +0800 Subject: [PATCH 16/23] * code for task #79852,79853. --- module/projectrelease/css/browse.css | 10 ++++++---- module/release/css/browse.css | 8 +++++--- module/release/view/browse.html.php | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/module/projectrelease/css/browse.css b/module/projectrelease/css/browse.css index f9c5e49f9e..a8711505bd 100644 --- a/module/projectrelease/css/browse.css +++ b/module/projectrelease/css/browse.css @@ -2,7 +2,9 @@ #releaseList tr:hover {background-color:unset;} td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.c-build {width: 300px;} -.c-branch {width: 200px;} -td.c-build {padding-left:8px !important;} -.c-product, .c-execution {width: 120px;} +#releaseList .c-id{width:60px;} +#releaseList .c-build,#releaseList .c-product{width:180px;} +#releaseList .c-branch {width: 120px;} +#releaseList .c-date {width: 120px;} +#releaseList td.c-build {padding-left:8px !important;} +#releaseList .c-execution {width: 120px;} diff --git a/module/release/css/browse.css b/module/release/css/browse.css index dd6d856b51..f3e6245b39 100644 --- a/module/release/css/browse.css +++ b/module/release/css/browse.css @@ -3,6 +3,8 @@ td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} #releaseList tbody>tr:hover{background-color: unset!important;} .main-table tbody>tr>td:first-child{padding: 2px 8px!important;} -.c-id {width: 60px} -.c-branch {width: 100px} -.c-project, c-build {width: 200px;} +#releaseList th, #releaseList td{padding-left:16px !important;} +#releaseList .c-id {width: 60px} +#releaseList .c-branch {width: 100px} +#releaseList .c-date {width: 160px} +#releaseList .c-project, #releaseList .c-build {width: 180px;} diff --git a/module/release/view/browse.html.php b/module/release/view/browse.html.php index 2f0fe5bf04..293bc3d711 100644 --- a/module/release/view/browse.html.php +++ b/module/release/view/browse.html.php @@ -87,7 +87,7 @@ ?> - - +
story->closedReason;?>
story->closeSyncTip;?>
+
+ + +
+
+
kanbancard->region;?> '') + $parentPlanPairs, $plan->parent, "class='form-control chosen'");?>
product->branch;?> branch, "class='form-control chosen' multiple");?> idAB);?> priAB);?> story->title);?> priAB);?> statusAB);?> @@ -139,15 +139,15 @@ productplan->updateOrder);?> priAB);?>story->module);?>story->title);?> openedByAB);?> assignedToAB);?> story->estimateAB);?> statusAB);?> story->stageAB);?> actions?>story->title);?>story->module);?>priAB);?>statusAB);?>openedByAB);?>assignedToAB);?>story->estimateAB);?>story->stageAB);?>actions?>
id);?> " title='story->priList, $story->pri);?>'>story->priList, $story->pri);?> parent > 0) echo "story->children}>{$lang->story->childrenAB}"; echo $story->title; ?> " title='story->priList, $story->pri);?>'>story->priList, $story->pri);?> processStatus('story', $story);?> @@ -186,22 +186,20 @@ " title='story->priList, $story->pri);?>'>story->priList, $story->pri);?>'>module, '');?> parent > 0) echo "story->children}>{$lang->story->childrenAB}"; echo html::a($viewLink , $story->title, '', "style='color: $story->color' data-app={$this->app->tab}"); ?> '>module, '');?>" title='story->priList, $story->pri);?>'>story->priList, $story->pri);?> + processStatus('story', $story);?> + openedBy);?> assignedTo);?> estimate . $config->hourUnit;?> - - processStatus('story', $story);?> - - story->stageList[$story->stage];?> idAB);?> - priAB);?> bug->title);?> priAB);?> bug->status);?> @@ -431,12 +429,12 @@ idAB);?> priAB);?>bug->title);?>bug->title);?>priAB);?>bug->status);?> openedByAB);?> bug->assignedToAB);?>bug->status);?> actions?> actions?>
id);?> bug->priList, $bug->pri);?> title?>bug->priList, $bug->pri);?> - - processStatus('bug', $bug);?> - + processStatus('bug', $bug);?> @@ -462,15 +458,13 @@ id);?> bug->priList, $bug->pri);?> createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '', "data-app={$this->app->tab}");?>bug->priList, $bug->pri);?> + processStatus('bug', $bug);?> + openedBy);?> assignedTo);?> - - processStatus('bug', $bug);?> - - Date: Tue, 13 Dec 2022 09:06:53 +0800 Subject: [PATCH 10/23] * Finish Task #79670 --- module/execution/css/story.css | 1 + module/product/css/browse.css | 1 + 2 files changed, 2 insertions(+) diff --git a/module/execution/css/story.css b/module/execution/css/story.css index e0333312b2..2eff8dd035 100644 --- a/module/execution/css/story.css +++ b/module/execution/css/story.css @@ -34,3 +34,4 @@ th.c-pri{width:50px;} .table td.c-estimate {padding-right: 12px;} .main-table tbody > tr.table-children > td:first-child::before {width: 3px;} .table-footer {z-index: 1;} +#linkStoryByPlan .modal-header {padding: 20px 0 10px 0; border-bottom: 0px} \ No newline at end of file diff --git a/module/product/css/browse.css b/module/product/css/browse.css index 686cbd21c5..75f034788f 100644 --- a/module/product/css/browse.css +++ b/module/product/css/browse.css @@ -41,3 +41,4 @@ a.removeModule:hover {color: red;} #productStoryForm tbody tr td .label {max-width: 100px; text-overflow: unset;} .c-span {margin-left: 19px;} .btn-toolbar #query span.text{overflow: hidden; width: 52px; vertical-align: middle; margin-right: 1px;} +#linkStoryByPlan .modal-header {padding: 20px 0 10px 0; border-bottom: 0px} \ No newline at end of file From 493910031a1bb05250feb981ccb754d90d47521d Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 13 Dec 2022 09:45:01 +0800 Subject: [PATCH 11/23] * Finish Task #79466 --- module/story/model.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index 4dcf38e19e..69212527d0 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2227,8 +2227,17 @@ class storyModel extends model if($planID == 0 and !empty($oldStory->plan) and isset($branchPlanPairs[0]) and $branchPlanPairs[0] != $planID) $unlinkPlans[$branchPlanPairs[0]] = empty($unlinkPlans[$branchPlanPairs[0]]) ? $storyID : "{$unlinkPlans[$branchPlanPairs[0]]},$storyID"; if($planID != 0) { - if(!empty($oldStory->plan) and isset($branchPlanPairs[$plan->branch]) and $branchPlanPairs[$plan->branch] != $planID) $unlinkPlans[$branchPlanPairs[$plan->branch]] = empty($unlinkPlans[$branchPlanPairs[$plan->branch]]) ? $storyID : "{$unlinkPlans[$branchPlanPairs[$plan->branch]]},$storyID"; - if(isset($branchPlanPairs[$plan->branch])) $branchPlanPairs[$plan->branch] = $planID; + if(!empty($oldStory->plan)) + { + foreach(explode(',', $plan->branch) as $planBranch) + { + if(isset($branchPlanPairs[$planBranch]) and $branchPlanPairs[$planBranch] != $planID) + { + $unlinkPlans[$branchPlanPairs[$planBranch]] = empty($unlinkPlans[$branchPlanPairs[$planBranch]]) ? $storyID : "{$unlinkPlans[$branchPlanPairs[$planBranch]]},$storyID"; + } + } + } + foreach(explode(',', $plan->branch) as $planBranch) if(isset($branchPlanPairs[$planBranch])) $branchPlanPairs[$planBranch] = $planID; $story->plan = $oldStory->plan ? implode(',', $branchPlanPairs) : $planID; $story->plan = trim($story->plan, ','); if($story->plan != $oldStory->plan and !empty($planID)) $link2Plans[$planID] = empty($link2Plans[$planID]) ? $storyID : "{$link2Plans[$planID]},$storyID"; From 68108737e6e0fe62d8d2d1691963cef4bb8bb35f Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 13 Dec 2022 02:18:30 +0000 Subject: [PATCH 12/23] * Fix bug for helper class not found. --- tools/minifyfront.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/minifyfront.php b/tools/minifyfront.php index 4809b6daab..d60dcd93f9 100644 --- a/tools/minifyfront.php +++ b/tools/minifyfront.php @@ -3,7 +3,9 @@ * This file is used to compress css and js files. */ -$baseDir = dirname(dirname(__FILE__)); +$baseDir = dirname(dirname(__FILE__)); +include $baseDir . '/framework/helper.class.php'; + //$miniCSSTool = getenv('MINIFY_CSS_PATH'); //$miniJSTool = getenv('MINIFY_JS_PATH'); $miniCSSTool = '/home/z/ci/minify/minifyCSS.php'; From 9013eda03bf18b1a5903ca78b2c5151c4f2590f0 Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 13 Dec 2022 02:35:04 +0000 Subject: [PATCH 13/23] * Add Sql column for zt_feedback #79661. --- db/update18.0.beta1.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/update18.0.beta1.sql b/db/update18.0.beta1.sql index 97c48d6ed5..038173600a 100644 --- a/db/update18.0.beta1.sql +++ b/db/update18.0.beta1.sql @@ -3,4 +3,4 @@ ALTER TABLE `zt_productplan` MODIFY COLUMN `branch` varchar(255) NOT NULL DEFAUL ALTER TABLE `zt_effort` ADD `extra` text COLLATE 'utf8_general_ci' NOT NULL AFTER `end`; ALTER TABLE `zt_build` MODIFY COLUMN `branch` varchar(255) NOT NULL DEFAULT '0'; ALTER TABLE `zt_feedback` ADD COLUMN `activatedBy` varchar(30) NOT NULL AFTER `assignedDate`; -ALTER TABLE `zt_feedback` ADD COLUMN `activatedDate` date NOT NULL AFTER `activatedBy`; +ALTER TABLE `zt_feedback` ADD COLUMN `activatedDate` datetime NOT NULL AFTER `activatedBy`; From 81d54c790e02a7861b7ccb5a0cd809d14037d202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Tue, 13 Dec 2022 13:43:12 +0800 Subject: [PATCH 14/23] * Finish task #79664. --- module/group/lang/resource.php | 2 +- module/task/js/edit.js | 28 +++++++++++++---- module/task/lang/de.php | 4 +++ module/task/lang/en.php | 4 +++ module/task/lang/zh-cn.php | 4 +++ module/task/model.php | 6 ++++ module/task/view/edit.html.php | 48 +++++++++++++----------------- module/task/view/taskteam.html.php | 4 +-- module/task/view/view.html.php | 6 ++-- 9 files changed, 67 insertions(+), 39 deletions(-) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 0f1bca679b..58c6ed239a 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -546,7 +546,7 @@ $lang->resource->story->batchChangeModule = 'batchChangeModule'; $lang->resource->story->batchToTask = 'batchToTask'; $lang->resource->story->processStoryChange = 'processStoryChange'; $lang->resource->story->linkStories = 'linkStoriesAB'; -$lang->resource->story->relieved = 'relievedSiblings'; +$lang->resource->story->relieved = 'relievedTwins'; $lang->story->methodOrder[5] = 'create'; $lang->story->methodOrder[10] = 'batchCreate'; diff --git a/module/task/js/edit.js b/module/task/js/edit.js index 940b5f3ae3..6d8da19d61 100644 --- a/module/task/js/edit.js +++ b/module/task/js/edit.js @@ -7,6 +7,25 @@ $(function() { $('#consumedSpan').parent().find('button').attr('disabled','disabled') } + + $('#mode').change(function() + { + var mode = $(this).val(); + if(mode != 'single') + { + $('#assignedTo').attr('disabled', 'disabled').trigger('chosen:updated') + $('.team-group').removeClass('hidden'); + $('#estimate').attr('disabled', 'disabled') + $('#left').attr('disabled', 'disabled') + } + else + { + $('#assignedTo').removeAttr('disabled').trigger('chosen:updated') + $('.team-group').addClass('hidden'); + $('#estimate').attr('disabled', false) + $('#left').attr('disabled', false) + } + }) }) /** @@ -118,7 +137,7 @@ $('#confirmButton').click(function() var $left = $tr.find('[name^=teamLeft]'); var left = parseFloat($left.val()); if(!isNaN(left)) totalLeft += left; - if(!$left.prop('readonly') && (isNaN(left) || left <= 0)) + if(!$left.prop('readonly') && (isNaN(left) || left <= 0) && team.length > 0) { bootbox.alert(account + ' ' + leftNotEmpty); error = true; @@ -165,12 +184,11 @@ $('#confirmButton').click(function() function updateAssignedTo() { var html = ''; - var multiple = $('#multiple').prop('checked'); + var mode = $('#mode').val(); var assignedTo = $('#assignedTo').val(); - if(multiple) + if(mode != 'single') { var isTeamMember = false; - var mode = $('#mode').val(); $('select[name^=team]').each(function() { if($(this).find('option:selected').text() == '') return; @@ -202,6 +220,6 @@ function updateAssignedTo() } $('#assignedTo').html(html); - if(multiple && mode == 'linear' && $('#modalTeam tr.member-doing').length == 0 && $('#modalTeam tr.member-wait').length >= 1) $('[name=assignedTo]').val($('#modalTeam tr.member-wait:first').find('select[name^=team]:first').val()); + if(mode != 'single' && mode == 'linear' && $('#modalTeam tr.member-doing').length == 0 && $('#modalTeam tr.member-wait').length >= 1) $('[name=assignedTo]').val($('#modalTeam tr.member-wait:first').find('select[name^=team]:first').val()); $('#assignedTo').trigger('chosen:updated'); } diff --git a/module/task/lang/de.php b/module/task/lang/de.php index 2aa3ae522e..b90beece49 100644 --- a/module/task/lang/de.php +++ b/module/task/lang/de.php @@ -215,6 +215,10 @@ $lang->task->reasonList['cancel'] = 'Abgebrochen'; $lang->task->modeList['linear'] = 'Multiple Person Serial'; $lang->task->modeList['multi'] = 'Multiple Person Parallel'; +$lang->task->editModeList['single'] = 'Single'; +$lang->task->editModeList['linear'] = 'Serial'; +$lang->task->editModeList['multi'] = 'Parallel'; + $lang->task->afterChoices['continueAdding'] = ' Weitere Aufgaben erfassen'; $lang->task->afterChoices['toTaskList'] = 'Zurück zur Aufgabenliste'; $lang->task->afterChoices['toStoryList'] = 'Zurück zur Storyliste'; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index 9abac62024..37b9b265b2 100755 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -215,6 +215,10 @@ $lang->task->reasonList['cancel'] = 'Cancelled'; $lang->task->modeList['linear'] = 'Multiple Person Serial'; $lang->task->modeList['multi'] = 'Multiple Person Parallel'; +$lang->task->editModeList['single'] = 'Single'; +$lang->task->editModeList['linear'] = 'Serial'; +$lang->task->editModeList['multi'] = 'Parallel'; + $lang->task->afterChoices['continueAdding'] = ' Continue Adding Tasks'; $lang->task->afterChoices['toTaskList'] = 'Go to Task List'; $lang->task->afterChoices['toStoryList'] = 'Go to Story List'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 9e7904633c..22aaeae7b2 100755 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -215,6 +215,10 @@ $lang->task->reasonList['cancel'] = '已取消'; $lang->task->modeList['linear'] = '多人串行'; $lang->task->modeList['multi'] = '多人并行'; +$lang->task->editModeList['single'] = '单人任务'; +$lang->task->editModeList['linear'] = '多人串行'; +$lang->task->editModeList['multi'] = '多人并行'; + $lang->task->afterChoices['continueAdding'] = "继续为该{$lang->SRCommon}添加任务"; $lang->task->afterChoices['toTaskList'] = '返回任务列表'; $lang->task->afterChoices['toStoryList'] = "返回{$lang->SRCommon}列表"; diff --git a/module/task/model.php b/module/task/model.php index beca5c1bb5..7879e5689f 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -1094,6 +1094,7 @@ class taskModel extends model ->setIF(strpos($this->config->task->edit->requiredFields, 'story') !== false, 'story', $this->post->story) ->setIF($this->post->story != false and $this->post->story != $oldTask->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story)) + ->setIF($this->post->mode == 'single', 'mode', '') ->setIF($this->post->status == 'done', 'left', 0) ->setIF($this->post->status == 'done' and !$this->post->finishedBy, 'finishedBy', $this->app->user->account) ->setIF($this->post->status == 'done' and !$this->post->finishedDate, 'finishedDate', $now) @@ -1193,6 +1194,11 @@ class taskModel extends model $this->dao->update(TABLE_TASK)->set('designVersion')->eq($design->version)->where('id')->eq($taskID)->exec(); } + if($_POST['mode'] == 'single') + { + $this->dao->delete()->from(TABLE_TASKTEAM)->where('task')->eq($taskID)->exec(); + } + /* Record task version. */ if(isset($task->version) and $task->version > $oldTask->version) { diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php index be0c12c53d..111d1e2a6c 100644 --- a/module/task/view/edit.html.php +++ b/module/task/view/edit.html.php @@ -22,8 +22,8 @@ user->account);?> members);?> + task->confirmChangeExecution);?> - task->error->teamMember);?> lang->task->error->leftEmptyAB, $this->lang->task->statusList[$task->status]));?> error->gt, $lang->task->estimate, '0'))?> @@ -52,25 +52,15 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
task->name;?>
-
'> -
-
- - - -
- name, 'class="form-control task-name" placeholder="' . $lang->task->name . '"');?> +
+
+ + +
- children) and empty($task->parent) and $task->type != 'affair'):?> - -
- team) ? '' : 'checked';?> /> - -
-
- + name, 'class="form-control task-name" placeholder="' . $lang->task->name . '"');?>
@@ -140,6 +130,10 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
parent, "class='form-control chosen'");?>
task->mode;?>status == 'wait' ? html::select('mode', $lang->task->editModeList, $task->mode, "class='form-control chosen'") : zget($lang->task->editModeList, $task->mode);?>
task->assignedTo;?> assignedTo, "class='form-control chosen' {$disableAssignedTo}");?>
task->mode;?>task->modeList, $task->mode) . html::hidden('mode', $task->mode);?>
task->team;?>task->team, '', "class='form-control btn' data-toggle='modal'");?> +
+ mode != '' ? '' : 'hidden';?> + assignedTo, "class='form-control chosen' {$disableAssignedTo}");?> + task->team;?> +
+
task->type;?> - task->assignedTo}'")?> + assignedTo) ? $task->assignedTo : '', "class='form-control chosen' data-placeholder='{$lang->task->assignedTo}'")?> @@ -341,7 +341,7 @@ $(document).ready(function() $(this).find('option:disabled').removeAttr('disabled').trigger("chosen:updated"); }) } - if($('#teamMember').val() != '') $taskTeamEditor.find('tfoot .btn').click(); + if($('#teamMember').val() != '' && page != 'edit') $taskTeamEditor.find('tfoot .btn').click(); }) }); diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index ef1ae75c0c..c032457253 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -339,9 +339,9 @@
task->team?>task->estimate?>task->consumed?>task->left?>task->estimateAB?>task->consumedAB?>task->leftAB?> statusAB;?>
pri;?>>priAB);?> story->title);?>pri;?>>priAB);?>statusAB);?> build->linkedBuild;?> openedByAB);?>story->estimateAB);?>statusAB);?>story->stageAB);?> openedByAB);?> story->estimateAB);?> story->stageAB);?> actions?>
- pri):?> - story->priList, $story->pri, $story->pri);?> - - parent > 0) echo "{$lang->story->childrenAB}"; @@ -147,17 +142,20 @@ tbody tr td:first-child input {display: none;} } ?> + pri):?> + story->priList, $story->pri, $story->pri);?> + + + processStatus('story', $story);?> + openedBy);?>estimate . $config->hourUnit;?> - - processStatus('story', $story);?> - - story->stageList[$story->stage];?>estimate . $config->hourUnit;?>story->stageList[$story->stage];?> idAB);?> - bug->title);?> bug->status);?>bug->title);?> bug->status);?> build->linkedBuild?>build->linkedBuild?> openedByAB);?> bug->openedDateAB);?> bug->resolvedByAB);?> bug->resolvedBy);?> bug->resolvedDateAB);?> actions?>
openedBy);?> openedDate) ? '' : substr($bug->openedDate, 5, 11);?>
idAB);?>bug->severity;?>>bug->severityAB);?>bug->title);?> bug->status);?>bug->openedBuild;?>idAB);?>bug->title);?>bug->severity;?>>bug->severityAB);?> bug->status);?> bug->openedBuild;?> openedByAB);?> bug->openedDateAB);?> bug->resolvedByAB);?> bug->resolvedBy);?> bug->resolvedDateAB);?>
id);?> + title, '', isonlybody() ? "data-width='1000'" : "class='iframe' data-width='1000'");?> + bug->severityList, $bug->severity, $bug->severity);?> @@ -331,9 +332,6 @@ tbody tr td:first-child input {display: none;} - title, '', isonlybody() ? "data-width='1000'" : "class='iframe' data-width='1000'");?> - processStatus('bug', $bug);?> @@ -343,7 +341,7 @@ tbody tr td:first-child input {display: none;} $openedBuilds = ''; foreach(explode(',', $bug->openedBuild) as $buildID) $openedBuilds .= ($buildID == 'trunk' ? 'Trunk' : zget($buildPairs, $buildID, '')) . ' '; ?> - openedBy);?> openedDate) ? '' : substr($bug->openedDate, 5, 11);?> resolvedBy);?>
@@ -69,17 +69,17 @@ idAB);?>
story->title);?> priAB);?>story->title);?>build->linkedBuild;?> openedByAB);?>story->estimateAB);?> statusAB);?>story->stageAB);?> statusAB);?> build->linkedBuild;?> openedByAB);?> story->estimateAB);?> story->stageAB);?> actions?>
pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> parent > 0) echo "{$lang->story->childrenAB}"; echo html::a($storyLink,$story->title, '', "class='preview'"); ?> buildName?>openedBy);?>estimate . $config->hourUnit;?>pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> processStatus('story', $story);?> story->stageList[$story->stage];?>buildName?>openedBy);?>estimate . $config->hourUnit;?>story->stageList[$story->stage];?> idAB);?> - bug->title);?> bug->status);?>bug->resolvedBuild;?>bug->title);?> bug->status);?> bug->resolvedBuild;?> openedByAB);?> bug->openedDateAB);?> bug->resolvedByAB);?> bug->resolvedDateAB);?> actions;?> bug->openedDateAB);?> bug->resolvedBy);?> bug->resolvedDateAB);?> actions;?>
bug->title);?> bug->severity;?>>bug->severityAB);?> bug->title);?> bug->status);?>bug->openedBuild;?> openedByAB);?> bug->openedDateAB);?> actions;?>bug->status);?>bug->openedBuild;?> openedByAB);?> bug->openedDateAB);?> actions;?>
title, '', "class='preview'");?> ' title='bug->severityList, $bug->severity);?>' data-severity='severity;?>'>bug->severityList, $bug->severity, $bug->severity);?> @@ -299,7 +300,6 @@ title, '', "class='preview'");?> processStatus('bug', $bug);?>
@@ -71,17 +71,17 @@ idAB);?>
story->title);?> pri;?>>priAB);?>story->title);?>build->linkedBuild;?> openedByAB);?>story->estimateAB);?> statusAB);?>story->stageAB);?> statusAB);?> build->linkedBuild;?> openedByAB);?> story->estimateAB);?> story->stageAB);?> actions?>
pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> parent > 0) echo "{$lang->story->childrenAB}"; echo html::a($storyLink,$story->title, '', "class='preview'"); ?> buildName?>openedBy);?>estimate . $config->hourUnit;?> + pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> processStatus('story', $story);?> story->stageList[$story->stage];?>buildName?>openedBy);?>estimate . $config->hourUnit;?>story->stageList[$story->stage];?> idAB);?> - bug->title);?> bug->status);?>bug->resolvedBuild;?>bug->title);?> bug->status);?> bug->resolvedBuild;?> openedByAB);?> bug->openedDateAB);?> bug->resolvedByAB);?> bug->resolvedDateAB);?> actions;?> bug->openedDateAB);?> bug->resolvedBy);?> bug->resolvedDateAB);?> actions;?>
bug->title);?> bug->severity;?>>bug->severityAB);?> bug->title);?> bug->status);?>bug->openedBuild;?> openedByAB);?> bug->openedDateAB);?> actions;?>bug->status);?>bug->openedBuild;?> openedByAB);?>bug->openedDateAB);?> actions;?>
title, '', "class='preview'");?> ' title='bug->severityList, $bug->severity);?>' data-severity='severity;?>'>bug->severityList, $bug->severity, $bug->severity);?> @@ -301,7 +302,6 @@ title, '', "class='preview'");?> processStatus('bug', $bug);?> + '> type != 'normal'):?> branchName;?> From 55c79e03997689e4d50096428939691ebc537cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Tue, 13 Dec 2022 15:19:49 +0800 Subject: [PATCH 17/23] * Code for task #79664. --- module/task/js/edit.js | 10 +++++++++- module/task/view/taskteam.html.php | 3 +-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/module/task/js/edit.js b/module/task/js/edit.js index 6d8da19d61..fdac4a8933 100644 --- a/module/task/js/edit.js +++ b/module/task/js/edit.js @@ -13,7 +13,15 @@ $(function() var mode = $(this).val(); if(mode != 'single') { - $('#assignedTo').attr('disabled', 'disabled').trigger('chosen:updated') + if(mode != 'multi') + { + $('#assignedTo').attr('disabled', 'disabled').trigger('chosen:updated') + } + else + { + $('#assignedTo').removeAttr('disabled').trigger('chosen:updated') + } + $('.team-group').removeClass('hidden'); $('#estimate').attr('disabled', 'disabled') $('#left').attr('disabled', 'disabled') diff --git a/module/task/view/taskteam.html.php b/module/task/view/taskteam.html.php index febf882d29..0074a5411c 100644 --- a/module/task/view/taskteam.html.php +++ b/module/task/view/taskteam.html.php @@ -8,7 +8,6 @@ rawMethod != 'create'):?> rawMethod == 'assignto'):?> @@ -87,7 +86,7 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal - assignedTo) ? $task->assignedTo : '', "class='form-control chosen' data-placeholder='{$lang->task->assignedTo}'")?> + task->assignedTo}'")?> From cb87d73f59916840e5a6438dc100fae4667df115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E7=9D=BF=20=E6=9D=8E?= Date: Tue, 13 Dec 2022 07:26:56 +0000 Subject: [PATCH 18/23] * remove ping from user update. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 9f8a28d0a1..cc8fefd074 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,7 @@ zentaoxx: sed -i "s/\$$super = \$$this->dao->select('admin')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('admin');/\$$account = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('account');\n\$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$adminArray = explode(',', \$$admins);\n\$$super = in_array(\$$account, \$$adminArray) ? 'super' : '';/g" zentaoxx/extension/xuan/im/control.php sed -i "/foreach(\$$users as \$$user)/i \$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\$$adminArray = explode(',', \$$admins);" zentaoxx/extension/xuan/im/model/user.php sed -i "/if(\!isset(\$$user->signed)) \$$user->signed = 0;/a \$$user->admin = in_array(\$$user->account, \$$adminArray) ? 'super' : '';" zentaoxx/extension/xuan/im/model/user.php + sed -i "/updateUser->ping/d" zentaoxx/extension/xuan/im/model/user.php sed -i "s/\$$user = \$$this->user->login(\$$account, \$$user->password);/\$$user = \$$this->user->login(\$$user);\n\$$url .= \$$this->config->requestType == 'GET' ? '\&' : '?';\n\$$url .= \"{\$$this->config->sessionVar}={\$$this->app->sessionID}\";\n/" zentaoxx/extension/xuan/im/control.php sed -i "s/\$$file->fullURL/\$$file->webPath/" zentaoxx/extension/xuan/im/control.php sed -i 's/XXBVERSION/$(XVERSION)/g' zentaoxx/config/ext/_0_xuanxuan.php From 0beb81ebd7b0ffeaeca7b5655b192a0ad74a4e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Tue, 13 Dec 2022 16:15:07 +0800 Subject: [PATCH 19/23] * Fix multi task bug. --- module/task/model.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/task/model.php b/module/task/model.php index 7879e5689f..7998e7535d 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -153,7 +153,12 @@ class taskModel extends model $requiredFields = trim($requiredFields, ','); /* Fix Bug #2466 */ - if($this->post->multiple) $task->assignedTo = ''; + if($this->post->multiple) $task->assignedTo = ''; + if($task->mode == 'multi') + { + $task->assignedTo = isset($_POST['team'][0]) ? $_POST['team'][0] : ''; + $task->assignedDate = helper::now(); + } if(!$this->post->multiple or count(array_filter($this->post->team)) < 1) $task->mode = ''; $this->dao->insert(TABLE_TASK)->data($task, $skip = 'gitlab,gitlabProject') ->autoCheck() From 5c2ed30fd3ff104aac5c69c6c17b3c0dfda93120 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 13 Dec 2022 16:42:17 +0800 Subject: [PATCH 20/23] * Fix bug of task#79663. --- module/productplan/js/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/productplan/js/edit.js b/module/productplan/js/edit.js index 9d3733f176..4d4a4db832 100644 --- a/module/productplan/js/edit.js +++ b/module/productplan/js/edit.js @@ -88,7 +88,7 @@ $('#submit').click(function() { var parentPlan = $('#parent').val(); var branches = $('#branch').val(); - if(parentPlan != 0 && branches) + if(parentPlan > 0 && branches) { link = createLink('productplan', 'ajaxGetDiffBranchesTip', "produtID=" + productID + "&parentID=" + parentPlan + "&branches=" + branches.toString()); $.post(link, function(diffBranchesTip) From 54a12ea735231e4d374dae0e3953f44a9a9881aa Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 13 Dec 2022 16:44:33 +0800 Subject: [PATCH 21/23] * Fix bug of task#79663. --- module/productplan/js/create.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/productplan/js/create.js b/module/productplan/js/create.js index dc43f76277..b7c4c8ae53 100644 --- a/module/productplan/js/create.js +++ b/module/productplan/js/create.js @@ -97,7 +97,7 @@ $('#submit').click(function() { var parentPlan = $('#parent').val(); var branches = $('#branch').val(); - if(parentPlan != 0 && branches) + if(parentPlan > 0 && branches) { link = createLink('productplan', 'ajaxGetDiffBranchesTip', "produtID=" + productID + "&parentID=" + parentPlan + "&branches=" + branches.toString()); $.post(link, function(diffBranchesTip) From 4ca4c4ccdb526243d1d1a554d9eee933a1b443c8 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 13 Dec 2022 17:06:14 +0800 Subject: [PATCH 22/23] * fix bug #30748. --- module/bug/control.php | 4 ++-- module/bug/js/browse.js | 2 +- module/bug/js/common.js | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 96ea49c4bf..a4b7127e33 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1801,7 +1801,7 @@ class bug extends control } else { - return print(js::closeModal('parent.parent')); + return print(js::closeModal('parent.parent', 'this', "typeof(parent.parent.setTitleWidth) == 'function' ? parent.parent.setTitleWidth() : parent.parent.location.reload()")); } } if(defined('RUN_MODE') && RUN_MODE == 'api') @@ -1988,7 +1988,7 @@ class bug extends control } else { - return print(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}")); + return print(js::closeModal('parent.parent', 'this', "typeof(parent.parent.setTitleWidth) == 'function' ? parent.parent.setTitleWidth() : parent.parent.location.reload()")); } } if(defined('RUN_MODE') && RUN_MODE == 'api') diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js index 0cc3ce246d..5c32f9e35b 100644 --- a/module/bug/js/browse.js +++ b/module/bug/js/browse.js @@ -1,6 +1,6 @@ $(function() { - if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150); + setTitleWidth(); /* The display of the adjusting sidebarHeader is synchronized with the sidebar. */ $(".sidebar-toggle").click(function() diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 7134ecab5b..81920153b2 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -985,3 +985,20 @@ function setBranchRelated(branchID, productID, num) $.ajaxSettings.async = true; } } + +/** + * Set title field width. + * + * @access public + * @return void + */ +function setTitleWidth() +{ + if(window.config.currentMethod != 'browse') return false; + + if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150); + setTimeout(function() + { + if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150); + }, 400) +} From 455e7af0da37bb94571380f4904cd3c7fee221d5 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 13 Dec 2022 17:08:30 +0800 Subject: [PATCH 23/23] * Code for task#79672. --- module/story/control.php | 3 +++ module/story/view/batchclose.html.php | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/module/story/control.php b/module/story/control.php index 4be4b39317..fd1e67ff0c 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -1906,10 +1906,12 @@ class story extends control $productStoryList = array(); $productList = array(); $ignoreTwins = array(); + $twinsCount = 0; foreach($stories as $story) { if(!empty($ignoreTwins) and isset($ignoreTwins[$story->id])) { + $twinsCount ++; unset($stories[$story->id]); continue; } @@ -2019,6 +2021,7 @@ class story extends control $this->view->storyType = $storyType; $this->view->reasonList = $this->lang->story->reasonList; $this->view->productStoryList = $productStoryList; + $this->view->twinsCount = $twinsCount; $this->display(); } diff --git a/module/story/view/batchclose.html.php b/module/story/view/batchclose.html.php index 21cf183703..41148cf959 100755 --- a/module/story/view/batchclose.html.php +++ b/module/story/view/batchclose.html.php @@ -34,7 +34,12 @@ $story):?>
title;?> + title;?> + twins)):?> + story->twins}:"?> + + processStatus('story', $story);?> status == 'draft') unset($reasonList['cancel']);?>