diff --git a/db/update18.3.sql b/db/update18.3.sql index c14f995219..1e292273a8 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 d56221ad7f..f4d0802ac9 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -1017,8 +1017,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) 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()