From 97a4fb7cc95d2638e3bea524fac3f015684ffef2 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 17 Jan 2022 17:24:42 +0800 Subject: [PATCH] * Adjust code of kanban and bug model. --- module/bug/model.php | 7 +++++-- module/kanban/model.php | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 63d784291c..863f81041d 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -272,9 +272,12 @@ class bugModel extends model $this->executeHooks($bugID); - if(isset($output['laneID']) and isset($output['columnID'])) $this->kanban->addKanbanCell($bug->execution, $output['laneID'], $output['columnID'], 'bug', $bugID); - if($bug->execution and (!isset($output['laneID']) or !isset($output['columnID']))) $this->kanban->updateLane($bug->execution, 'bug'); + if($bug->execution) + { + if(isset($output['laneID']) and isset($output['columnID'])) $this->kanban->addKanbanCell($bug->execution, $output['laneID'], $output['columnID'], 'bug', $bugID); + if(!isset($output['laneID']) or !isset($output['columnID'])) $this->kanban->updateLane($bug->execution, 'bug'); + } /* When the bug is created by uploading the image, add the image to the file of the bug. */ $this->loadModel('score')->create('bug', 'create', $bugID); if(!empty($data->uploadImage[$i]) and !empty($file)) diff --git a/module/kanban/model.php b/module/kanban/model.php index c71761de0d..2f1bff359f 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -635,6 +635,7 @@ class kanbanModel extends model public function getRDKanban($executionID, $browseType = 'all', $orderBy = 'id_desc', $regionID = 0, $groupBy = 'default') { if($groupBy != 'default') return $this->getKanban4Group($executionID, $browseType, $groupBy); + $kanbanData = array(); $actions = array('sortGroup'); $regions = $this->getRegionPairs($executionID);