From b15c877da752d97144567d66ad10a1bffe23227b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=87=91=E5=8B=87?= Date: Mon, 17 Apr 2023 02:51:17 +0000 Subject: [PATCH 1/2] * Fix bug#34223. --- db/update18.3.sql | 2 ++ db/zentao.sql | 4 ++-- lib/dao/dm.class.php | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/db/update18.3.sql b/db/update18.3.sql index 69418260c0..fe305d6bfc 100644 --- a/db/update18.3.sql +++ b/db/update18.3.sql @@ -564,6 +564,8 @@ CHANGE `activatedDate` `activatedDate` datetime NULL; ALTER TABLE `zt_kanbancard` CHANGE `begin` `begin` date NULL, CHANGE `end` `end` date NULL, +CHANGE `fromID` `fromID` mediumint unsigned NOT NULL DEFAULT '0', +CHANGE `fromType` `fromType` varchar(30) NOT NULL DEFAULT '', CHANGE `whitelist` `whitelist` text NULL, CHANGE `lastEditedBy` `lastEditedBy` char(30) NOT NULL DEFAULT '', CHANGE `lastEditedDate` `lastEditedDate` datetime NULL, diff --git a/db/zentao.sql b/db/zentao.sql index 58044708eb..ed35abe5ae 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -981,8 +981,8 @@ CREATE TABLE IF NOT EXISTS `zt_kanbancard` ( `kanban` mediumint(8) unsigned NOT NULL, `region` mediumint(8) unsigned NOT NULL, `group` mediumint(8) unsigned NOT NULL, - `fromID` mediumint(8) unsigned NOT NULL, - `fromType` varchar(30) NOT NULL, + `fromID` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromType` varchar(30) NOT NULL DEFAULT '', `name` varchar(255) NOT NULL, `status` varchar(30) NOT NULL DEFAULT 'doing', `pri` mediumint(8) unsigned NOT NULL, diff --git a/lib/dao/dm.class.php b/lib/dao/dm.class.php index e83ba45c1b..9c2f015f0a 100644 --- a/lib/dao/dm.class.php +++ b/lib/dao/dm.class.php @@ -70,8 +70,10 @@ class dm extends dao */ public function descTable($tableName) { + $this->dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); $sql = "select * from all_tab_columns where table_name = '$tableName'"; $rawFields = $this->dbh->rawQuery($sql)->fetchAll(); + $this->dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); $fields = array(); foreach($rawFields as $rawField) From af61f4248d93d81c608ea0f85b03d9ec3c3af735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=87=91=E5=8B=87?= Date: Mon, 17 Apr 2023 02:56:25 +0000 Subject: [PATCH 2/2] * Fix bug#34239. --- module/execution/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index faa7a92ad8..1bd72b4d84 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2783,7 +2783,7 @@ class executionModel extends model */ public function getToImport($executionIds, $type, $model = '') { - return $this->dao->select('t1.id,concat_ws(" / ", t2.name, t1.name) as name')->from(TABLE_EXECUTION)->alias('t1') + return $this->dao->select("t1.id,concat_ws(' / ', t2.name, t1.name) as name")->from(TABLE_EXECUTION)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t2.id=t1.project') ->where('t1.id')->in($executionIds) ->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->sprints)->fi()