From a90b9240800bf97e19c50907c3694b5988059bf0 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 22 Mar 2019 08:54:44 +0800 Subject: [PATCH 01/30] * finish task #5371. --- module/block/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/block/model.php b/module/block/model.php index 6866c8b298..592161c3e2 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -590,6 +590,7 @@ class blockModel extends model if($blockKey == 'html') $blockPairs[$block] = 'HTML'; if($blockKey == 'flowchart') $blockPairs[$block] = $this->lang->block->lblFlowchart; if($blockKey == 'dynamic') $blockPairs[$block] = $this->lang->block->dynamic; + if($blockKey == 'welcome') $blockPairs[$block] = $this->lang->block->welcome; } else { From 0344580fff3047c075cc8a7148c1dafe7e658d1e Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 22 Mar 2019 10:42:00 +0800 Subject: [PATCH 02/30] * Fix task lang file. --- module/task/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index 83e46c070d..c4d7931499 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -247,7 +247,7 @@ - team) ? $lang->task->assignTo : $lang->task->transferTo;?> + task->assignedTo;?> assignedTo ? $task->assignedToRealName . $lang->at . $task->assignedDate : $lang->noData;?> From 0e0f0af55536448c7d1ce7c38d2ab9ac079191e1 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 22 Mar 2019 11:19:44 +0800 Subject: [PATCH 03/30] * Finish child task. --- module/task/lang/en.php | 1 - module/task/lang/zh-cn.php | 1 - module/task/model.php | 4 ++-- module/task/view/edit.html.php | 8 +------- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/module/task/lang/en.php b/module/task/lang/en.php index 4f9f5a52d0..da4a540524 100644 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -106,7 +106,6 @@ $lang->task->team = 'Team'; $lang->task->transfer = 'Transfer'; $lang->task->transferTo = 'Transfer To'; $lang->task->children = 'Child Task'; -$lang->task->unlinkParent = 'Unlink Parent'; $lang->task->childrenAB = 'Child'; $lang->task->parent = 'Parent Task'; $lang->task->parentAB = 'Parent Task'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 2945efd2ff..a4ba48d715 100644 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -106,7 +106,6 @@ $lang->task->team = '团队'; $lang->task->transfer = '转交'; $lang->task->transferTo = '转交给'; $lang->task->children = '子任务'; -$lang->task->unlinkParent = '取消子任务'; $lang->task->childrenAB = '子'; $lang->task->parent = '父任务'; $lang->task->parentAB = '父'; diff --git a/module/task/model.php b/module/task/model.php index e5c00ca837..83ed72097d 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -655,13 +655,13 @@ class taskModel extends model ->setIF($this->post->assignedTo != $oldTask->assignedTo, 'assignedDate', $now) ->setIF($this->post->status == 'wait' and $this->post->left == $oldTask->left and $this->post->consumed == 0 and $this->post->estimate, 'left', $this->post->estimate) - ->setIF(isset($_POST['unlinkParent']), 'parent', 0) + ->setIF($oldTask->parent > 0 and !$this->post->parent, 'parent', 0) ->setDefault('lastEditedBy', $this->app->user->account) ->add('lastEditedDate', $now) ->stripTags($this->config->task->editor->edit['id'], $this->config->allowedTags) ->join('mailto', ',') - ->remove('comment,files,labels,uid,multiple,team,teamEstimate,teamConsumed,teamLeft,contactListMenu,unlinkParent') + ->remove('comment,files,labels,uid,multiple,team,teamEstimate,teamConsumed,teamLeft,contactListMenu') ->get(); if($task->consumed < $oldTask->consumed) die(js::error($this->lang->task->error->consumedSmall)); diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php index b588ea1f19..99e5eeb29c 100644 --- a/module/task/view/edit.html.php +++ b/module/task/view/edit.html.php @@ -103,18 +103,12 @@ story, "class='form-control chosen'");?> - parent == 0 and empty($task->team)):?> + parent >= 0 and empty($task->team)):?> task->parent;?> parent, "class='form-control chosen'");?> - parent > 0):?> - - task->unlinkParent;?> - - - task->assignedTo;?> assignedTo, "class='form-control chosen'");?> From be952195ce5193859d6107403e447aa327213a6f Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 22 Mar 2019 13:02:03 +0800 Subject: [PATCH 04/30] * Fix burn select width. --- module/project/view/burn.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/view/burn.html.php b/module/project/view/burn.html.php index 84b3303dce..d499d1f5f7 100644 --- a/module/project/view/burn.html.php +++ b/module/project/view/burn.html.php @@ -25,7 +25,7 @@ echo $lang->project->howToUpdateBurn; ?> -
+
'>
From 955bbf3345e88674c36cbf425b9f1f2a007dcdee Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 22 Mar 2019 13:08:23 +0800 Subject: [PATCH 05/30] * Fix block lang file. --- module/block/view/dashboard.html.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/module/block/view/dashboard.html.php b/module/block/view/dashboard.html.php index 2631fcc085..c820e1cfec 100644 --- a/module/block/view/dashboard.html.php +++ b/module/block/view/dashboard.html.php @@ -44,13 +44,13 @@ $useGuest = $this->app->user->account == 'guest';
From 884b7b9c185a5f22e0eca10741255b5d2e91bf19 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 22 Mar 2019 15:13:50 +0800 Subject: [PATCH 09/30] * adjust for 5325. --- module/report/model.php | 9 +++++- module/task/control.php | 7 +---- module/task/css/create.css | 7 +++++ module/task/js/create.js | 54 ++++++++++++++++++++++++++++++++ module/task/view/create.html.php | 13 ++++++-- 5 files changed, 80 insertions(+), 10 deletions(-) diff --git a/module/report/model.php b/module/report/model.php index 8361e68a2b..96d8dec0fc 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -24,7 +24,14 @@ class reportModel extends model { $sum = 0; foreach($datas as $data) $sum += $data->value; - foreach($datas as $data) $data->percent = round($data->value / $sum, 4); + + $totalPercent = 0; + foreach($datas as $i => $data) + { + $data->percent = round($data->value / $sum, 4); + $totalPercent += $data->percent; + } + if(isset($i)) $datas[$i]->percent = round(1 - $totalPercent + $datas[$i]->percent, 4); return $datas; } diff --git a/module/task/control.php b/module/task/control.php index 45087ce0b6..3c0d0e2030 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -174,11 +174,6 @@ class task extends control /* Get no test stories. */ $testStoryIdList = $this->dao->select('story')->from(TABLE_TASK)->where('project')->eq($projectID)->andWhere('story')->in(array_keys($stories))->fetchPairs('story', 'story'); - $noTestStories = array(); - foreach($stories as $id => $title) - { - if(!isset($testStoryIdList[$id])) $noTestStories[$id] = $title; - } $title = $project->name . $this->lang->colon . $this->lang->task->create; $position[] = html::a($taskLink, $project->name); @@ -199,7 +194,7 @@ class task extends control $this->view->task = $task; $this->view->users = $users; $this->view->stories = $stories; - $this->view->noTestStories = $noTestStories; + $this->view->testStoryIdList = $testStoryIdList; $this->view->members = $members; $this->view->moduleOptionMenu = $moduleOptionMenu; $this->display(); diff --git a/module/task/css/create.css b/module/task/css/create.css index 5cc7ee5bbd..1f614cd986 100644 --- a/module/task/css/create.css +++ b/module/task/css/create.css @@ -10,5 +10,12 @@ #testStoryBox table tr td{padding:0px;} #testStoryBox table tr td .chosen-container .chosen-single{border:0px;} +#testStoryBox table tr td .chosen-compact.chosen-container-single .chosen-single>.chosen-search{top:0;right:0;left:0} #testStoryBox table tr td input{border:0px;} #testStoryBox table tr td .input-group .input-group-addon{border-left:1px solid #dcdcdc;border-right:1px solid #dcdcdc;} +#testStoryBox table button.btn{border:0px;} + +.chosen-results > li.has-test, +.chosen-results > li.has-new-test {position: relative; color: #388E3C;} +.chosen-results > li.has-test.highlighted, +.chosen-results > li.has-new-test.highlighted {color: #fff;} diff --git a/module/task/js/create.js b/module/task/js/create.js index 3fdc092a2c..15bd0236ea 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -272,6 +272,48 @@ function removeItem(obj) if($(obj).closest('table').find('tbody tr').size() > 1) $(obj).closest('tr').remove(); } +function markTestStory() +{ + $('#testStoryBox select[name^="testStory"]').each(function() + { + var $select = $(this); + $select.find('option').each(function() + { + var $option = $(this); + var value = $option.attr('value'); + var tests = testStoryIdList[value]; + $option.attr('data-data', value).toggleClass('has-test', !!(tests && tests !== '0')); + }); + $select.trigger("chosen:updated"); + }); + + var getStoriesHasTest = function() + { + var storiesHasTest = {}; + $('#testStoryBox table tbody>tr').each(function() + { + var $tr = $(this); + storiesHasTest[$tr.find('select[name^="testStory"]').val()] = true; + }); + console.log(storiesHasTest); + return storiesHasTest; + }; + + $('#testStoryBox').on('chosen:showing_dropdown', 'select[name^="testStory"],.chosen-with-drop', function() + { + var storiesHasTest = getStoriesHasTest(); + var $container = $(this).closest('td').find('.chosen-container'); + setTimeout(function() + { + $container.find('.chosen-results>li').each(function() + { + var $li = $(this); + $li.toggleClass('has-new-test', !!storiesHasTest[$li.data('data')]); + }); + }, 100); + }); +} + $(document).ready(function() { $('#pri').on('change', function() @@ -288,6 +330,7 @@ $(document).ready(function() }); setStoryRelated(); + markTestStory(); $('#selectAllUser').on('click', function() { @@ -299,6 +342,17 @@ $(document).ready(function() } }); + var preAssign = ''; + $('#assignedTo').change(function() + { + var assign = $(this).val(); + $('#testStoryBox').find('select[name^="testAssignedTo"]').each(function() + { + if($(this).val() == '' || $(this).val() == preAssign) $(this).val(assign).trigger('chosen:updated'); + }); + preAssign = assign; + }); + $('[data-toggle=tooltip]').tooltip(); $(window).resize(); diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index d762a6ffca..212900bb87 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -74,10 +74,10 @@ + global->flow != 'onlyTask' and $project->type != 'ops'):?> task->selectTestStory;?> - @@ -90,8 +90,11 @@ + + $storyTitle):?> + - + + + = 5) break;?> +
task->priList, $task->pri, "class='form-control chosen'");?>
@@ -109,11 +112,14 @@
- + task->name;?> @@ -262,4 +268,5 @@
+ From 50eea70d0104ac328bb73a04ef06c71f2015a33d Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 22 Mar 2019 15:23:56 +0800 Subject: [PATCH 10/30] * Fix project task button. --- module/project/view/task.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index 40de7961c6..7a5ce4b66a 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -149,7 +149,7 @@ js::set('browseType', $browseType); project = $projectID; - if(!isset($this->config->isINT) or !$this->config->isINT) + if(!isset($this->config->isINT) or !$this->config->isINT or $this->app->getClientLang() != 'en') { $link = $this->createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); if(common::hasPriv('task', 'batchCreate', $checkObject)) echo html::a($link, " {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'"); @@ -158,7 +158,7 @@ js::set('browseType', $browseType); $link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, " {$lang->task->create}", '', "class='btn btn-primary'"); ?> - config->isINT) and $this->config->isINT):?> + config->isINT) and $this->config->isINT and $this->app->getClientLang() == 'en'):?> createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));?> diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php index 0428e7f782..fe944726c9 100644 --- a/module/productplan/view/view.html.php +++ b/module/productplan/view/view.html.php @@ -37,9 +37,9 @@ deleted) { - if(common::hasPriv('productplan', 'create') and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), "" . $this->lang->productplan->children , '', "class='btn btn-link' title='{$this->lang->productplan->children}'"); - common::printIcon('productplan', 'edit', "planID=$plan->id", $plan); - common::printIcon('productplan', 'delete', "planID=$plan->id", $plan, 'button', 'trash', 'hiddenwin'); + if(common::hasPriv('productplan', 'create') and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), " " . $this->lang->productplan->children , '', "class='btn btn-link' title='{$this->lang->productplan->children}'"); + if(common::hasPriv('productplan', 'edit')) echo html::a($this->createLink('productplan', 'edit', "planID=$plan->id"), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'"); + if(common::hasPriv('productplan', 'delete')) echo html::a($this->createLink('productplan', 'delete', "planID=$plan->id"), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'"); } ?> @@ -57,16 +57,27 @@
'>
- deleted) - { - $batchMisc = common::hasPriv('story', 'batchCreate') ? 'btn btn-link' : "disabled"; - $batchLink = common::hasPriv('story', 'batchCreate') ? $this->createLink('story', 'batchCreate', "productID=$plan->product&branch=$plan->branch&moduleID=0&story=0&project=0&plan={$plan->id}") : '#'; - echo html::a($batchLink, "" . $lang->story->batchCreate . '', '', "class='$batchMisc'"); - common::printIcon('story', 'create', "productID=$plan->product&branch=$plan->branch&moduleID=0&storyID=0&projectID=0&bugID=0&planID=$plan->id", $plan, 'button', 'plus'); - } - if(common::hasPriv('productplan', 'linkStory')) echo html::a("javascript:showLink($plan->id, \"story\")", ' ' . $lang->productplan->linkStory, '', "class='btn btn-primary'"); - ?> + deleted):?> +
+ +
+ + id, \"story\")", ' ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");?>
diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php index 4778d230ed..baeeaec607 100644 --- a/module/release/view/view.html.php +++ b/module/release/view/view.html.php @@ -36,10 +36,10 @@ if(common::hasPriv('release', 'changeStatus', $release)) { $changedStatus = $release->status == 'normal' ? 'terminate' : 'normal'; - echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), ' ', 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'"); + echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), ' ' . $lang->release->changeStatusList[$changedStatus], 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'"); } - common::printIcon('release', 'edit', "releaseID=$release->id", $release); - common::printIcon('release', 'delete', "releaseID=$release->id", $release, 'button', 'trash', 'hiddenwin'); + if(common::hasPriv('release', 'edit')) echo html::a($this->createLink('release', 'edit', "releaseID=$release->id"), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'"); + if(common::hasPriv('release', 'delete')) echo html::a($this->createLink('release', 'delete', "releaseID=$release->id"), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'"); } ?>
diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index c4d7931499..cc647909e7 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -343,8 +343,20 @@
getClientLang() == 'en' ? 'w-90px' : 'w-70px';?> + + + + - + + + + + + + + + @@ -360,18 +372,6 @@ ?> - - - - - - - - - - - -
task->estimate;?>estimate . $lang->workingHour;?>
task->estStarted;?>task->consumed;?>consumed, 2) . $lang->workingHour;?>
task->left;?>left . $lang->workingHour;?>
task->estStarted;?> estStarted;?>
task->estimate;?>estimate . $lang->workingHour;?>
task->consumed;?>consumed, 2) . $lang->workingHour;?>
task->left;?>left . $lang->workingHour;?>
diff --git a/xuanxuan/www/upgradexuanxuan.php b/xuanxuan/www/upgradexuanxuan.php deleted file mode 100644 index 007d588641..0000000000 --- a/xuanxuan/www/upgradexuanxuan.php +++ /dev/null @@ -1,27 +0,0 @@ -loadCommon(); -$common->loadModel('chat')->upgrade(); - -/* Flush the buffer. */ -echo helper::removeUTF8Bom(ob_get_clean()); diff --git a/xuanxuan/www/xuanxuan.php b/xuanxuan/www/x.php similarity index 100% rename from xuanxuan/www/xuanxuan.php rename to xuanxuan/www/x.php From d5f201fd496deb64ef484a4784f03c4a54666f5d Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 22 Mar 2019 16:44:33 +0800 Subject: [PATCH 12/30] * Fix sql. --- db/update11.3.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/db/update11.3.sql b/db/update11.3.sql index f400238ff7..4590ec04c2 100644 --- a/db/update11.3.sql +++ b/db/update11.3.sql @@ -1,2 +1 @@ ALTER TABLE `zt_case` ADD `fromCaseVersion` mediumint(8) unsigned NOT NULL AFTER `fromCaseID`; -ALTER TABLE `zt_case` ADD `ignoreCaseVersion` mediumint(8) unsigned NOT NULL AFTER `fromCaseVersion`; From d78546eea54d8d3d8fc6daa9252abe9b65ce0cd8 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 22 Mar 2019 16:49:47 +0800 Subject: [PATCH 13/30] * adjust for task #5357. --- module/search/view/buildform.html.php | 12 ++++++++++-- module/task/js/create.js | 4 ++-- module/task/view/create.html.php | 21 +++++++++++++++++++++ 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index f3865d485f..d610750fa4 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -16,7 +16,7 @@ include '../../common/view/datepicker.html.php'; include '../../common/view/chosen.html.php'; $formId = 'searchForm-' . uniqid(''); $fieldWidth = $app->getClientLang() == 'en' ? 'w-130px' : 'w-110px'; -$operatorWidth = $app->getClientLang() == 'en' ? 'w-110px' : 'w-100px'; +$operatorWidth = $app->getClientLang() == 'en' ? 'w-100px' : 'w-90px'; ?> - -
-
-
-
-
-
-
product->roadmap;?>
-
-
-
- -
- createLink('product', 'roadmap', "productID={$product->id}"), $lang->product->iterationView . "", '', "class='btn btn-primary btn-circle btn-icon-right btn-sm pull-right'");?> -
+
+
+
+
+
+
+
product->roadmap;?>
-
-
-
-
-
product->latestDynamic;?>
- -
-
-
    - -
  • major) echo "class='active'";?>> -
    - date;?> - actor) . ' ' . $action->actionLabel . $action->objectLabel . ' ' . html::a($action->objectLink, $action->objectName);?> -
    +
    +
    +
    + createLink('product', 'roadmap', "productID={$product->id}"), $lang->product->iterationView . "", '', "class='btn btn-primary btn-circle btn-icon-right btn-sm pull-right'");?>
