From 8f879f7516382f32ac5ec0035e0e676b3f217dca Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Fri, 10 Jun 2022 04:57:04 +0000 Subject: [PATCH] * Fix bug #23554. --- module/upgrade/model.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index fd78a62ad3..e8644bc074 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -6319,4 +6319,32 @@ class upgradeModel extends model $this->setting->deleteItems('owner=system&module=story§ion=&key=forceReviewAll'); } + + public function replaceSetLanePriv() + { + $groupIDList = $this->dao->select('group')->from(TABLE_GROUPPRIV) + ->where('module')->eq('kanban') + ->andWhere('method')->eq('setLane') + ->fetchAll(); + + if(!empty($groupIDList)) + { + $this->dao->delete()->from(TABLE_GROUPPRIV) + ->where('module')->eq('kanban') + ->andWhere('method')->eq('setLane') + ->exec(); + } + + foreach($groupIDList as $groupID) + { + $data = new stdClass(); + $data->group = $groupID; + $data->module = 'kanban'; + $data->method = 'editLaneName'; + $this->dao->insert(TABLE_GROUPPRIV)->data($data)->exec(); + + $data->method = 'editLaneColor'; + $this->dao->insert(TABLE_GROUPPRIV)->data($data)->exec(); + } + } }