From b6cd8c99a442947bdc530e30b9bec5fe98d358fe Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Wed, 12 Aug 2020 08:14:44 +0800 Subject: [PATCH 01/24] * Fix bug #2589. --- module/story/model.php | 1 + module/story/view/batchcreate.html.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/module/story/model.php b/module/story/model.php index 72dc3c455d..026deba7b6 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -331,6 +331,7 @@ class storyModel extends model $story->estimate = $stories->estimate[$i]; $story->status = ($stories->needReview[$i] == 0 and !$forceReview) ? 'active' : 'draft'; $story->keywords = $stories->keywords[$i]; + $story->sourceNote = $stories->sourceNote[$i]; $story->product = $productID; $story->openedBy = $this->app->user->account; $story->openedDate = $now; diff --git a/module/story/view/batchcreate.html.php b/module/story/view/batchcreate.html.php index afd3af2f0f..6873976817 100644 --- a/module/story/view/batchcreate.html.php +++ b/module/story/view/batchcreate.html.php @@ -51,6 +51,7 @@ story->title;?> '>story->spec;?> '>story->source;?> + '>story->sourceNote;?> '>story->verify;?> '>story->pri;?> '>story->estimate;?> @@ -87,6 +88,7 @@ '> '> + '> '> ' style='overflow:visible'> '> From 29a2c25ef190905f1f7d48855ffc284b54084ac9 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Wed, 12 Aug 2020 08:15:40 +0800 Subject: [PATCH 02/24] * Fix bug #3334. --- module/task/js/start.js | 10 ++++++++-- module/task/lang/de.php | 1 + module/task/lang/en.php | 1 + module/task/lang/fr.php | 1 + module/task/lang/vi.php | 1 + module/task/lang/zh-cn.php | 1 + module/task/lang/zh-tw.php | 1 + module/task/model.php | 5 +++++ module/task/view/start.html.php | 1 + 9 files changed, 20 insertions(+), 2 deletions(-) diff --git a/module/task/js/start.js b/module/task/js/start.js index 42d34541d7..593b56c216 100644 --- a/module/task/js/start.js +++ b/module/task/js/start.js @@ -1,9 +1,15 @@ /* If left = 0, warning. */ function checkLeft() { - var value = $("#left").val(); - if(isNaN(parseFloat(value)) || value == 0) + var left = $("#left").val(); + var consumed = $("#consumed").val(); + if(isNaN(parseFloat(left)) || left == 0) { + if(isNaN(parseFloat(consumed)) || consumed == 0) + { + alert(noticeTaskStart); + return false; + } var result = confirm(confirmFinish); if(!result) setTimeout(function() {$.enableForm()}, 500); return result; diff --git a/module/task/lang/de.php b/module/task/lang/de.php index e1acf374d2..eb2d6feac7 100644 --- a/module/task/lang/de.php +++ b/module/task/lang/de.php @@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "Wenn Sie {$lang->projectCommon} ändern, d $lang->task->confirmFinish = '"Reststunden " sind 0. Möchten Sue den Status auf Erledigt setzen?'; $lang->task->confirmRecord = '"Reststunden " sind 0. Möchten Sie den Task auf Erledigt setzen?'; $lang->task->confirmTransfer = '"Reststunden " sind 0. Möchten Sie den Task transferieren?'; +$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; $lang->task->noticeLinkStory = "Es wurde keine Story verknüpft. Sie können %s für dieses Projekt, anschließend %s."; $lang->task->noticeSaveRecord = 'Ihre Stunden wurden nicht gespeichrt. Bitte erst speichern.'; $lang->task->commentActions = '%s. %s, kommentiert von %s.'; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index cf2e440eb3..e05b6ba8c9 100644 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "If you change {$lang->projectCommon}, Modu $lang->task->confirmFinish = '"Left Hour" is 0. Do you want to change the status to "Finished"?'; $lang->task->confirmRecord = '"Left Hour" is 0. Do you want to set the task as "Finished"?'; $lang->task->confirmTransfer = '"Left Hour" is 0,Do you want to transfer task?'; +$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; $lang->task->noticeLinkStory = "No story has been linked. You can %s for this project, then %s."; $lang->task->noticeSaveRecord = 'Your Hour is not saved. Please save it first.'; $lang->task->commentActions = '%s. %s, commented by %s.'; diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php index d0057e06bb..d57e19697b 100644 --- a/module/task/lang/fr.php +++ b/module/task/lang/fr.php @@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "Si vous changez {$lang->projectCommon}, Mo $lang->task->confirmFinish = '"Heures Restantes" à 0. Voulez-vous passer le statut à "Terminée" ?'; $lang->task->confirmRecord = '"Heures Restantes" à 0. Voulez-vous passer le statut de la tâche à "Finie" ?'; $lang->task->confirmTransfer = '"Heures Restantes" à 0. Voulez-vous transférer la tâche ?'; +$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; $lang->task->noticeLinkStory = "Aucune Story n'est associée. Vous pouvez %s pour ce projet, alors %s."; $lang->task->noticeSaveRecord = "Votre temps n'a pas été sauvé. Enregistrez-le d'abord."; $lang->task->commentActions = '%s. %s, commenté par %s.'; diff --git a/module/task/lang/vi.php b/module/task/lang/vi.php index 3ec8195ed0..f1ed21861e 100644 --- a/module/task/lang/vi.php +++ b/module/task/lang/vi.php @@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "Nếu bạn thay đổi {$lang->projectCom $lang->task->confirmFinish = '"Còn lại" bằng 0. Bạn có muốn thay đổi tình trạng thành "Kết thúc"?'; $lang->task->confirmRecord = '"Còn lại" bằng 0. Bạn có muốn thiết lập nhiệm vụ thành "Kết thúc"?'; $lang->task->confirmTransfer = '"Còn lại" bằng 0,Bạn có muốn chuyển thành nhiệm vụ?'; +$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; $lang->task->noticeLinkStory = "Không có câu chuyện liên kết. Bạn có thể %s cho dự án này, sau đó %s."; $lang->task->noticeSaveRecord = 'Số giờ làm của bạn chưa được lưu. Vui lòng lưu nó trước.'; $lang->task->commentActions = '%s. %s, nhận xét bởi %s.'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 6d71b4beaa..e8c8ad037a 100644 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "修改{$lang->projectCommon}会导致相 $lang->task->confirmFinish = '"预计剩余"为0,确认将任务状态改为"已完成"吗?'; $lang->task->confirmRecord = '"剩余"为0,任务将标记为"已完成",您确定吗?'; $lang->task->confirmTransfer = '"当前剩余"为0,任务将被转交,您确定吗?'; +$lang->task->noticeTaskStart = '"总计消耗"和"预计剩余"不能同时为0'; $lang->task->noticeLinkStory = "没有可关联的相关{$lang->storyCommon},您可以为当前项目%s,然后%s"; $lang->task->noticeSaveRecord = '您有尚未保存的工时记录,请先将其保存。'; $lang->task->commentActions = '%s. %s, 由 %s 添加备注。'; diff --git a/module/task/lang/zh-tw.php b/module/task/lang/zh-tw.php index b5495015a7..fe9e48300a 100644 --- a/module/task/lang/zh-tw.php +++ b/module/task/lang/zh-tw.php @@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "修改{$lang->projectCommon}會導致相 $lang->task->confirmFinish = '"預計剩餘"為0,確認將任務狀態改為"已完成"嗎?'; $lang->task->confirmRecord = '"剩餘"為0,任務將標記為"已完成",您確定嗎?'; $lang->task->confirmTransfer = '"當前剩餘"為0,任務將被轉交,您確定嗎?'; +$lang->task->noticeTaskStart = '"總計消耗"和"預計剩餘"不能同時為0'; $lang->task->noticeLinkStory = "沒有可關聯的相關{$lang->storyCommon},您可以為當前項目%s,然後%s"; $lang->task->noticeSaveRecord = '您有尚未保存的工時記錄,請先將其保存。'; $lang->task->commentActions = '%s. %s, 由 %s 添加備註。'; diff --git a/module/task/model.php b/module/task/model.php index ada7448de2..2d061549de 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1232,6 +1232,11 @@ class taskModel extends model if($this->post->left == 0) { + if($task->consumed == 0) + { + dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->task->consumed); + return false; + } $task->status = 'done'; $task->finishedBy = $this->app->user->account; $task->finishedDate = helper::now(); diff --git a/module/task/view/start.html.php b/module/task/view/start.html.php index 78ed65c9ec..e5113e1237 100644 --- a/module/task/view/start.html.php +++ b/module/task/view/start.html.php @@ -14,6 +14,7 @@ task->confirmFinish);?> +task->noticeTaskStart);?>
Date: Wed, 12 Aug 2020 10:17:41 +0800 Subject: [PATCH 03/24] Fix bug #2585 --- module/task/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/control.php b/module/task/control.php index 2856f0b1f4..3af0829586 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -622,7 +622,7 @@ class task extends control } else { - $story = $this->story->getById($task->story); + $story = $this->story->getById($task->story, $task->storyVersion); $task->storySpec = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->spec); $task->storyVerify = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->verify); $task->storyFiles = $this->loadModel('file')->getByObject('story', $task->story); From d83123f10e97dd3ab8e3bf006467f40fab45bdd1 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Thu, 13 Aug 2020 09:30:00 +0800 Subject: [PATCH 04/24] * Delete unuse file. --- db/update12.4.1.sql | 1 - 1 file changed, 1 deletion(-) delete mode 100644 db/update12.4.1.sql diff --git a/db/update12.4.1.sql b/db/update12.4.1.sql deleted file mode 100644 index 3f6ade7a75..0000000000 --- a/db/update12.4.1.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `zt_user` ADD `type` char(30) NOT NULL AFTER `account`; From f3c3ad36477134276b29bf6a8ea141202656829e Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Thu, 13 Aug 2020 09:35:22 +0800 Subject: [PATCH 05/24] * Fix bug #2577. --- module/task/view/batchedit.html.php | 2 +- module/task/view/edit.html.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/task/view/batchedit.html.php b/module/task/view/batchedit.html.php index 8e70dd22e9..9bc469e2ad 100755 --- a/module/task/view/batchedit.html.php +++ b/module/task/view/batchedit.html.php @@ -88,7 +88,7 @@ ?> assignedTo != $this->app->user->account) ? "disabled='disabled'" : '';?> - + parent < 0) ? "disabled='disabled'" : '';?> task->estimate;?> - team) ? "disabled='disabled'" : '';?> + team) or $task->parent < 0) ? "disabled='disabled'" : '';?> estimate, "class='form-control' {$disabled}");?> @@ -193,7 +193,7 @@ task->left;?> - team) ? "disabled='disabled'" : '';?> + team) or $task->parent < 0) ? "disabled='disabled'" : '';?> left, "class='form-control' {$disabled}");?> From 595e3e35c4197313c79c4b89dd5b805bb427741b Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Thu, 13 Aug 2020 09:38:57 +0800 Subject: [PATCH 06/24] * Fix bug #2573. --- module/bug/model.php | 2 +- module/bug/view/browse.html.php | 37 ++++++++++++++++++--------- module/caselib/view/browse.html.php | 4 ++- module/my/view/bug.html.php | 22 ++++++++++------ module/my/view/story.html.php | 20 +++++++++------ module/my/view/todo.html.php | 21 +++++++++------ module/product/view/browse.html.php | 29 ++++++++++++++------- module/productplan/view/view.html.php | 2 +- module/project/view/all.html.php | 4 ++- module/project/view/story.html.php | 14 ++++++---- module/project/view/task.html.php | 19 ++++++++------ module/release/view/view.html.php | 11 +++++--- module/story/model.php | 20 ++++++++++++++- module/task/model.php | 4 +-- module/testcase/model.php | 18 ++++++++++++- module/testcase/view/browse.html.php | 25 +++++++++++++----- module/testtask/model.php | 16 +++++++++++- module/testtask/view/cases.html.php | 7 ++--- 18 files changed, 194 insertions(+), 81 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 18fe679913..0d83189197 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2494,7 +2494,7 @@ class bugModel extends model $canBatchResolve = common::hasPriv('bug', 'batchResolve'); $canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo'); - $canBatchAction = $canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo; + $canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo); $canView = common::hasPriv('bug', 'view'); diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 7697d91a08..ef3c1b5ab0 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -206,6 +206,17 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow $setting = $this->datatable->getSetting('bug'); $widths = $this->datatable->setFixedFieldWidth($setting); $columns = 0; + + $canBatchEdit = common::hasPriv('bug', 'batchEdit'); + $canBatchConfirm = common::hasPriv('bug', 'batchConfirm'); + $canBatchClose = common::hasPriv('bug', 'batchClose'); + $canBatchActivate = common::hasPriv('bug', 'batchActivate'); + $canBatchChangeBranch = common::hasPriv('bug', 'batchChangeBranch'); + $canBatchChangeModule = common::hasPriv('bug', 'batchChangeModule'); + $canBatchResolve = common::hasPriv('bug', 'batchResolve'); + $canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo'); + + $canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo); ?> ';?> ' id='bugList' data-fixed-left-width='' data-fixed-right-width=''> @@ -219,7 +230,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow if(common::checkNotCN() and $value->id == 'severity') $value->name = $lang->bug->severity; if(common::checkNotCN() and $value->id == 'pri') $value->name = $lang->bug->pri; if(common::checkNotCN() and $value->id == 'confirmed') $value->name = $lang->bug->confirmed; - $this->datatable->printHead($value, $orderBy, $vars); + $this->datatable->printHead($value, $orderBy, $vars, $canBatchAction); $columns ++; } } @@ -236,33 +247,35 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
';?> - +
10;?> diff --git a/module/caselib/view/browse.html.php b/module/caselib/view/browse.html.php index 2071d0642c..085d032cd5 100644 --- a/module/caselib/view/browse.html.php +++ b/module/caselib/view/browse.html.php @@ -97,7 +97,7 @@ js::set('flow', $config->global->flow); testcase->needReview or !empty($config->testcase->forceReview));?> - + recTotal}&recPerPage={$pager->recPerPage}";?>
@@ -155,7 +155,9 @@ js::set('flow', $config->global->flow);