-
- - +
+
+
+
+
product->latestDynamic;?>
+ +
+
+
    + +
  • major) echo "class='active'";?>> +
    + date;?> + actor) . ' ' . $action->actionLabel . $action->objectLabel . ' ' . html::a($action->objectLink, $action->objectName);?> +
    +
  • + +
+
-
-
- id"; - $browseLink = $this->session->productList ? $this->session->productList : inlink('browse', "productID=$product->id"); - common::printBack($browseLink); - if(!$product->deleted) - { - echo "
"; - if($product->status != 'closed') - { - common::printIcon('product', 'close', $params, $product, 'button', '', '', 'iframe', true); - echo "
"; - } - - common::printIcon('product', 'edit', $params, $product); - common::printIcon('product', 'delete', $params, $product, 'button', 'trash', 'hiddenwin'); - } - ?> -
+
+ +
-
-
-
-
-
-

id;?> code;?> name;?>

-
-

desc;?>

-

- product->typeList, $product->type);?> - product->statusList, $product->status);?> - deleted):?> - product->deleted;?> - -

-
+
+
+ id"; + $browseLink = $this->session->productList ? $this->session->productList : inlink('browse', "productID=$product->id"); + common::printBack($browseLink); + if(!$product->deleted) + { + echo "
"; + if($product->status != 'closed') + { + common::printIcon('product', 'close', $params, $product, 'button', '', '', 'iframe', true); + echo "
"; + } + + common::printIcon('product', 'edit', $params, $product); + common::printIcon('product', 'delete', $params, $product, 'button', 'trash', 'hiddenwin'); + } + ?> +
+
+
+
+
+
+
+
+

