From fa4ea0ff4de828cabcebeb1c383820ad92a10969 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 13 May 2022 00:09:10 +0800 Subject: [PATCH 01/16] * Fix bug#22409. --- module/execution/model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/execution/model.php b/module/execution/model.php index 5296c17f03..dde01e78e1 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -702,6 +702,8 @@ class executionModel extends model foreach($executions as $executionID => $execution) { + if(isset($execution->status) and in_array($execution->status, array('done', 'closed', 'suspended'))) $this->computeBurn($executionID); + $oldExecution = $oldExecutions[$executionID]; $team = $this->loadModel('user')->getTeamMemberPairs($executionID, 'execution'); $projectID = isset($execution->project) ? $execution->project : $oldExecution->project; From 89491d97de37c22bf3017a74388e318a699dc435 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 13 May 2022 03:02:26 +0800 Subject: [PATCH 02/16] * Resolve issue#629. --- module/execution/control.php | 15 +++++++++++++-- module/execution/view/view.html.php | 14 ++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 9811f255d1..25b7228018 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2011,8 +2011,18 @@ class execution extends control $this->execution->setMenu($execution->id); $this->app->loadLang('bug'); - list($dateList, $interval) = $this->execution->getDateList($execution->begin, $execution->end, 'noweekend', 0, 'Y-m-d'); - $chartData = $this->execution->buildBurnData($executionID, $dateList, 'noweekend'); + $type = 'noweekend'; + if(((strpos('closed,suspended', $execution->status) === false and helper::today() > $execution->end) + or ($execution->status == 'closed' and substr($execution->closedDate, 0, 10) > $execution->end) + or ($execution->status == 'suspended' and $execution->suspendedDate > $execution->end)) + and strpos($type, 'delay') === false) + $type .= ',withdelay'; + + $deadline = $execution->status == 'closed' ? substr($execution->closedDate, 0, 10) : $execution->suspendedDate; + $deadline = strpos('closed,suspended', $execution->status) === false ? helper::today() : $deadline; + $endDate = strpos($type, 'withdelay') !== false ? $deadline : $execution->end; + list($dateList, $interval) = $this->execution->getDateList($execution->begin, $endDate, $type, 0, 'Y-m-d'); + $chartData = $this->execution->buildBurnData($executionID, $dateList, $type); /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -2036,6 +2046,7 @@ class execution extends control $this->view->statData = $this->execution->statRelatedData($executionID); $this->view->chartData = $chartData; $this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable. + $this->view->type = $type; $this->display(); } diff --git a/module/execution/view/view.html.php b/module/execution/view/view.html.php index 90ec222e0e..87e758c145 100644 --- a/module/execution/view/view.html.php +++ b/module/execution/view/view.html.php @@ -12,6 +12,7 @@ ?> +
>
@@ -321,6 +322,19 @@ $(function() }] }; + var delaySets = + { + label: "execution->charts->burn->graph->delay;?>", + color: 'red', + pointStrokeColor: 'red', + pointHighlightStroke: 'red', + pointColor: 'red', + fillColor: 'rgba(0,106,241, .07)', + pointHighlightFill: '#fff', + data: + } + if(type.match('withdelay')) data.datasets.push(delaySets); + var burnChart = $("#burnCanvas").lineChart(data, { pointDotStrokeWidth: 2, From 2835c2a3e8168a26c1e21727f459ab48f64b94b5 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 13 May 2022 11:13:36 +0800 Subject: [PATCH 03/16] * Add testcase of block module. --- module/block/model.php | 21 ++++++----- test/class/block.class.php | 41 +++++++++++++++++----- test/model/block/getscrumproductparams.php | 4 +-- test/model/block/getscrumroadmapparams.php | 4 +-- test/model/block/getscrumtestparams.php | 4 +-- test/model/block/getstatisticparams.php | 19 ++++++++-- 6 files changed, 66 insertions(+), 27 deletions(-) diff --git a/module/block/model.php b/module/block/model.php index 25b7e2fc0b..33767b57d7 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -531,15 +531,16 @@ class blockModel extends model /** * Get statistic params. * + * @param string $module product|project|execution|qa * @access public * @return string */ public function getStatisticParams($module = 'product') { - if($module == 'product') return $this->getProductStatisticParams($module); - if($module == 'project') return $this->getProjectStatisticParams($module); - if($module == 'execution') return $this->getExecutionStatisticParams($module); - if($module == 'qa') return $this->getQaStatisticParams($module); + if($module == 'product') return $this->getProductStatisticParams(); + if($module == 'project') return $this->getProjectStatisticParams(); + if($module == 'execution') return $this->getExecutionStatisticParams(); + if($module == 'qa') return $this->getQaStatisticParams(); $params = new stdclass(); $params = $this->appendCountParams($params); @@ -876,12 +877,11 @@ class blockModel extends model /** * Get testtask params. - *▫ - * @param string $module + * * @access public - * @return void + * @return string */ - public function getScrumTestParams($module = '') + public function getScrumTestParams() { $params = $this->appendCountParams(); $params->type['name'] = $this->lang->block->type; @@ -923,11 +923,10 @@ class blockModel extends model /** * Get scrum roadmap list params. * - * @param string $module * @access public - * @return string + * @return bool */ - public function getScrumRoadMapParams($module = '') + public function getScrumRoadMapParams() { return false; } diff --git a/test/class/block.class.php b/test/class/block.class.php index 4e60bab388..b4949dbb05 100644 --- a/test/class/block.class.php +++ b/test/class/block.class.php @@ -301,13 +301,20 @@ class blockTest return $objects; } + /** + * Get statistic params. + * + * @param string $module product|project|execution|qa + * @access public + * @return string + */ public function getStatisticParamsTest($module = 'product') { - $objects = $this->objectModel->getStatisticParams($module = 'product'); + $objects = $this->objectModel->getStatisticParams($module); if(dao::isError()) return dao::getError(); - return $objects; + return json_encode(json_decode($objects), JSON_UNESCAPED_UNICODE); } public function getProductStatisticParamsTest() @@ -458,9 +465,15 @@ class blockTest return $objects; } - public function getScrumTestParamsTest($module = '') + /** + * Get testtask params. + * + * @access public + * @return string + */ + public function getScrumTestParamsTest() { - $objects = $this->objectModel->getScrumTestParams($module = ''); + $objects = json_decode($this->objectModel->getScrumTestParams()); if(dao::isError()) return dao::getError(); @@ -485,18 +498,30 @@ class blockTest return $objects; } - public function getScrumRoadMapParamsTest($module = '') + /** + * Get scrum roadmap list params. + * + * @access public + * @return string + */ + public function getScrumRoadMapParamsTest() { - $objects = $this->objectModel->getScrumRoadMapParams($module = ''); + $objects = $this->objectModel->getScrumRoadMapParams(); if(dao::isError()) return dao::getError(); return $objects; } - public function getScrumProductParamsTest($module = '') + /** + * Get scrum product list params. + * + * @access public + * @return string + */ + public function getScrumProductParamsTest() { - $objects = $this->objectModel->getScrumProductParams($module = ''); + $objects = json_decode($this->objectModel->getScrumProductParams()); if(dao::isError()) return dao::getError(); diff --git a/test/model/block/getscrumproductparams.php b/test/model/block/getscrumproductparams.php index c29c134c64..c90dc410fc 100755 --- a/test/model/block/getscrumproductparams.php +++ b/test/model/block/getscrumproductparams.php @@ -10,10 +10,10 @@ title=测试 blockModel->getScrumProductParams(); cid=1 pid=1 - +测试获取产品区块的参数 >> 数量;20;input */ $block = new blockTest(); -r($block->getScrumProductParamsTest()) && p() && e(); \ No newline at end of file +r($block->getScrumProductParamsTest()) && p('count:name;count:default;count:control') && e('数量;20;input'); // 测试获取产品区块的参数 diff --git a/test/model/block/getscrumroadmapparams.php b/test/model/block/getscrumroadmapparams.php index 5007f35a07..ae3b926dad 100755 --- a/test/model/block/getscrumroadmapparams.php +++ b/test/model/block/getscrumroadmapparams.php @@ -10,10 +10,10 @@ title=测试 blockModel->getScrumRoadMapParams(); cid=1 pid=1 - +测试获取产品路线图区块的参数 >> 0 */ $block = new blockTest(); -r($block->getScrumRoadMapParamsTest()) && p() && e(); \ No newline at end of file +r($block->getScrumRoadMapParamsTest()) && p() && e('0'); // 测试获取产品路线图区块的参数 diff --git a/test/model/block/getscrumtestparams.php b/test/model/block/getscrumtestparams.php index f2e9ca73d0..6414903188 100755 --- a/test/model/block/getscrumtestparams.php +++ b/test/model/block/getscrumtestparams.php @@ -10,10 +10,10 @@ title=测试 blockModel->getScrumTestParams(); cid=1 pid=1 - +测试获取测试单区块的参数 >> 数量;类型 */ $block = new blockTest(); -r($block->getScrumTestParamsTest()) && p() && e(); \ No newline at end of file +r($block->getScrumTestParamsTest()) && p('count:name;type:name') && e('数量;类型'); // 测试获取测试单区块的参数 diff --git a/test/model/block/getstatisticparams.php b/test/model/block/getstatisticparams.php index aec3ccbb16..4e9aa9b7e8 100755 --- a/test/model/block/getstatisticparams.php +++ b/test/model/block/getstatisticparams.php @@ -10,10 +10,25 @@ title=测试 blockModel->getStatisticParams(); cid=1 pid=1 - +获取空区块的参数 >> {"count":{"name":"数量","default":20,"control":"input"}} +获取产品区块的参数 >> {"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"noclosed":"未关闭","closed":"已关闭","all":"全部","involved":"我参与"},"control":"select"}} +获取项目区块的参数 >> {"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"undone":"未完成","doing":"进行中","all":"全部","involved":"我参与的"},"control":"select"}} +获取执行区块的参数 >> {"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"undone":"未完成","doing":"进行中","all":"所有","involved":"我参与"},"control":"select"}} +获取测试区块的参数 >> {"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"noclosed":"未关闭","closed":"已关闭","all":"全部","involved":"我参与"},"control":"select"}} */ $block = new blockTest(); -r($block->getStatisticParamsTest()) && p() && e(); \ No newline at end of file +$data = array(); +$data[0] = $block->getStatisticParamsTest(''); +$data[1] = $block->getStatisticParamsTest('product'); +$data[2] = $block->getStatisticParamsTest('project'); +$data[3] = $block->getStatisticParamsTest('execution'); +$data[4] = $block->getStatisticParamsTest('qa'); + +r($data[0]) && p() && e('{"count":{"name":"数量","default":20,"control":"input"}}'); // 获取空区块的参数 +r($data[1]) && p() && e('{"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"noclosed":"未关闭","closed":"已关闭","all":"全部","involved":"我参与"},"control":"select"}}'); // 获取产品区块的参数 +r($data[2]) && p() && e('{"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"undone":"未完成","doing":"进行中","all":"全部","involved":"我参与的"},"control":"select"}}'); // 获取项目区块的参数 +r($data[3]) && p() && e('{"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"undone":"未完成","doing":"进行中","all":"所有","involved":"我参与"},"control":"select"}}'); // 获取执行区块的参数 +r($data[4]) && p() && e('{"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"noclosed":"未关闭","closed":"已关闭","all":"全部","involved":"我参与"},"control":"select"}}'); // 获取测试区块的参数 From bd8fb230d194cbed9f3c8cd5e67367432b1d306e Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 13 May 2022 11:55:05 +0800 Subject: [PATCH 04/16] * Fix bug#22409. --- module/execution/model.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index dde01e78e1..ce7cdefac5 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -475,6 +475,8 @@ class executionModel extends model ->setIF(helper::isZeroDate($this->post->begin), 'begin', '') ->setIF(helper::isZeroDate($this->post->end), 'end', '') ->setIF(!isset($_POST['whitelist']), 'whitelist', '') + ->setIF($this->post->status == 'closed', 'closedDate', helper::now()) + ->setIF($this->post->status == 'suspended', 'suspendedDate', helper::today()) ->setDefault('team', $this->post->name) ->join('whitelist', ',') ->stripTags($this->config->execution->editor->edit['id'], $this->config->allowedTags) @@ -664,6 +666,8 @@ class executionModel extends model $executions[$executionID]->lastEditedDate = helper::now(); if(isset($data->projects)) $executions[$executionID]->project = zget($data->projects, $executionID, 0); if(isset($data->attributes)) $executions[$executionID]->attribute = zget($data->attributes, $executionID, ''); + if($executions[$executionID]->status == 'closed') $executions[$executionID]->closedDate = helper::now(); + if($executions[$executionID]->status == 'suspended') $executions[$executionID]->suspendedDate = helper::today(); /* Check unique code for edited executions. */ if($projectModel == 'scrum' and empty($executionCode)) @@ -700,10 +704,16 @@ class executionModel extends model } } + /* Update burn before close execution. */ + $closedIDList = array(); foreach($executions as $executionID => $execution) { - if(isset($execution->status) and in_array($execution->status, array('done', 'closed', 'suspended'))) $this->computeBurn($executionID); + if(isset($execution->status) and in_array($execution->status, array('done', 'closed', 'suspended'))) $closedIDList[$executionID] = $executionID; + } + $this->computeBurn($closedIDList); + foreach($executions as $executionID => $execution) + { $oldExecution = $oldExecutions[$executionID]; $team = $this->loadModel('user')->getTeamMemberPairs($executionID, 'execution'); $projectID = isset($execution->project) ? $execution->project : $oldExecution->project; @@ -2843,7 +2853,7 @@ class executionModel extends model ->where('type')->in('sprint,stage') ->andWhere('lifetime')->ne('ops') ->andWhere('status')->notin('done,closed,suspended') - ->beginIF($executionID)->andWhere('id')->eq($executionID)->fi() + ->beginIF($executionID)->andWhere('id')->in($executionID)->fi() ->fetchPairs(); if(!$executions) return array(); From 7e2ee4fcdd392a7e156a371390c3b0769b48a1c0 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 13 May 2022 11:56:46 +0800 Subject: [PATCH 05/16] * Fix bug#22487. --- module/execution/lang/en.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 8b2a97e1ac..a653f8e02b 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -359,7 +359,7 @@ $lang->execution->linkStory = 'Link Story'; $lang->execution->createTask = 'Create Task'; $lang->execution->goback = "Go Back"; $lang->execution->noweekend = 'Exclude Weekend'; -$lang->execution->nowdelay = 'Exclude Delay Date'; +$lang->execution->nodelay = 'Exclude Delay Date'; $lang->execution->withweekend = 'Include Weekend'; $lang->execution->withdelay = 'Include Delay Date'; $lang->execution->interval = 'Intervals '; From 3dc56ad3e2302e67073c36764a9c255bb9dad51b Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 13 May 2022 09:23:46 +0000 Subject: [PATCH 06/16] * Program getlist method unit --- test/class/program.class.php | 10 +++++++--- test/model/program/getlist.php | 19 +++++++++++++++---- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/test/class/program.class.php b/test/class/program.class.php index de87cfb82b..a9f3ef6315 100644 --- a/test/class/program.class.php +++ b/test/class/program.class.php @@ -20,7 +20,7 @@ class programTest * * @param array $data * @access public - * @return object + * @return object */ public function create($data) { @@ -54,13 +54,17 @@ class programTest * Test get list. * * @param mixed $status + * @param string $orderBy + * @param object $pager + * @param string $type top|child + * @param mixed $idList * @access public * @return void */ - public function getList($status = 'all', $orderBy = 'id_asc', $pager = NULL) + public function getList($status = 'all', $orderBy = 'id_asc', $pager = NULL, $type = '', $idList = '') { $this->program->cookie->showClosed = 'ture'; - $programs = $this->program->getList($status, $orderBy, $pager); + $programs = $this->program->getList($status, $orderBy, $pager, $type, $idList); if(dao::isError()) return array('message' => dao::getError()); diff --git a/test/model/program/getlist.php b/test/model/program/getlist.php index 443127d20d..61025258fa 100755 --- a/test/model/program/getlist.php +++ b/test/model/program/getlist.php @@ -2,6 +2,7 @@ > 100 -查看所有'wait'的项目和项目集的个数 >> 34 -查看所有'doing'的项目和项目集的个数 >> 44 +查看所有项目和项目集的个数 >> 120 +查看分页后项目集和项目的个数 >> 10 +查看所有'closed'的项目和项目集的个数 >> 11 查看所有'suspended'的项目和项目集的个数 >> 11 -查看所有'closed'的项目和项目集的个数 >> 11 +按照项目和项目集名称倒序获取第一个ID >> 9 +按照ID正序获取项目和项目集列表第一个ID >> 1 +获取顶级项目集个数 >> 30 +获取分页后顶级项目集个数 >> 10 +获取type=child 项目集个数 >> 120 */ @@ -28,6 +33,9 @@ $closedPrograms = $program->getList('closed'); $suspendedPrograms = $program->getList('closed'); $namedescPrograms = $program->getList('all', 'name_desc'); $idascPrograms = $program->getList('all', 'id_asc'); +$topPrograms = $program->getList('all', 'id_asc', null, 'top'); +$topPagePrograms = $program->getList('all', 'id_asc', $pager, 'top'); +$childPrograms = $program->getList('all', 'id_asc', null, 'child', $topPrograms); r(count($allPorgrams)) && p() && e('120'); // 查看所有项目和项目集的个数 r(count($pagerPrograms)) && p() && e('10'); // 查看分页后项目集和项目的个数 @@ -35,3 +43,6 @@ r(count($closedPrograms)) && p() && e('11'); // 查看所有'closed'的项 r(count($suspendedPrograms)) && p() && e('11'); // 查看所有'suspended'的项目和项目集的个数 r(key($namedescPrograms)) && p() && e('9'); // 按照项目和项目集名称倒序获取第一个ID r(key($idascPrograms)) && p() && e('1'); // 按照ID正序获取项目和项目集列表第一个ID +r(count($topPrograms)) && p() && e('30'); // 获取顶级项目集个数 +r(count($topPagePrograms)) && p() && e('10'); // 获取分页后顶级项目集个数 +r(count($childPrograms)) && p() && e('120'); // 获取分页后顶级项目集个数 From ad49931b1db43d612470a6abf089fd9582ce3867 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 13 May 2022 22:32:17 +0800 Subject: [PATCH 07/16] * Add testcase of block module. --- module/block/model.php | 3 ++- test/class/block.class.php | 23 +++++++++++++++-- test/model/block/initblock.php | 46 ++++++++++++++++++++++++++++++++-- 3 files changed, 67 insertions(+), 5 deletions(-) diff --git a/module/block/model.php b/module/block/model.php index 33767b57d7..c676ecb089 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -232,7 +232,8 @@ class blockModel extends model /** * Init block when account use first. * - * @param string $appName + * @param string $module project|product|execution|qa|my + * @param string $type scrum|waterfall|kanban * @access public * @return bool */ diff --git a/test/class/block.class.php b/test/class/block.class.php index b4949dbb05..b433d2716b 100644 --- a/test/class/block.class.php +++ b/test/class/block.class.php @@ -112,13 +112,32 @@ class blockTest return $objects; } + /** + * Init block when account use first. + * + * @param string $module project|product|execution|qa|my + * @param string $type scrum|waterfall|kanban + * @access public + * @return bool + */ public function initBlockTest($module, $type = '') { - $objects = $this->objectModel->initBlock($module, $type = ''); + global $tester; + $this->objectModel->initBlock($module, $type); if(dao::isError()) return dao::getError(); - return $objects; + $object = new stdclass(); + $account = $tester->app->user->account; + $section = $module == 'project' ? $type . 'common' : 'common'; + + $object->blockInited = $tester->loadModel('setting')->getItem("owner=$account&module=$module§ion=$section&key=blockInited"); + $object->blockversion = $tester->loadModel('setting')->getItem("owner=$account&module=$module§ion=block&key=initVersion"); + + $blockData = $this->objectModel->getBlockList($module, $type); + $object->blockData = current($blockData); + + return $object; } /** diff --git a/test/model/block/initblock.php b/test/model/block/initblock.php index 4ff906feca..f50d76795f 100755 --- a/test/model/block/initblock.php +++ b/test/model/block/initblock.php @@ -10,10 +10,52 @@ title=测试 blockModel->initBlock(); cid=1 pid=1 - +获取敏捷项目的区块版本 >> 1;2 +获取敏捷项目的区块数据 >> project;scrum +获取瀑布项目的区块版本 >> 1;2 +获取瀑布项目的区块数据 >> project;waterfall +获取看板项目的区块版本 >> 1;2 +获取看板项目的区块数据 >> project;kanban +获取产品的区块版本 >> 1;2 +获取产品的区块数据 >> product; +获取执行的区块版本 >> 1;2 +获取执行的区块数据 >> execution; +获取地盘的区块版本 >> 1;2 +获取地盘的区块数据 >> my; +获取测试的区块版本 >> 1;2 +获取测试的区块数据 >> qa; +获取空区块版本 >> 1;2 +获取空区块数据 >> 0 */ $block = new blockTest(); -r($block->initBlockTest()) && p() && e(); \ No newline at end of file +$dataList = array(); +$dataList[0] = $block->initBlockTest('project', 'scrum'); +$dataList[1] = $block->initBlockTest('project', 'waterfall'); +$dataList[2] = $block->initBlockTest('project', 'kanban'); +$dataList[3] = $block->initBlockTest('product'); +$dataList[4] = $block->initBlockTest('execution'); +$dataList[5] = $block->initBlockTest('my'); +$dataList[6] = $block->initBlockTest('qa'); +$dataList[7] = $block->initBlockTest(''); + +r($dataList[0]) && p("blockInited;blockversion") && e('1;2'); // 获取敏捷项目的区块版本 +r($dataList[0]) && p("blockData:module;blockData:type") && e('project;scrum'); // 获取敏捷项目的区块数据 +r($dataList[1]) && p("blockInited;blockversion") && e('1;2'); // 获取瀑布项目的区块版本 +r($dataList[1]) && p("blockData:module;blockData:type") && e('project;waterfall'); // 获取瀑布项目的区块数据 +r($dataList[2]) && p("blockInited;blockversion") && e('1;2'); // 获取看板项目的区块版本 +r($dataList[2]) && p("blockData:module;blockData:type") && e('project;kanban'); // 获取看板项目的区块数据 +r($dataList[3]) && p("blockInited;blockversion") && e('1;2'); // 获取产品的区块版本 +r($dataList[3]) && p("blockData:module;blockData:type") && e('product;'); // 获取产品的区块数据 +r($dataList[4]) && p("blockInited;blockversion") && e('1;2'); // 获取执行的区块版本 +r($dataList[4]) && p("blockData:module;blockData:type") && e('execution;'); // 获取执行的区块数据 +r($dataList[5]) && p("blockInited;blockversion") && e('1;2'); // 获取地盘的区块版本 +r($dataList[5]) && p("blockData:module;blockData:type") && e('my;'); // 获取地盘的区块数据 +r($dataList[6]) && p("blockInited;blockversion") && e('1;2'); // 获取测试的区块版本 +r($dataList[6]) && p("blockData:module;blockData:type") && e('qa;'); // 获取测试的区块数据 +r($dataList[7]) && p("blockInited;blockversion") && e('1;2'); // 获取空区块版本 +r($dataList[7]) && p("blockData") && e('0'); // 获取空区块数据 + +system("./ztest init"); From b2c5366ee56e7acd6bab5ef6f384e9619fb2e34b Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Sat, 14 May 2022 04:47:58 +0800 Subject: [PATCH 08/16] * Add unit test of search module. --- test/class/search.class.php | 149 ++++++++++++++++++---------- test/model/search/appendfiles.php | 17 ---- test/model/search/buildallindex.php | 17 ---- test/model/search/checkpriv.php | 17 ---- test/model/search/decode.php | 2 +- test/model/search/deleteindex.php | 17 ---- test/model/search/getlist.php | 2 +- test/model/search/getsummary.php | 4 +- test/model/search/markkeywords.php | 2 +- 9 files changed, 101 insertions(+), 126 deletions(-) delete mode 100644 test/model/search/appendfiles.php delete mode 100644 test/model/search/buildallindex.php delete mode 100644 test/model/search/checkpriv.php delete mode 100644 test/model/search/deleteindex.php diff --git a/test/class/search.class.php b/test/class/search.class.php index 8d69fbd912..9021e13d66 100644 --- a/test/class/search.class.php +++ b/test/class/search.class.php @@ -12,7 +12,7 @@ class searchTest * * @param int $queryID * @access public - * @return void + * @return array */ public function getQueryTest($queryID) { @@ -37,7 +37,7 @@ class searchTest * * @param int $queryID * @access public - * @return void + * @return array */ public function getByIDTest($queryID) { @@ -53,7 +53,7 @@ class searchTest * * @param int $queryID * @access public - * @return void + * @return int */ public function deleteQueryTest($queryID) { @@ -69,9 +69,9 @@ class searchTest /** * Test get query pairs. * - * @param int $module + * @param string $module * @access public - * @return void + * @return array */ public function getQueryPairsTest($module) { @@ -85,10 +85,10 @@ class searchTest /** * Test get list. * - * @param int $keywords - * @param int $type + * @param string $keywords + * @param sreing $type * @access public - * @return void + * @return int */ public function getListTest($keywords, $type) { @@ -119,10 +119,10 @@ class searchTest /** * Test save index. * - * @param int $objectType + * @param string $objectType * @param int $objectID * @access public - * @return void + * @return bool */ public function saveIndexTest($objectType, $objectID) { @@ -150,7 +150,7 @@ class searchTest * * @param string $word * @access public - * @return void + * @return int */ public function saveDictTest($word) { @@ -171,69 +171,110 @@ class searchTest /** * Test decode. * - * @param int $string + * @param int $key * @access public - * @return void + * @return string */ - public function decodeTest($string) + public function decodeTest($key) { - $objects = $this->objectModel->decode($string); + global $tester; + $tester->dao->delete()->from(TABLE_SEARCHINDEX)->exec(); + $tester->dao->delete()->from(TABLE_SEARCHDICT)->exec(); + $result = array(); + while(!isset($result['finished'])) + { + if(empty($result)) + { + $result = $this->objectModel->buildAllIndex(); + } + else + { + $result = $this->objectModel->buildAllIndex($result['type'], $result['lastID']); + } + } + + $objects = $this->objectModel->decode($key); if(dao::isError()) return dao::getError(); + $tester->dao->delete()->from(TABLE_SEARCHINDEX)->exec(); + $tester->dao->delete()->from(TABLE_SEARCHDICT)->exec(); + return $objects; } - public function getSummaryTest($content, $words) + /** + * Test get summary. + * + * @param int $indexID + * @param string $words + * @access public + * @return array + */ + public function getSummaryTest($indexID, $words) { - $objects = $this->objectModel->getSummary($content, $words); + global $tester; + $tester->dao->delete()->from(TABLE_SEARCHINDEX)->exec(); + $tester->dao->delete()->from(TABLE_SEARCHDICT)->exec(); + $result = array(); + while(!isset($result['finished'])) + { + if(empty($result)) + { + $result = $this->objectModel->buildAllIndex(); + } + else + { + $result = $this->objectModel->buildAllIndex($result['type'], $result['lastID']); + } + } + + $searchIndex = $tester->dao->select('*')->from(TABLE_SEARCHINDEX)->where('id')->eq($indexID)->fetch(); + + $objects = $this->objectModel->getSummary($searchIndex->content, $words); if(dao::isError()) return dao::getError(); + $tester->dao->delete()->from(TABLE_SEARCHINDEX)->exec(); + $tester->dao->delete()->from(TABLE_SEARCHDICT)->exec(); + return $objects; } - public function checkPrivTest($results) + /** + * Test mark keywords. + * + * @param int $indexID + * @param string $keywords + * @access public + * @return string + */ + public function markKeywordsTest($indexID, $keywords) { - $objects = $this->objectModel->checkPriv($results); + global $tester; + $tester->dao->delete()->from(TABLE_SEARCHINDEX)->exec(); + $tester->dao->delete()->from(TABLE_SEARCHDICT)->exec(); + $result = array(); + while(!isset($result['finished'])) + { + if(empty($result)) + { + $result = $this->objectModel->buildAllIndex(); + } + else + { + $result = $this->objectModel->buildAllIndex($result['type'], $result['lastID']); + } + } + + $searchIndex = $tester->dao->select('*')->from(TABLE_SEARCHINDEX)->where('id')->eq($indexID)->fetch(); + + $objects = $this->objectModel->markKeywords($searchIndex->content, $keywords); if(dao::isError()) return dao::getError(); - return $objects; - } - - public function markKeywordsTest($content, $keywords) - { - $objects = $this->objectModel->markKeywords($content, $keywords); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function buildAllIndexTest($type = '', $lastID = 0) - { - $objects = $this->objectModel->buildAllIndex($type = '', $lastID = 0); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function deleteIndexTest($objectType, $objectID) - { - $objects = $this->objectModel->deleteIndex($objectType, $objectID); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function appendFilesTest($object) - { - $objects = $this->objectModel->appendFiles($object); - - if(dao::isError()) return dao::getError(); + $tester->dao->delete()->from(TABLE_SEARCHINDEX)->exec(); + $tester->dao->delete()->from(TABLE_SEARCHDICT)->exec(); return $objects; } diff --git a/test/model/search/appendfiles.php b/test/model/search/appendfiles.php deleted file mode 100644 index 055bf09795..0000000000 --- a/test/model/search/appendfiles.php +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env php -appendFiles(); -cid=1 -pid=1 - -*/ - -$search = new searchTest(); - -r($search->appendFilesTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/search/buildallindex.php b/test/model/search/buildallindex.php deleted file mode 100644 index f59d4dd5e1..0000000000 --- a/test/model/search/buildallindex.php +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env php -buildAllIndex(); -cid=1 -pid=1 - -*/ - -$search = new searchTest(); - -r($search->buildAllIndexTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/search/checkpriv.php b/test/model/search/checkpriv.php deleted file mode 100644 index 5a66bcc5a6..0000000000 --- a/test/model/search/checkpriv.php +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env php -checkPriv(); -cid=1 -pid=1 - -*/ - -$search = new searchTest(); - -r($search->checkPrivTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/search/decode.php b/test/model/search/decode.php index 0fbb8e4263..0dc37300f0 100644 --- a/test/model/search/decode.php +++ b/test/model/search/decode.php @@ -14,4 +14,4 @@ pid=1 $search = new searchTest(); -r($search->decodeTest()) && p() && e(); \ No newline at end of file +r($search->decodeTest(20135)) && p() && e('产'); //测试将搜索字转化为正确的汉字 diff --git a/test/model/search/deleteindex.php b/test/model/search/deleteindex.php deleted file mode 100644 index b670de8411..0000000000 --- a/test/model/search/deleteindex.php +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env php -deleteIndex(); -cid=1 -pid=1 - -*/ - -$search = new searchTest(); - -r($search->deleteIndexTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/search/getlist.php b/test/model/search/getlist.php index ee23e709b3..2b3a9704d0 100644 --- a/test/model/search/getlist.php +++ b/test/model/search/getlist.php @@ -39,7 +39,7 @@ $searchWords = array('任务','bug','用例','文档','待办','版本','用例 r($search->getListTest($searchWords[0], $searchType[0])) && p() && e('1246'); //测试在全部类型中搜索带有任务字体的条数 r($search->getListTest($searchWords[0], $searchType[1])) && p() && e('910'); //测试在任务类型中搜索带有任务字体的条数 r($search->getListTest($searchWords[1], $searchType[2])) && p() && e('239'); //测试在bug类型中搜索带有bug字体的条数 -r($search->getListTest($searchWords[2], $searchType[3])) && p() && e('208'); //测试在用例类型中搜索带有用例字体的条数 +r($search->getListTest($searchWords[2], $searchType[3])) && p() && e('97'); //测试在用例类型中搜索带有用例字体的条数 r($search->getListTest($searchWords[3], $searchType[4])) && p() && e('900'); //测试在文档类型中搜索带有文档字体的条数 r($search->getListTest($searchWords[4], $searchType[5])) && p() && e('1680'); //测试在待办类型中搜索带有待办字体的条数 r($search->getListTest($searchWords[5], $searchType[6])) && p() && e('20'); //测试在版本类型中搜索带有版本字体的条数 diff --git a/test/model/search/getsummary.php b/test/model/search/getsummary.php index 3cfe9a3d01..69f5c8bd9d 100644 --- a/test/model/search/getsummary.php +++ b/test/model/search/getsummary.php @@ -14,4 +14,6 @@ pid=1 $search = new searchTest(); -r($search->getSummaryTest()) && p() && e(); \ No newline at end of file +r($search->getSummaryTest(1, 0)) && p() && e('【步骤】【结果】【期望】'); //测试搜索的内容中不带关键字的结果展示 +r($search->getSummaryTest(1, 39588)) && p() && e("【步骤 】【结果】【期望】"); //测试搜索的内容中带关键字的结果展示 + diff --git a/test/model/search/markkeywords.php b/test/model/search/markkeywords.php index 470a4b15a0..2f56d24da3 100644 --- a/test/model/search/markkeywords.php +++ b/test/model/search/markkeywords.php @@ -14,4 +14,4 @@ pid=1 $search = new searchTest(); -r($search->markKeywordsTest()) && p() && e(); \ No newline at end of file +r($search->markKeywordsTest(1, 39588)) && p() && e("12304 27493 骤 12305 12304 32467 26524 12305 12304 26399 26395 12305"); //测试查找带骤字的bug From 8c505682137abad3ac155e813e571bc6457d192f Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Sun, 15 May 2022 21:28:31 +0800 Subject: [PATCH 09/16] * Restore the code of task#53671. --- module/execution/model.php | 58 +--------------------- module/execution/view/computeburn.html.php | 7 +-- 2 files changed, 3 insertions(+), 62 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index ce7cdefac5..0d301e8dad 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2857,61 +2857,6 @@ class executionModel extends model ->fetchPairs(); if(!$executions) return array(); - /* Update historical data of burn. */ - $table = $this->config->edition == 'open' ? TABLE_TASKESTIMATE : TABLE_EFFORT; - $field = $this->config->edition == 'open' ? 'task' : 'objectID'; - $totalConsumed = $this->dao->select("t2.execution as execution, t1.$field as task, t1.date as date, sum(t1.consumed) as totalConsumed")->from($table)->alias('t1') - ->leftJoin(TABLE_TASK)->alias('t2')->on("t1.$field=t2.id") - ->where('t2.execution')->in(array_keys($executions)) - ->beginIF($this->config->edition != 'open')->andWhere('t1.objectType')->eq('task')->fi() - ->andWhere('t2.deleted')->eq('0') - ->andWhere('t2.parent')->ge('0') - ->andWhere('t2.status')->ne('cancel') - ->andWhere('t1.date')->ne($today) - ->groupBy("t1.$field, t1.date") - ->orderBy('t1.id_desc') - ->fetchGroup('task', 'date'); - - $latestIdList = $this->dao->select('max(id) as id')->from($table) - ->where($field)->in(array_keys($totalConsumed)) - ->beginIF($this->config->edition != 'open')->andWhere('objectType')->eq('task')->fi() - ->groupBy("$field,date")->fetchAll('id'); - $latestLefts = $this->dao->select("$field, date, `left`")->from($table) - ->where('id')->in(array_keys($latestIdList)) - ->fetchGroup($field, 'date'); - - $burnList = array(); - foreach($totalConsumed as $taskID => $consumedList) - { - foreach($consumedList as $date => $consumed) - { - $executionID = $consumed->execution; - if(!isset($burnList[$executionID])) $burnList[$executionID] = array(); - - if(!isset($burnList[$executionID][$date])) - { - $burnList[$executionID][$date] = new stdclass(); - $burnList[$executionID][$date]->consumed = 0; - $burnList[$executionID][$date]->left = 0; - } - - $burnList[$executionID][$date]->consumed += $consumed->totalConsumed; - $burnList[$executionID][$date]->left += $latestLefts[$taskID][$date]->left; - } - } - - foreach($burnList as $executionID => $burns) - { - foreach($burns as $date => $burn) - { - $burn->execution = $executionID; - $burn->date = $date; - - $this->dao->replace(TABLE_BURN)->data($burn)->exec(); - $burn->executionName = $executions[$burn->execution]; - } - } - /* Update today's data of burn. */ $burns = $this->dao->select("execution, '$today' AS date, sum(estimate) AS `estimate`, sum(`left`) AS `left`, SUM(consumed) AS `consumed`") ->from(TABLE_TASK) @@ -2965,10 +2910,9 @@ class executionModel extends model $this->dao->replace(TABLE_BURN)->data($burn)->exec(); $burn->executionName = $executions[$burn->execution]; - $burnList[$executionID][$today] = $burn; } - return $burnList; + return $burns; } /** diff --git a/module/execution/view/computeburn.html.php b/module/execution/view/computeburn.html.php index 8cbbbff589..ea9ea7d339 100644 --- a/module/execution/view/computeburn.html.php +++ b/module/execution/view/computeburn.html.php @@ -11,11 +11,8 @@ */ ?> $burnList) +foreach($burns as $burn) { - foreach($burnList as $date => $burn) - { - echo $burn->execution . "\t" . $burn->executionName . "\t" . $burn->date . "\t" . $burn->left . "\n"; - } + echo $burn->execution . "\t" . $burn->executionName . "\t" . $burn->date . "\t" . $burn->left . "\n"; } ?> From 235c9b071feed755f1222c16aa40e26c30da59e9 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 16 May 2022 08:28:28 +0800 Subject: [PATCH 10/16] * Fix bug for update. --- module/upgrade/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 5dc35483fa..e1017434f4 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -6106,7 +6106,7 @@ class upgradeModel extends model $content = file_get_contents($filePath); if(strpos(basename($filePath), 'html')) { - $content = preg_replace('#(include )(\'|")((../){2,})([a-z]+/)(?!ext/)([a-z]+/)#', '$1' . '$app->getModuleRoot() . ' . '"$5$6', $content); + $content = preg_replace('#(include )(\'|")((../){2,})([a-z]+/)(?!ext/)([a-z]+/)#', '$1' . '$app->getModuleRoot() . ' . '$2$5$6', $content); $systemFiles = file_get_contents('systemfiles.txt'); $systemFiles = str_replace('/', DS, $systemFiles); From e1307f1dc71d72208d5c81635361914802300bf6 Mon Sep 17 00:00:00 2001 From: zenggang Date: Mon, 16 May 2022 00:36:40 +0000 Subject: [PATCH 11/16] * Adjust code --- test/model/program/getlist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/model/program/getlist.php b/test/model/program/getlist.php index 61025258fa..eed70377c7 100755 --- a/test/model/program/getlist.php +++ b/test/model/program/getlist.php @@ -35,7 +35,7 @@ $namedescPrograms = $program->getList('all', 'name_desc'); $idascPrograms = $program->getList('all', 'id_asc'); $topPrograms = $program->getList('all', 'id_asc', null, 'top'); $topPagePrograms = $program->getList('all', 'id_asc', $pager, 'top'); -$childPrograms = $program->getList('all', 'id_asc', null, 'child', $topPrograms); +$childPrograms = $program->getList('all', 'id_asc', null, 'child', $topPrograms); r(count($allPorgrams)) && p() && e('120'); // 查看所有项目和项目集的个数 r(count($pagerPrograms)) && p() && e('10'); // 查看分页后项目集和项目的个数 From 24e2138aef1d71ce1441ed948eec1fb45468386a Mon Sep 17 00:00:00 2001 From: zhouxin Date: Mon, 16 May 2022 00:46:04 +0000 Subject: [PATCH 12/16] Add testcase. --- test/class/block.class.php | 12 ++++++++---- test/model/block/getqastatisticparams.php | 3 ++- test/model/block/getrecentprojectparams.php | 19 ------------------- test/model/block/getreleaseparams.php | 2 +- test/model/block/getscrumlistparams.php | 6 +++++- 5 files changed, 16 insertions(+), 26 deletions(-) delete mode 100755 test/model/block/getrecentprojectparams.php diff --git a/test/class/block.class.php b/test/class/block.class.php index 673575a26c..310bc9512c 100644 --- a/test/class/block.class.php +++ b/test/class/block.class.php @@ -287,7 +287,9 @@ class blockTest if(dao::isError()) return dao::getError(); - return $objects; + $objects = json_decode($objects); + + return $objects->count; } public function getProjectParamsTest() @@ -402,11 +404,11 @@ class blockTest public function getQaStatisticParamsTest() { - $objects = $this->objectModel->getQaStatisticParams(); + $object = $this->objectModel->getQaStatisticParams(); if(dao::isError()) return dao::getError(); - return $objects; + return json_decode($object); } public function getRecentProjectParamsTest() @@ -574,7 +576,9 @@ class blockTest if(dao::isError()) return dao::getError(); - return $objects; + $objects = json_decode($objects); + + return $objects->type; } public function getScrumOverviewParamsTest($module = '') diff --git a/test/model/block/getqastatisticparams.php b/test/model/block/getqastatisticparams.php index 280c2e7981..e3567adbb4 100755 --- a/test/model/block/getqastatisticparams.php +++ b/test/model/block/getqastatisticparams.php @@ -16,4 +16,5 @@ pid=1 $block = new blockTest(); -r($block->getQaStatisticParamsTest()) && p() && e(); \ No newline at end of file +r($block->getQaStatisticParamsTest()) && p('type:name') && e('类型'); //测试name +r($block->getQaStatisticParamsTest()) && p('type:control') && e('select');//测试control diff --git a/test/model/block/getrecentprojectparams.php b/test/model/block/getrecentprojectparams.php deleted file mode 100755 index 60b18810b3..0000000000 --- a/test/model/block/getrecentprojectparams.php +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env php -getRecentProjectParams(); -cid=1 -pid=1 - - - -*/ - -$block = new blockTest(); - -r($block->getRecentProjectParamsTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/block/getreleaseparams.php b/test/model/block/getreleaseparams.php index 03cd0771f3..af48613636 100755 --- a/test/model/block/getreleaseparams.php +++ b/test/model/block/getreleaseparams.php @@ -16,4 +16,4 @@ pid=1 $block = new blockTest(); -r($block->getReleaseParamsTest()) && p() && e(); \ No newline at end of file +r($block->getReleaseParamsTest()) && p('name,default,control') && e('数量,20,input'); //测试name diff --git a/test/model/block/getscrumlistparams.php b/test/model/block/getscrumlistparams.php index b113738a27..d6469a1283 100755 --- a/test/model/block/getscrumlistparams.php +++ b/test/model/block/getscrumlistparams.php @@ -16,4 +16,8 @@ pid=1 $block = new blockTest(); -r($block->getScrumListParamsTest()) && p() && e(); \ No newline at end of file +r($block->getScrumListParamsTest()) && p('name,control') && e('类型,select'); //测试name和select +r($block->getScrumListParamsTest()) && p('options:undone') && e('未完成'); //测试options +r($block->getScrumListParamsTest()) && p('options:doing') && e('进行中'); //测试options +r($block->getScrumListParamsTest()) && p('options:all') && e('全部'); //测试options +r($block->getScrumListParamsTest()) && p('options:involved') && e('我参与'); //测试options From 9556bc3e9b27c8472e994c9117a627e73c4b560c Mon Sep 17 00:00:00 2001 From: zhouxin Date: Mon, 16 May 2022 00:51:58 +0000 Subject: [PATCH 13/16] Adjust code. --- test/model/block/getreleaseparams.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/model/block/getreleaseparams.php b/test/model/block/getreleaseparams.php index af48613636..a88bbaff46 100755 --- a/test/model/block/getreleaseparams.php +++ b/test/model/block/getreleaseparams.php @@ -16,4 +16,4 @@ pid=1 $block = new blockTest(); -r($block->getReleaseParamsTest()) && p('name,default,control') && e('数量,20,input'); //测试name +r($block->getReleaseParamsTest()) && p('name,default,control') && e('数量,20,input'); //测试name From 5b20d429b415eb283a7df5a6614221b9b9fe7303 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 16 May 2022 09:03:13 +0800 Subject: [PATCH 14/16] * Fix the bug of login failed. --- module/common/view/header.lite.html.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/common/view/header.lite.html.php b/module/common/view/header.lite.html.php index ae2508f2cd..560f800007 100755 --- a/module/common/view/header.lite.html.php +++ b/module/common/view/header.lite.html.php @@ -16,7 +16,6 @@ $onlybody = zget($_GET, 'onlybody', 'no'); - zentaoPMS); js::exportConfigVars(); From aaea60f6adaa55a5085d686d510f7de74cefd4f9 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 16 May 2022 09:13:18 +0800 Subject: [PATCH 15/16] * Fix bug #22489. --- module/story/model.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 822dfc0087..fece63d49f 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1588,10 +1588,15 @@ class storyModel extends model /* Update parent story status and stage. */ if($oldStory->parent > 0) { + $this->updateParentStatus($storyID, $oldStory->parent); $this->setStage($oldStory->parent); } - if(!dao::isError()) $this->loadModel('score')->create('story', 'close', $storyID); + if(!dao::isError()) + { + $this->setStage($storyID); + $this->loadModel('score')->create('story', 'close', $storyID); + } return common::createChanges($oldStory, $story); } From bc694cb2f45ea2177c29f6d6b7ed2961b9c54ec5 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 16 May 2022 09:24:58 +0800 Subject: [PATCH 16/16] * Delete extra blank lines. --- module/story/model.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index fece63d49f..40de139460 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1588,7 +1588,6 @@ class storyModel extends model /* Update parent story status and stage. */ if($oldStory->parent > 0) { - $this->updateParentStatus($storyID, $oldStory->parent); $this->setStage($oldStory->parent); }