diff --git a/module/block/zen.php b/module/block/zen.php index 70de756a15..3f32959e82 100644 --- a/module/block/zen.php +++ b/module/block/zen.php @@ -621,7 +621,7 @@ class blockZen extends block $this->view->projects = $this->loadModel('project')->getPairsByProgram(); $this->view->testtasks = $this->dao->select("DISTINCT t1.*,t2.name as productName,t2.shadow,t3.name as buildName,t4.name as projectName, CONCAT(t4.name, '/', t3.name) as executionBuild")->from(TABLE_TESTTASK)->alias('t1') ->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id') - ->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=CAST(t3.id AS VARCHAR(20))') + ->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=CAST(t3.id AS CHAR)') ->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.execution=t4.id') ->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.execution=t5.project') ->where('t1.deleted')->eq('0') @@ -1572,7 +1572,7 @@ class blockZen extends block $this->view->project = $this->loadModel('project')->getByID($this->session->project); $this->view->testtasks = $this->dao->select("DISTINCT t1.*,t2.name as productName,t2.shadow,t3.name as buildName,t4.name as executionName, CONCAT(t4.name, '/', t3.name) as executionBuild")->from(TABLE_TESTTASK)->alias('t1') ->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id') - ->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=CAST(t3.id AS VARCHAR(20))') + ->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=CAST(t3.id AS CHAR)') ->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.execution=t4.id') ->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.project=t5.project') ->where('t1.deleted')->eq('0') diff --git a/module/doc/model.php b/module/doc/model.php index 6d317ed76b..e2676bda90 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -775,7 +775,7 @@ class docModel extends model public function getDocsOfLibs(array $libs, string $spaceType, int $excludeID = 0, $queryTemplate = false): array { $docs = $this->dao->select('t1.*')->from(TABLE_DOC)->alias('t1') - ->leftJoin(TABLE_MODULE)->alias('t2')->on('t1.module=CAST(t2.id AS VARCHAR(20))') + ->leftJoin(TABLE_MODULE)->alias('t2')->on('t1.module=CAST(t2.id AS CHAR)') ->where('t1.lib')->in($libs) ->andWhere('t1.vision')->eq($this->config->vision) ->beginIF(!$queryTemplate)->andWhere('t1.templateType')->eq('')->andWhere('t2.type')->eq('doc')->fi() diff --git a/module/testtask/model.php b/module/testtask/model.php index a7c7554e66..ac7e149fc6 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -157,7 +157,7 @@ class testtaskModel extends model { $tasks = $this->dao->select('t1.*, t1.id AS idName, t5.multiple, IF(t4.shadow = 1, t5.name, t4.name) AS productName, t3.name AS executionName, t2.name AS buildName, t2.branch AS branch, t5.name AS projectName, t4.`order` AS productOrder') ->from(TABLE_TESTTASK)->alias('t1') - ->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = CAST(t2.id AS VARCHAR(20))') + ->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = CAST(t2.id AS CHAR)') ->leftJoin(TABLE_EXECUTION)->alias('t3')->on('t1.execution = t3.id') ->leftJoin(TABLE_PRODUCT)->alias('t4')->on('t1.product = t4.id') ->leftJoin(TABLE_PROJECT)->alias('t5')->on('t3.project = t5.id') @@ -190,7 +190,7 @@ class testtaskModel extends model return $this->dao->select('t1.*, t2.name AS buildName, t3.name AS productName') ->from(TABLE_TESTTASK)->alias('t1') - ->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = CAST(t2.id AS VARCHAR(20))') + ->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = CAST(t2.id AS CHAR)') ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id') ->where('t1.deleted')->eq('0') ->beginIF($objectType == 'execution')->andWhere('t1.execution')->eq((int)$executionID)->fi() @@ -317,7 +317,7 @@ class testtaskModel extends model return $this->dao->select("t1.*, t2.name AS executionName, t2.multiple AS executionMultiple, t5.name AS projectName, t3.name AS buildName, t4.name AS productName, CONCAT(t2.name, '/', t3.name) as executionBuild") ->from(TABLE_TESTTASK)->alias('t1') ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id') - ->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = CAST(t3.id AS VARCHAR(20))') + ->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = CAST(t3.id AS CHAR)') ->leftJoin(TABLE_PRODUCT)->alias('t4')->on('t1.product = t4.id') ->leftJoin(TABLE_PROJECT)->alias('t5')->on('t2.project = t5.id') ->where('t1.deleted')->eq('0') diff --git a/module/testtask/tao.php b/module/testtask/tao.php index aaa8314390..34e2d334d5 100644 --- a/module/testtask/tao.php +++ b/module/testtask/tao.php @@ -25,7 +25,7 @@ class testtaskTao extends testtaskModel ->from(TABLE_TESTTASK)->alias('t1') ->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id') ->leftJoin(TABLE_EXECUTION)->alias('t3')->on('t1.execution = t3.id') - ->leftJoin(TABLE_BUILD)->alias('t4')->on('t1.build = CAST(t4.id AS VARCHAR(20))') + ->leftJoin(TABLE_BUILD)->alias('t4')->on('t1.build = CAST(t4.id AS CHAR)') ->leftJoin(TABLE_PROJECT)->alias('t5')->on('t1.project = t5.id') ->where('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0)