id;?> code;?> name;?>

+
+

desc;?>

+

+ product->typeList, $product->type);?> + product->statusList, $product->status);?> + deleted):?> + product->deleted;?> + +

- type == 'platform'):?> -
-
product->branchName['platform'];?>
- -
- -
-
product->manager;?>
-
- - - - - - - - - - - - - -
productCommon;?>PO);?> product->qa;?>QD);?>
product->release;?>RD);?>
-
-
-
-
product->basicInfo;?>
-
- - - - - - - - - - - - - - - - - - - acl == 'custom'):?> - - - - - - -
product->line;?>line);?>
story->openedBy?>createdBy);?>
story->openedDate?>createdDate, DT_DATE1);?>
product->acl;?>product->aclList[$product->acl];?>
product->whitelist;?> - - whitelist); - foreach($whitelist as $groupID) if(isset($groups[$groupID])) echo $groups[$groupID] . ' '; - ?> - -
-
-
- global->flow != 'onlyTest'):?> -
-
product->otherInfo;?>
-
- - - app->getClientLang() == 'en' ? ' ' : '';?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
story->statusList['active'] . $space . $lang->story->common;?>stories['active']?>product->plans?>plans?>product->bugs?>bugs?>
story->statusList['changed'] . $space . $lang->story->common;?>stories['changed']?>product->projects?>projects?>product->cases?>cases?>
story->statusList['draft'] . $space . $lang->story->common;?>stories['draft']?>product->builds?>builds?>product->docs?>docs?>
story->statusList['closed'] . $space . $lang->story->common;?>stories['closed']?>product->releases?>releases?>
-
-
-
+ type == 'platform'):?> +
+
product->branchName['platform'];?>
+ +
+ +
+
product->manager;?>
+
+ + + + + + + + + + + + + +
productCommon;?>PO);?> product->qa;?>QD);?>
product->release;?>RD);?>
+
+
+
+
product->basicInfo;?>
+
+ + + + + + + + + + + + + + + + + + + acl == 'custom'):?> + + + + + + +
product->line;?>line);?>
story->openedBy?>createdBy);?>
story->openedDate?>createdDate, DT_DATE1);?>
product->acl;?>product->aclList[$product->acl];?>
product->whitelist;?> + + whitelist); + foreach($whitelist as $groupID) if(isset($groups[$groupID])) echo $groups[$groupID] . ' '; + ?> + +
+
+
+ global->flow != 'onlyTest'):?> +
+
product->otherInfo;?>
+
+ + + app->getClientLang() == 'en' ? ' ' : '';?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
story->statusList['active'] . $space . $lang->story->common;?>stories['active']?>product->plans?>plans?>product->bugs?>bugs?>
story->statusList['changed'] . $space . $lang->story->common;?>stories['changed']?>product->projects?>projects?>product->cases?>cases?>
story->statusList['draft'] . $space . $lang->story->common;?>stories['draft']?>product->builds?>builds?>product->docs?>docs?>
story->statusList['closed'] . $space . $lang->story->common;?>stories['closed']?>product->releases?>releases?>
+
+
+
diff --git a/module/user/view/create.html.php b/module/user/view/create.html.php index dbf7057cce..afc5113418 100644 --- a/module/user/view/create.html.php +++ b/module/user/view/create.html.php @@ -23,7 +23,7 @@
- isINT) and $config->isINT) ? 'w-enVerifyPassword' : 'w-verifyPassword';?> + getClientLang() == 'en') ? 'w-enVerifyPassword' : 'w-verifyPassword';?> diff --git a/module/user/view/edit.html.php b/module/user/view/edit.html.php index e6e354c740..c13c3e3486 100644 --- a/module/user/view/edit.html.php +++ b/module/user/view/edit.html.php @@ -48,7 +48,7 @@
user->dept;?>
- isINT) and $config->isINT) ? 'w-130px' : 'w-90px';?> + getClientLang() == 'en') ? 'w-130px' : 'w-90px';?> @@ -94,7 +94,7 @@
user->accountInfo;?>
user->account;?> account, "class='form-control'");?>
- isINT) and $config->isINT) ? 'w-enVerifyPassword' : 'w-verifyPassword';?> + getClientLang() == 'en') ? 'w-enVerifyPassword' : 'w-verifyPassword';?> productName):?> - + projectName):?> - + diff --git a/module/project/model.php b/module/project/model.php index 61ae7e1279..76a14e6888 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -119,13 +119,19 @@ class projectModel extends model /* Replace for dropdown submenu. */ if(isset($this->lang->project->subMenu->$key)) { + $projectSubMenu = $this->lang->project->subMenu->$key; $subMenu = common::createSubMenu($this->lang->project->subMenu->$key, $projectID); if(!empty($subMenu)) { - foreach($subMenu as $menu) + foreach($subMenu as $menuKey => $menu) { - if($moduleName == strtolower($menu->link['module']) and $methodName == strtolower($menu->link['method'])) + if($moduleName == strtolower($menu->link['module']) and + ( + $methodName == strtolower($menu->link['method']) or + (isset($projectSubMenu->$menuKey['alias']) and strpos($projectSubMenu->$menuKey['alias'], $methodName) !== false) + ) + ) { $this->lang->project->menu->{$key}['link'] = $menu->text . "|" . join('|', $menu->link); break; From bf97231962a2800ac864097d4448002287c8036e Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 28 Mar 2019 10:28:26 +0800 Subject: [PATCH 28/30] * adjust for task getProjectTaskPairs method. --- module/task/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index d22fc037db..029837eb42 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1044,7 +1044,7 @@ class taskModel extends model ->removeIF(!empty($oldTask->team), 'consumed,left') ->remove('comment')->get(); - if(empty($task->team) && $this->post->left == 0) + if($this->post->left == 0) { $task->status = 'done'; $task->finishedBy = $this->app->user->account; @@ -1665,7 +1665,7 @@ class taskModel extends model public function getProjectTaskPairs($projectID, $status = 'all', $orderBy = 'finishedBy, id_desc') { $tasks = array('' => ''); - $stmt = $this->dao->select('t1.id, t1.name, t2.realname AS finishedByRealName') + $stmt = $this->dao->select('t1.id,t1.name,t1.parent,t2.realname AS finishedByRealName') ->from(TABLE_TASK)->alias('t1') ->leftJoin(TABLE_USER)->alias('t2')->on('t1.finishedBy = t2.account') ->where('t1.project')->eq((int)$projectID) @@ -1673,7 +1673,7 @@ class taskModel extends model ->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi() ->orderBy($orderBy) ->query(); - while($task = $stmt->fetch()) $tasks[$task->id] = "$task->id:$task->finishedByRealName:$task->name"; + while($task = $stmt->fetch()) $tasks[$task->id] = ($task->parent > 0 ? "[{$this->lang->task->childrenAB}] " : '') . "$task->id:$task->finishedByRealName:$task->name"; return $tasks; } From bcfbd81bef9334e67bbad3aa4027b4d94d7c9b0d Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Thu, 28 Mar 2019 10:54:58 +0800 Subject: [PATCH 29/30] * Fix taskleft sql. --- db/update11.4.sql | 2 ++ db/zentao.sql | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 db/update11.4.sql diff --git a/db/update11.4.sql b/db/update11.4.sql new file mode 100644 index 0000000000..0a36f6bf6e --- /dev/null +++ b/db/update11.4.sql @@ -0,0 +1,2 @@ +ALTER TABLE `zt_burn` ADD `task` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `project`; +ALTER TABLE `zt_burn` ADD PRIMARY KEY `project_date_task` (`project`, `date`, `task`), DROP INDEX `PRIMARY`; diff --git a/db/zentao.sql b/db/zentao.sql index 1a9cb41e34..6f1175eb92 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -125,11 +125,12 @@ CREATE TABLE IF NOT EXISTS `zt_build` ( -- DROP TABLE IF EXISTS `zt_burn`; CREATE TABLE IF NOT EXISTS `zt_burn` ( `project` mediumint(8) unsigned NOT NULL, + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', `date` date NOT NULL, `estimate` float NOT NULL, `left` float NOT NULL, `consumed` float NOT NULL, - PRIMARY KEY (`project`,`date`) + PRIMARY KEY (`project`,`date`,`task`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_case`; CREATE TABLE IF NOT EXISTS `zt_case` ( From 670fb65ca0b364fc6566bda7342b54be743cc639 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 28 Mar 2019 11:21:52 +0800 Subject: [PATCH 30/30] * fix for include defaultvalue. --- framework/base/router.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 0e7d1e18cd..5e083621ed 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1528,7 +1528,7 @@ class baseRouter { $code = trim(file_get_contents($fileName)); if(strpos($code, '') !== false) $code = rtrim($code, '?>'); + if(strrpos($code, '?' . '>') !== false) $code = rtrim($code, '?' . '>'); return trim($code); } @@ -1650,7 +1650,7 @@ class baseRouter /* include default value for module*/ $defaultValueFiles = glob($this->getTmpRoot() . "defaultvalue/*.php"); - if($defaultValueFiles) foreach($defaultValueFiles as $file) helper::import($file); + if($defaultValueFiles) foreach($defaultValueFiles as $file) include $file; /* * 使用反射机制获取函数参数的默认值。
user->verify;?>
user->verifyPassword;?> From 85638822128d0143758e49e56990691d61130667 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 25 Mar 2019 13:36:04 +0800 Subject: [PATCH 17/30] * Fix en task menu. --- module/project/view/task.html.php | 34 +++++++++++++++++++------------ 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index 7a5ce4b66a..e64ec6dd8f 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -149,23 +149,31 @@ js::set('browseType', $browseType); project = $projectID; - if(!isset($this->config->isINT) or !$this->config->isINT or $this->app->getClientLang() != 'en') - { - $link = $this->createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); - if(common::hasPriv('task', 'batchCreate', $checkObject)) echo html::a($link, " {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'"); - } + ?> + getClientLang() != 'en'):?> + createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); + if(common::hasPriv('task', 'batchCreate', $checkObject)) echo html::a($link, " {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'"); $link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, " {$lang->task->create}", '', "class='btn btn-primary'"); ?> - config->isINT) and $this->config->isINT and $this->app->getClientLang() == 'en'):?> - createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));?> - + + "; + $link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); + if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, " {$lang->task->create} ", '', "class='btn btn-primary'"); + ?> + + ";?> From 84955d15abcde2f32320c77092e2abe01e65c51b Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 25 Mar 2019 13:45:59 +0800 Subject: [PATCH 18/30] * adjust for testStory. --- module/story/model.php | 13 +++++++++++++ module/task/control.php | 5 +---- module/testtask/model.php | 1 + 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index d052e6d83e..e7094c4395 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -82,6 +82,19 @@ class storyModel extends model ->fetchAll('id'); } + /** + * Get test stories. + * + * @param array $storyIdList + * @param int $projectID + * @access public + * @return array + */ + public function getTestStories($storyIdList, $projectID) + { + return $this->dao->select('story')->from(TABLE_TASK)->where('project')->eq($projectID)->andWhere('type')->eq('test')->andWhere('story')->in($storyIdList)->fetchPairs('story', 'story'); + } + /** * Get story specs. * diff --git a/module/task/control.php b/module/task/control.php index 3c0d0e2030..ba06534941 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -172,9 +172,6 @@ class task extends control $members = $this->project->getTeamMemberPairs($projectID, 'nodeleted'); $moduleOptionMenu = $this->tree->getTaskOptionMenu($projectID); - /* Get no test stories. */ - $testStoryIdList = $this->dao->select('story')->from(TABLE_TASK)->where('project')->eq($projectID)->andWhere('story')->in(array_keys($stories))->fetchPairs('story', 'story'); - $title = $project->name . $this->lang->colon . $this->lang->task->create; $position[] = html::a($taskLink, $project->name); $position[] = $this->lang->task->common; @@ -194,7 +191,7 @@ class task extends control $this->view->task = $task; $this->view->users = $users; $this->view->stories = $stories; - $this->view->testStoryIdList = $testStoryIdList; + $this->view->testStoryIdList = $this->loadModel('story')->getTestStories(array_keys($stories), $project->id); $this->view->members = $members; $this->view->moduleOptionMenu = $moduleOptionMenu; $this->display(); diff --git a/module/testtask/model.php b/module/testtask/model.php index 9cf83de325..a277c34966 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -438,6 +438,7 @@ class testtaskModel extends model */ public function getLinkableCasesBySuite($productID, $task, $query, $suite, $linkedCases, $pager) { + if(strpos($query, '`product`') !== false) $query = str_replace('`product`', 't1.`product`', $query); return $this->dao->select('t1.*,t2.version as version')->from(TABLE_CASE)->alias('t1') ->leftJoin(TABLE_SUITECASE)->alias('t2')->on('t1.id=t2.case') ->where($query) From fcf80e86758aa98c409f788b1fba843612590f00 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 25 Mar 2019 14:01:56 +0800 Subject: [PATCH 19/30] * Fix task lang file. --- module/task/lang/zh-cn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index a4ba48d715..3670c92e33 100644 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -68,7 +68,7 @@ $lang->task->datePlan = '日程规划'; $lang->task->estStarted = '预计开始'; $lang->task->realStarted = '实际开始'; $lang->task->date = '日期'; -$lang->task->deadline = '计划完成'; +$lang->task->deadline = '截止日期'; $lang->task->deadlineAB = '截止'; $lang->task->status = '任务状态'; $lang->task->desc = '任务描述'; From 7d783617182e3749705923ba137bf7cf5c5e9cc3 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 26 Mar 2019 08:21:39 +0800 Subject: [PATCH 20/30] * adjust for field width. --- module/story/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/config.php b/module/story/config.php index da238b0291..d77f07bf8a 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -102,7 +102,7 @@ $config->story->datatable->fieldList['estimate']['required'] = 'no'; $config->story->datatable->fieldList['stage']['title'] = 'stageAB'; $config->story->datatable->fieldList['stage']['fixed'] = 'no'; -$config->story->datatable->fieldList['stage']['width'] = '70'; +$config->story->datatable->fieldList['stage']['width'] = '80'; $config->story->datatable->fieldList['stage']['required'] = 'no'; $config->story->datatable->fieldList['openedBy']['title'] = 'openedByAB'; From 395004bc6da5d88e31ab2b947c0276daa9b11f52 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 26 Mar 2019 14:58:52 +0800 Subject: [PATCH 21/30] * adjust for convert url. --- www/js/my.full.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/www/js/my.full.js b/www/js/my.full.js index 90204584a3..d8b48221f6 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -731,18 +731,21 @@ function convertURL() { if($('.article-content, .article>.content').size() == 0) return; - var aTags = new Array(); - var content = $('.article-content, .article>.content').html(); - $('.article-content, .article>.content').find('a').each(function(i) + $('.article-content, .article>.content').each(function() { - aTags[i] = $(this).prop('outerHTML'); - content = content.replace(aTags[i], ''); - }); + var aTags = new Array(); + var content = $(this).html(); + $(this).find('a').each(function(i) + { + aTags[i] = $(this).prop('outerHTML'); + content = content.replace(aTags[i], ''); + }); - var regexp = /(http:\/\/|https:\/\/)((\w|=|\?|\.|\/|\&|-|%|;)+)/g; - content = content.replace(regexp, function($url){ return "" + $url + "";}); - for(i in aTags) content = content.replace('', aTags[i]); - $('.article-content, .article>.content').html(content); + var regexp = /(http:\/\/|https:\/\/)((\w|=|\?|\.|\/|\&|-|%|;)+)/g; + content = content.replace(regexp, function($url){ return "" + $url + "";}); + for(i in aTags) content = content.replace('', aTags[i]); + $(this).html(content); + }); } /* Ping the server every some minutes to keep the session. */ From 0b0882cba89bb7fc42a3eaf9568dbc2a080a9c40 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Tue, 26 Mar 2019 15:01:01 +0800 Subject: [PATCH 22/30] * Fix block delete. --- module/block/js/dashboard.js | 2 +- module/testcase/model.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/module/block/js/dashboard.js b/module/block/js/dashboard.js index a70869e1e3..f7bd58480b 100644 --- a/module/block/js/dashboard.js +++ b/module/block/js/dashboard.js @@ -18,7 +18,7 @@ function deleteBlock(index) } else { - $('#block' + index).remove(); + window.location.reload(true); } }); } diff --git a/module/testcase/model.php b/module/testcase/model.php index 13006067a3..74cc3e397e 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -672,7 +672,13 @@ class testcaseModel extends model { $parentStepID = 0; $isLibCase = ($oldCase->lib and empty($oldCase->product)); - if($isLibCase) $this->dao->update(TABLE_CASE)->set('`fromCaseVersion`')->eq($version)->where('`fromCaseID`')->eq($caseID)->exec(); + if($isLibCase) + { + $fromcaseVersion = $this->dao->select('fromCaseVersion')->from(TABLE_CASE)->where('fromCaseID')->eq($caseID)->fetch('fromCaseVersion'); + $fromcaseVersion += 1; + $this->dao->update(TABLE_CASE)->set('`fromCaseVersion`')->eq($fromcaseVersion)->where('`fromCaseID`')->eq($caseID)->exec(); + } + foreach($this->post->steps as $stepID => $stepDesc) { if(empty($stepDesc)) continue; From 71f948d3774a0d856e876eedd6bb7a5abac351bb Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Tue, 26 Mar 2019 15:31:07 +0800 Subject: [PATCH 23/30] * Fix testcase confim change. --- module/testcase/control.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 5403fd8ec5..9b94d45f28 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -986,16 +986,17 @@ class testcase extends control public function confirmLibcaseChange($caseID, $libcaseID) { $case = $this->testcase->getById($caseID); - $version = $case->fromCaseVersion; - $this->dao->update(TABLE_CASE)->set('version')->eq($version)->where('id')->eq($caseID)->exec(); - $steps = $this->dao->select('*')->from(TABLE_CASESTEP)->where('`case`')->eq($libcaseID)->andWhere('version')->eq($version)->fetchAll(); - foreach($steps as $step) + $libCase = $this->testcase->getById($libcaseID); + $version = $case->version + 1; + $this->dao->update(TABLE_CASE)->set('version')->eq($version)->set('fromCaseVersion')->eq($version)->where('id')->eq($caseID)->exec(); + foreach($libCase->steps as $step) { unset($step->id); - $step->case = $caseID; + $step->case = $caseID; + $step->version = $version; $this->dao->insert(TABLE_CASESTEP)->data($step)->exec(); } - die(js::reload('parent')); + die(js::locate($this->createLink('testcase', 'view', "caseID=$caseID&version=$version"), 'parent')); } /** From d1014dd0184765cd1b2727bdd3f14c17ac347ef6 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Tue, 26 Mar 2019 15:50:15 +0800 Subject: [PATCH 24/30] * Carry back xuanxuan lang. --- xuanxuan/module/chat/ext/lang/en/xuanxuan.php | 6 ++++++ xuanxuan/module/chat/ext/lang/zh-cn/xuanxuan.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/xuanxuan/module/chat/ext/lang/en/xuanxuan.php b/xuanxuan/module/chat/ext/lang/en/xuanxuan.php index 9bc66cd356..7c5397821b 100644 --- a/xuanxuan/module/chat/ext/lang/en/xuanxuan.php +++ b/xuanxuan/module/chat/ext/lang/en/xuanxuan.php @@ -11,6 +11,12 @@ $lang->chat->getChatUsers = 'Get Chat Users'; $lang->chat->getChatGroups = 'Get Chat Groups'; $lang->chat->notifyMSG = 'Notify'; +$lang->chat->createBug = 'Create Bug'; +$lang->chat->createDoc = 'Create Doc'; +$lang->chat->createStory = 'Create Story'; +$lang->chat->createTask = 'Create Task'; +$lang->chat->createTodo = 'Create Todo'; + $lang->chat->turnonList = array(); $lang->chat->turnonList[1] = 'Enable'; $lang->chat->turnonList[0] = 'Disable'; diff --git a/xuanxuan/module/chat/ext/lang/zh-cn/xuanxuan.php b/xuanxuan/module/chat/ext/lang/zh-cn/xuanxuan.php index 6c5588aa8e..c60224f9d0 100644 --- a/xuanxuan/module/chat/ext/lang/zh-cn/xuanxuan.php +++ b/xuanxuan/module/chat/ext/lang/zh-cn/xuanxuan.php @@ -11,6 +11,12 @@ $lang->chat->getChatUsers = '获取用户'; $lang->chat->getChatGroups = '获取讨论组'; $lang->chat->notifyMSG = '消息通知'; +$lang->chat->createBug = '创建 Bug'; +$lang->chat->createDoc = '创建文档'; +$lang->chat->createStory = '创建需求'; +$lang->chat->createTask = '创建任务'; +$lang->chat->createTodo = '创建待办'; + $lang->chat->turnonList = array(); $lang->chat->turnonList[1] = '是'; $lang->chat->turnonList[0] = '否'; From 9f42f0b0d471746d54281c8ea1d6e1e55c8b365a Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 27 Mar 2019 09:21:30 +0800 Subject: [PATCH 25/30] * fix bug. --- module/task/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/task/model.php b/module/task/model.php index 83ed72097d..d22fc037db 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -44,6 +44,7 @@ class taskModel extends model ->join('mailto', ',') ->remove('after,files,labels,assignedTo,uid,storyEstimate,storyDesc,storyPri,team,teamEstimate,teamMember,multiple,teams,contactListMenu,selectTestStory,testStory,testPri,testEstStarted,testDeadline,testAssignedTo,testEstimate') ->get(); + if($task->type != 'test') $this->post->set('selectTestStory', 0); foreach($this->post->assignedTo as $assignedTo) { From 81da2b6326ad2138369785412c2d23741764f356 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Wed, 27 Mar 2019 10:58:42 +0800 Subject: [PATCH 26/30] * Fix burn select condition. --- module/project/model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index 61ae7e1279..46fd1e2592 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -897,6 +897,7 @@ class projectModel extends model $burns = $this->dao->select('project, date AS name, `left` AS value') ->from(TABLE_BURN) ->where('project')->in($projectKeys) + ->andWhere('task')->eq(0) ->orderBy('date desc') ->fetchGroup('project', 'name'); @@ -1876,7 +1877,7 @@ class projectModel extends model public function fixFirst($projectID) { $project = $this->getById($projectID); - $burn = $this->dao->select('*')->from(TABLE_BURN)->where('project')->eq($projectID)->andWhere('date')->eq($project->begin)->fetch(); + $burn = $this->dao->select('*')->from(TABLE_BURN)->where('project')->eq($projectID)->andWhere('task')->eq(0)->andWhere('date')->eq($project->begin)->fetch(); $withLeft = $this->post->withLeft ? $this->post->withLeft : 0; $data = fixer::input('post') @@ -1904,7 +1905,7 @@ class projectModel extends model $project = $this->getById($projectID); /* If the burnCounts > $itemCounts, get the latest $itemCounts records. */ - $sets = $this->dao->select('date AS name, `left` AS value, estimate')->from(TABLE_BURN)->where('project')->eq((int)$projectID)->orderBy('date DESC')->fetchAll('name'); + $sets = $this->dao->select('date AS name, `left` AS value, estimate')->from(TABLE_BURN)->where('project')->eq((int)$projectID)->andWhere('task')->eq(0)->orderBy('date DESC')->fetchAll('name'); $count = 0; $burnData = array(); From 055340062f1e5f50b0516d311e4e83f7caa2af3b Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 27 Mar 2019 13:51:04 +0800 Subject: [PATCH 27/30] * adjust for print subMenu. --- module/doc/view/view.html.php | 4 ++-- module/project/model.php | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/module/doc/view/view.html.php b/module/doc/view/view.html.php index d4f19279f7..d2aa872fa8 100644 --- a/module/doc/view/view.html.php +++ b/module/doc/view/view.html.php @@ -167,13 +167,13 @@ js::set('sysurl', common::getSysUrl());
doc->product;?>doc->product;?> productName;?>
doc->project;?>doc->project;?> projectName;?>