diff --git a/db/update17.4.sql b/db/update17.4.sql index 7c5362f489..9b07b51e62 100644 --- a/db/update17.4.sql +++ b/db/update17.4.sql @@ -13,11 +13,16 @@ ALTER TABLE `zt_release` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; ALTER TABLE `zt_testtask` ADD `createdBy` varchar(30) NOT NULL AFTER `subStatus`; ALTER TABLE `zt_testtask` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; +ALTER TABLE `zt_build` ADD `createdBy` varchar(30) NOT NULL AFTER `desc`; +ALTER TABLE `zt_build` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + INSERT IGNORE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `role`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES ('testtask', 'createdBy', 'varchar', '30', '由谁创建', 'select', '', 'user', '', '', '', 393, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), ('testtask', 'createdDate', 'datetime', '', '创建时间', 'datetime', '', '', '', '', '', 394, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), ('productplan', 'createdBy', 'varchar', '30', '由谁创建', 'select', '', 'user', '', '', '', 11, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), ('productplan', 'createdDate', 'datetime', '', '创建时间', 'datetime', '', '', '', '', '', 12, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('build', 'createdBy', 'varchar', '30', '由谁创建', 'select', '', 'user', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('build', 'createdDate', 'datetime', '', '创建时间', 'datetime', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), ('release', 'createdBy', 'varchar', '30', '由谁创建', 'select', '', 'user', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), ('release', 'createdDate', 'datetime', '', '创建时间', 'datetime', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'); diff --git a/db/zentao.sql b/db/zentao.sql index dbf19c45eb..53848908fd 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -331,6 +331,8 @@ CREATE TABLE IF NOT EXISTS `zt_build` ( `bugs` text NOT NULL, `builder` char(30) NOT NULL default '', `desc` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), diff --git a/module/action/model.php b/module/action/model.php index 12289ca4c0..92c83c05b4 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -858,7 +858,7 @@ class actionModel extends model $this->app->loadLang('mr'); $desc = sprintf($this->lang->mr->createAction, $mrCreatedDate, $mrActor, $mrLink); } - elseif($this->config->edition == 'max' and strpos($this->config->action->assetType, $action->objectType) !== false and $action->action == 'approved') + elseif($this->config->edition == 'max' and strpos($this->config->action->assetType, ",{$action->objectType},") !== false and $action->action == 'approved') { $desc = empty($this->lang->action->approve->{$action->extra}) ? '' : $this->lang->action->approve->{$action->extra}; } @@ -1469,7 +1469,7 @@ class actionModel extends model } if($this->config->edition == 'max' - and strpos($this->config->action->assetType, $action->objectType) !== false + and strpos($this->config->action->assetType, ",{$action->objectType},") !== false and empty($action->project) and empty($action->product) and empty($action->execution)) { if($action->objectType == 'doc') diff --git a/module/bug/model.php b/module/bug/model.php index f4e2b71060..9f955ded2b 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1146,13 +1146,15 @@ class bugModel extends model if(dao::isError()) return false; $buildData = new stdclass(); - $buildData->product = (int)$oldBug->product; - $buildData->branch = (int)$oldBug->branch; - $buildData->project = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($bug->buildExecution)->fetch('project'); - $buildData->execution = $bug->buildExecution; - $buildData->name = $bug->buildName; - $buildData->date = date('Y-m-d'); - $buildData->builder = $this->app->user->account; + $buildData->product = (int)$oldBug->product; + $buildData->branch = (int)$oldBug->branch; + $buildData->project = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($bug->buildExecution)->fetch('project'); + $buildData->execution = $bug->buildExecution; + $buildData->name = $bug->buildName; + $buildData->date = date('Y-m-d'); + $buildData->builder = $this->app->user->account; + $buildData->createdBy = $this->app->user->account; + $buildData->createdDate = helper::now(); $this->dao->insert(TABLE_BUILD)->data($buildData)->autoCheck() ->check('name', 'unique', "product = {$buildData->product} AND branch = {$buildData->branch} AND deleted = '0'") ->exec(); diff --git a/module/build/model.php b/module/build/model.php index 11815e9c3c..9debed159f 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -313,6 +313,8 @@ class buildModel extends model ->setDefault('branch', 0) ->cleanInt('product,branch') ->add('execution', (int)$executionID) + ->add('createdBy', $this->app->user->account) + ->add('createdDate', helper::now()) ->stripTags($this->config->build->editor->create['id'], $this->config->allowedTags) ->remove('resolvedBy,allchecker,files,labels,uid') ->get(); diff --git a/module/caselib/model.php b/module/caselib/model.php index 011c9e1c01..70e2e2cedb 100644 --- a/module/caselib/model.php +++ b/module/caselib/model.php @@ -152,17 +152,19 @@ class caselibModel extends model /** * Get library list. * + * @param string $type * @param string $orderBy * @param object $pager * @access public * @return array */ - public function getList($orderBy = 'id_desc', $pager = null) + public function getList($type = 'all', $orderBy = 'id_desc', $pager = null) { return $this->dao->select('*')->from(TABLE_TESTSUITE) ->where('product')->eq(0) ->andWhere('deleted')->eq(0) ->andWhere('type')->eq('library') + ->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', `reviewers`)")->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id'); diff --git a/module/convert/model.php b/module/convert/model.php index 152fe6578b..dbb5055f98 100644 --- a/module/convert/model.php +++ b/module/convert/model.php @@ -947,11 +947,13 @@ class convertModel extends model $productID = $projectProduct[$projectID]; $build = new stdclass(); - $build->product = $productID; - $build->project = $projectID; - $build->name = $data->vname; - $build->date = substr($data->RELEASEDATE, 0, 10); - $build->builder = $this->app->user->account; + $build->product = $productID; + $build->project = $projectID; + $build->name = $data->vname; + $build->date = substr($data->RELEASEDATE, 0, 10); + $build->builder = $this->app->user->account; + $build->createdBy = $this->app->user->account; + $build->createdDate = helper::now(); $this->dao->dbh($this->dbh)->insert(TABLE_BUILD)->data($build)->exec(); $buildID = $this->dao->dbh($this->dbh)->lastInsertID(); diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 0261d10f35..375cb05ff8 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -514,6 +514,9 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['bug']['all'] = 'All'; +$lang->execution->featureBar['bug']['unresolved'] = 'Active'; + $lang->execution->featureBar['build']['all'] = 'Build List'; $lang->execution->myExecutions = 'Ich bin beteiligt.'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 3d8cbb0fdf..0b0ed597ad 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -514,6 +514,9 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['bug']['all'] = 'All'; +$lang->execution->featureBar['bug']['unresolved'] = 'Active'; + $lang->execution->featureBar['build']['all'] = 'Build List'; $lang->execution->myExecutions = 'Mine'; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 6352bcc766..bec2096bbb 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -514,6 +514,9 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['bug']['all'] = 'All'; +$lang->execution->featureBar['bug']['unresolved'] = 'Active'; + $lang->execution->featureBar['build']['all'] = 'Build List'; $lang->execution->myExecutions = "J'étais impliqué"; diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php index 242f3d7b1a..154243765a 100644 --- a/module/execution/lang/vi.php +++ b/module/execution/lang/vi.php @@ -418,6 +418,9 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['bug']['all'] = 'All'; +$lang->execution->featureBar['bug']['unresolved'] = 'Active'; + $lang->execution->featureBar['build']['all'] = 'Build List'; $lang->execution->myExecutions = 'Tôi tham gia'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 363002d338..3d7ff4c33a 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -514,6 +514,9 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['bug']['all'] = '所有'; +$lang->execution->featureBar['bug']['unresolved'] = '未解决'; + $lang->execution->featureBar['build']['all'] = '所有版本'; $lang->execution->myExecutions = '我参与的'; diff --git a/module/execution/view/bug.html.php b/module/execution/view/bug.html.php index 31459d2b9a..0dcf920a7a 100644 --- a/module/execution/view/bug.html.php +++ b/module/execution/view/bug.html.php @@ -31,12 +31,17 @@