From 502e3db733bd96876f3c776d47a93d6b0596617e Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 30 Jun 2022 08:35:22 +0000 Subject: [PATCH 1/7] * Iframe and disable will be invalid. --- module/search/view/buildform.html.php | 7 +++++-- module/task/js/batchcreate.js | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index 9a1ecc4516..482db3d259 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -284,8 +284,11 @@ function executeQuery(queryID) $(function() { - if(!canSaveQuery) $('.btn-save-form').attr('disabled', 'disabled'); - + if(!canSaveQuery) + { + $('.btn-save-form').attr('disabled', 'disabled'); + $('.btn-save-form').css('pointer-events', 'none'); + } var $searchForm = $('#'); $searchForm.find('select.chosen').chosen().on('chosen:showing_dropdown', function() { diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index b98330264c..cccca95207 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -136,12 +136,14 @@ function setPreview(num) storyLink = storyLink + concat + 'onlybody=yes'; } $('#preview' + num).removeAttr('disabled'); + $('#preview' + num).modalTrigger({type:'iframe'}); $('#preview' + num).attr('href', storyLink); } else { storyLink = '#'; $('#preview' + num).attr('disabled', true); + $('#preview' + num).css('pointer-events', 'none'); $('#preview' + num).attr('href', storyLink); } } From cc8c52ae8db643dd774691d522519b9882078938 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 30 Jun 2022 16:44:18 +0800 Subject: [PATCH 2/7] * Fix bug #24611. --- module/bug/control.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/bug/control.php b/module/bug/control.php index 9d14a7a01c..5b8fa4fcf7 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -2259,6 +2259,13 @@ class bug extends control $bug->steps = str_replace(' ', ' ', $bug->steps); } + $bug->openedDate = !helper::isZeroDate($bug->openedDate) ? $bug->openedDate : ''; + $bug->assignedDate = !helper::isZeroDate($bug->assignedDate) ? $bug->assignedDate : ''; + $bug->resolvedDate = !helper::isZeroDate($bug->resolvedDate) ? $bug->resolvedDate : ''; + $bug->closedDate = !helper::isZeroDate($bug->closedDate) ? $bug->closedDate : ''; + $bug->lastEditedDate = !helper::isZeroDate($bug->lastEditedDate) ? $bug->lastEditedDate : ''; + $bug->deadline = !helper::isZeroDate($bug->deadline) ? $bug->deadline : ''; + /* fill some field with useful value. */ $bug->product = !isset($products[$bug->product]) ? '' : $products[$bug->product] . "(#$bug->product)"; $bug->project = !isset($projects[$bug->project]) ? '' : $projects[$bug->project] . "(#$bug->project)"; From d65ba3736da038a4a86ef5bf38ea9d139c5661ca Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 30 Jun 2022 16:44:36 +0800 Subject: [PATCH 3/7] * Fix bug #24609. --- module/testcase/control.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/testcase/control.php b/module/testcase/control.php index 70d766f8b5..fda3c10423 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1582,6 +1582,10 @@ class testcase extends control $case->real = ''; $result = isset($results[$case->id]) ? $results[$case->id] : array(); + $case->openedDate = !helper::isZeroDate($case->openedDate) ? $case->openedDate : ''; + $case->lastEditedDate = !helper::isZeroDate($case->lastEditedDate) ? $case->lastEditedDate : ''; + $case->lastRunDate = !helper::isZeroDate($case->lastRunDate) ? $case->lastRunDate : ''; + $case->real = ''; if(!empty($result) and !isset($relatedSteps[$case->id])) { From fd34910cf710b3b7d7eb5b154609615712305494 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 30 Jun 2022 16:53:39 +0800 Subject: [PATCH 4/7] * Fix bug #24638. --- module/setting/model.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/setting/model.php b/module/setting/model.php index cfbf2020e3..fb2bea90df 100644 --- a/module/setting/model.php +++ b/module/setting/model.php @@ -194,6 +194,8 @@ class settingModel extends model ->fetchAll('id'); if(!$records) return array(); + $vision = $this->config->vision; + /* Group records by owner and module. */ $config = array(); foreach($records as $record) @@ -202,6 +204,9 @@ class settingModel extends model if(!isset($record->module)) return array(); // If no module field, return directly. Since 3.2 version, there's the module field. if(empty($record->module)) continue; + /* If it`s lite vision unset config requiredFields */ + if($vision == 'lite' and $record->key == 'requiredFields') continue; + $config[$record->owner]->{$record->module}[] = $record; } return $config; From 3ccb521c65165da8c8531ed126c32eaa74d3cf4e Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 30 Jun 2022 09:06:44 +0000 Subject: [PATCH 5/7] * Fix bug#24561 --- module/kanban/model.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/module/kanban/model.php b/module/kanban/model.php index 6d7d1b2b8c..1de7c0c2b8 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1479,6 +1479,19 @@ class kanbanModel extends model if($browseType == 'bug') $cardList = $this->loadModel('bug')->getExecutionBugs($executionID); if($browseType == 'task') $cardList = $this->loadModel('execution')->getKanbanTasks($executionID, "id"); + if($browseType == 'task' and $groupBy == 'assignedTo') + { + foreach($cardList as $id => $task) + { + if($task->mode == 'multi') + { + $task->team = $this->dao->select('t1.account,t2.realname')->from(TABLE_TEAM)->alias('t1') + ->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account') + ->where('t1.root')->eq($id)->andWhere('t1.type')->eq('task')->orderBy('t1.order')->fetchPairs('account'); + } + } + } + /* Get objects cards menus. */ if($browseType == 'story') $storyCardMenu = $this->getKanbanCardMenu($executionID, $cardList, 'story'); if($browseType == 'bug') $bugCardMenu = $this->getKanbanCardMenu($executionID, $cardList, 'bug'); @@ -1564,7 +1577,12 @@ class kanbanModel extends model $cardData = array(); if(in_array($groupBy, array('module', 'story', 'pri', 'severity')) and (int)$object->$groupBy !== $laneID) continue; - if(in_array($groupBy, array('assignedTo', 'type', 'category', 'source')) and $object->$groupBy !== $laneID) continue; + if(in_array($groupBy, array('type', 'category', 'source')) and $object->$groupBy !== $laneID) continue; + if($groupBy == 'assignedTo') + { + if(empty($object->team) and $object->$groupBy !== $laneID) continue; + if(!empty($object->team) and !in_array($laneID, array_keys($object->team))) continue; + } $cardData['id'] = $object->id; $cardData['order'] = $cardOrder; @@ -1625,6 +1643,14 @@ class kanbanModel extends model foreach($cardList as $item) { if(!isset($groupByList[$item->$groupBy])) $groupByList[$item->$groupBy] = $item->$groupBy; + + if($groupBy == 'assignedTo' and !empty($item->team)) + { + foreach($item->team as $account => $name) + { + if(!isset($groupByList[$account])) $groupByList[$account] = $account; + } + } } if(in_array($groupBy, array('module', 'story', 'assignedTo'))) From 7882690c4988999d5f3ccb6f912e1ea7e01d7045 Mon Sep 17 00:00:00 2001 From: sunjun Date: Thu, 30 Jun 2022 09:16:49 +0000 Subject: [PATCH 6/7] fixbug_22007 --- module/task/control.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index 225a1bbf1f..e46a6399c5 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -44,7 +44,8 @@ class task extends control $extra = str_replace(array(',', ' '), array('&', ''), $extra); parse_str($extra, $output); - $executions = $this->execution->getPairs(0, 'all', 'noclosed'); + $execution = $this->execution->getById($executionID); + $executions = $this->execution->getPairs(0, 'all', !common::canModify('execution', $execution) ? 'noclosed' : ''); $executionID = $this->execution->saveState($executionID, $executions); $this->execution->setMenu($executionID); @@ -92,7 +93,6 @@ class task extends control $task->assignedTo = array($bug->assignedTo); } - $execution = $this->execution->getById($executionID); $taskLink = $this->createLink('execution', 'browse', "executionID=$executionID&tab=task"); $this->loadModel('kanban'); @@ -283,7 +283,7 @@ class task extends control $this->view->position = $position; $this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'task', "executionID=$executionID") : ''; $this->view->execution = $execution; - $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, 'undone', 0, true); + $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, !common::canModify('execution', $execution) ? 'noclosed' : 'all', 0, true); $this->view->task = $task; $this->view->users = $users; $this->view->storyID = $storyID; From dbced34eb7b1612ce3f01baac90506822b0966b3 Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 30 Jun 2022 09:20:00 +0000 Subject: [PATCH 7/7] * Adjust code --- module/kanban/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/kanban/model.php b/module/kanban/model.php index 1de7c0c2b8..9ee506694f 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1581,7 +1581,7 @@ class kanbanModel extends model if($groupBy == 'assignedTo') { if(empty($object->team) and $object->$groupBy !== $laneID) continue; - if(!empty($object->team) and !in_array($laneID, array_keys($object->team))) continue; + if(!empty($object->team) and !in_array($laneID, array_keys($object->team), true)) continue; } $cardData['id'] = $object->id;