* Add createdBy,createdDate fields in build table.
This commit is contained in:
@@ -7,10 +7,15 @@ 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');
|
||||
|
||||
@@ -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`),
|
||||
|
||||
@@ -1124,13 +1124,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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -169,14 +169,16 @@ class releaseModel extends model
|
||||
else
|
||||
{
|
||||
$build = new stdclass();
|
||||
$build->project = $projectID;
|
||||
$build->product = (int)$productID;
|
||||
$build->branch = (int)$branch;
|
||||
$build->name = $release->name;
|
||||
$build->date = $release->date;
|
||||
$build->builder = $this->app->user->account;
|
||||
$build->desc = $release->desc;
|
||||
$build->execution = 0;
|
||||
$build->project = $projectID;
|
||||
$build->product = (int)$productID;
|
||||
$build->branch = (int)$branch;
|
||||
$build->name = $release->name;
|
||||
$build->date = $release->date;
|
||||
$build->builder = $this->app->user->account;
|
||||
$build->desc = $release->desc;
|
||||
$build->execution = 0;
|
||||
$build->createdBy = $this->app->user->account;
|
||||
$build->createdDate = helper::now();
|
||||
|
||||
$build = $this->loadModel('file')->processImgURL($build, $this->config->release->editor->create['id']);
|
||||
$this->app->loadLang('build');
|
||||
|
||||
@@ -6753,8 +6753,8 @@ class upgradeModel extends model
|
||||
*/
|
||||
public function processCreatedInfo()
|
||||
{
|
||||
$objectTypes = array('productplan', 'release', 'testtask');
|
||||
$tables = array('productplan' => TABLE_PRODUCTPLAN, 'release' => TABLE_RELEASE, 'testtask' => TABLE_TESTTASK);
|
||||
$objectTypes = array('productplan', 'release', 'testtask', 'build');
|
||||
$tables = array('productplan' => TABLE_PRODUCTPLAN, 'release' => TABLE_RELEASE, 'testtask' => TABLE_TESTTASK, 'build' => TABLE_BUILD);
|
||||
|
||||
$actions = $this->dao->select('objectType, objectID, actor, date')->from(TABLE_ACTION)->where('objectType')->in($objectTypes)->andWhere('action')->eq('opened')->fetchGroup('objectType');
|
||||
foreach($actions as $objectType => $objectActions)
|
||||
|
||||
Reference in New Issue
Block a user