diff --git a/db/update21.7.5.sql b/db/update21.7.5.sql index c257c3f8c8..eede5ccf81 100644 --- a/db/update21.7.5.sql +++ b/db/update21.7.5.sql @@ -26,3 +26,5 @@ REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`, ` ('all', 'weekly', 'categoryList', 'week', '周报', '1', 'rnd'), ('all', 'weekly', 'categoryList', 'day', '日报', '1', 'rnd'), ('all', 'weekly', 'categoryList', 'milestone','里程碑报告', '1', 'rnd'); + +ALTER TABLE `zt_doc` CHANGE `lib` `lib` mediumint(8) unsigned NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/db/zentao.sql b/db/zentao.sql index e7876a843f..d4c39801e4 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -806,7 +806,7 @@ CREATE TABLE IF NOT EXISTS `zt_doc` ( `project` mediumint(8) unsigned NOT NULL DEFAULT '0', `product` mediumint(8) unsigned NOT NULL DEFAULT '0', `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', - `lib` varchar(30) NOT NULL DEFAULT '', + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', `template` varchar(30) NOT NULL DEFAULT '', `templateType` varchar(30) NOT NULL DEFAULT '', `templateDesc` text NULL, diff --git a/module/doc/model.php b/module/doc/model.php index 40970741fb..27173264de 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -999,7 +999,7 @@ class docModel extends model ->leftJoin(TABLE_DOCLIB)->alias('t3')->on("t1.lib=t3.id") ->where('t1.deleted')->eq(0) ->andWhere('t1.templateType')->eq('') - ->andWhere('t1.lib')->ne('') + ->andWhere('t1.lib')->ne(0) ->andWhere('t1.type')->in($this->config->doc->docTypes) ->andWhere('t1.vision')->eq($this->config->vision) ->andWhere('t2.id')->subIn($docSQL) @@ -1023,7 +1023,7 @@ class docModel extends model $docIdList = $type == 'editedby' ? $this->docTao->getEditedDocIdList() : array(); $docs = $this->dao->select('t1.*,t2.name as libName,t2.type as objectType')->from(TABLE_DOC)->alias('t1')->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id") ->where('t1.deleted')->eq(0) - ->andWhere('t1.lib')->ne('') + ->andWhere('t1.lib')->ne(0) ->andWhere('t1.templateType')->eq('') ->andWhere('t1.vision')->eq($this->config->vision) ->andWhere('t1.type')->in($this->config->doc->docTypes) @@ -2858,7 +2858,7 @@ class docModel extends model ->andWhere('t1.action')->eq('edited') ->andWhere('t1.actor')->eq($this->app->user->account) ->andWhere('t1.vision')->eq($this->config->vision) - ->andWhere('t2.lib')->ne('') + ->andWhere('t2.lib')->ne(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.type')->in($this->config->doc->docTypes) ->fetch('count'); @@ -2869,7 +2869,7 @@ class docModel extends model ->andWhere('templateType')->eq('') ->andWhere('deleted')->eq(0) ->andWhere('vision')->eq($this->config->vision) - ->andWhere('lib')->ne('') + ->andWhere('lib')->ne(0) ->fetch(); $statistic->myDocs = $myStatistic->myDocs; diff --git a/module/doc/tao.php b/module/doc/tao.php index 5b55ea093a..59e6e3d039 100644 --- a/module/doc/tao.php +++ b/module/doc/tao.php @@ -145,7 +145,7 @@ class docTao extends docModel return $this->dao->select('t1.*, t2.name as libName, t2.type as objectType')->from(TABLE_DOC)->alias('t1') ->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id") ->where('t1.deleted')->eq(0) - ->andWhere('t1.lib')->ne('') + ->andWhere('t1.lib')->ne(0) ->andWhere('t1.id')->in($hasPrivDocIdList) ->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi() ->andWhere('t1.addedBy')->eq($this->app->user->account) @@ -178,7 +178,7 @@ class docTao extends docModel ->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id") ->where('t1.deleted')->eq(0) ->andWhere('t1.id')->in(array_keys($docIdList)) - ->andWhere('t1.lib')->ne('') + ->andWhere('t1.lib')->ne(0) ->andWhere('t1.vision')->in($this->config->vision) ->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi() ->orderBy($sort) @@ -225,7 +225,7 @@ class docTao extends docModel return $this->dao->select('t1.*')->from(TABLE_DOC)->alias('t1') ->leftJoin(TABLE_DOCACTION)->alias('t2')->on("t1.id=t2.doc && t2.action='collect'") ->where('t1.deleted')->eq(0) - ->andWhere('t1.lib')->ne('') + ->andWhere('t1.lib')->ne(0) ->andWhere('t1.templateType')->eq('') ->andWhere('t1.id')->in($hasPrivDocIdList) ->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi() diff --git a/module/project/ui/create.field.php b/module/project/ui/create.field.php index 0c01915beb..787ccd6ba3 100644 --- a/module/project/ui/create.field.php +++ b/module/project/ui/create.field.php @@ -52,6 +52,7 @@ $fields->field('days') $fields->field('productsBox')->hidden(data('copyProject') && data('copyProject.hasProduct') == 0); +$fields->field('desc')->value(data('copyProject.desc')); $fields->field('PM')->value(data('copyProject.PM')); $fields->field('budget')->value(data('copyProject.budget')); diff --git a/module/upgrade/model.php b/module/upgrade/model.php index de543c2e50..7f01ff27d6 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -10996,7 +10996,7 @@ class upgradeModel extends model ->leftJoin(TABLE_DOCCONTENT)->alias('t2')->on('t1.id = t2.doc && t1.version = t2.version') ->where('t1.deleted')->eq(0) ->andWhere('t1.templateType')->ne('') - ->andWhere('t1.lib')->eq('') + ->andWhere('t1.lib')->eq(0) ->andWhere('t1.module')->eq('') ->fetchAll('id', false); if(empty($templateList)) return array();