Merge branch 'sprint/devplat_30'

This commit is contained in:
wangyidong
2022-08-05 08:46:26 +08:00
18 changed files with 73 additions and 36 deletions
+5
View File
@@ -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');
+2
View File
@@ -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`),
+2 -2
View File
@@ -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')
+9 -7
View File
@@ -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();
+2
View File
@@ -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();
+3 -1
View File
@@ -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');
+7 -5
View File
@@ -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();
+3
View File
@@ -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.';
+3
View File
@@ -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';
+3
View File
@@ -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é";
+3
View File
@@ -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';
+3
View File
@@ -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 = '我参与的';
+11 -6
View File
@@ -31,12 +31,17 @@
</div>
</div>
<div class="btn-toolbar pull-left">
<?php
$buildName = $build ? " <span class='label label-danger'>Build:{$build->name}</span>" : '';
$module = $type != 'bysearch' ? "&param=$param" : '';
echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&branch={$branchID}&orderBy=status,id_desc&build=$buildID&type=all$module"), "<span class='text'>{$lang->bug->allBugs}</span>" . ($type == 'all' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&branch={$branchID}&orderBy=status,id_desc&build=$buildID&type=unresolved$module"), "<span class='text'>{$lang->bug->unResolved}</span>" . ($type == 'unresolved' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'");
?>
<?php common::sortFeatureMenu();?>
<?php foreach($lang->execution->featureBar['bug'] as $featureType => $label):?>
<?php $active = $type == $featureType ? 'btn-active-text' : '';?>
<?php $label = "<span class='text'>$label</span>";?>
<?php if($type == $featureType):?>
<?php $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
<?php $label .= $build ? " <span class='label label-danger'>Build:{$build->name}</span>" : '';?>
<?php endif;?>
<?php $module = $type != 'bysearch' ? "&param=$param" : '';?>
<?php echo html::a(inlink('bug', "executionID=$execution->id&productID={$productID}&branch={$branchID}&orderBy=status,id_desc&build=$buildID&type={$featureType}$module"), $label, '', "class='btn btn-link $active' id='{$featureType}Tab'");?>
<?php endforeach;?>
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->bug->search;?></a>
</div>
<div class="btn-toolbar pull-right">
+2 -2
View File
@@ -754,8 +754,8 @@ $.extend(
var searchModule = types[0];
var searchMethod = typeof(types[1]) == 'undefined' ? 'view' : types[1];
var searchLink = createLink(searchModule, searchMethod, "id=" + objectValue);
var assetType = 'story,issue,risk,opportunity,doc';
if(assetType.indexOf(searchModule) > -1)
var assetType = ',story,issue,risk,opportunity,doc,';
if(assetType.indexOf(',' + searchModule + ',') > -1)
{
var link = createLink('index', 'ajaxGetViewMethod' , 'objectID=' + objectValue + '&objectType=' + searchModule);
$.get(link, function(data)
+1 -1
View File
@@ -65,7 +65,7 @@
<?php if($action->objectType == 'meeting') $tab = $action->project ? "data-app='project'" : "data-app='my'";?>
<span class='label-name'>
<?php
if(($config->edition == 'max' and strpos($config->action->assetType, $action->objectType) !== false) and empty($action->objectName))
if(($config->edition == 'max' and strpos($config->action->assetType, ",{$action->objectType},") !== false) and empty($action->objectName))
{
echo '#' . $action->objectID;
}
+1 -1
View File
@@ -192,7 +192,7 @@ class projectModel extends model
$project = $this->dao->select('*')->from(TABLE_PROJECT)
->where('id')->eq($projectID)
->beginIF($this->config->system == 'new')->andWhere('`type`')->in($type)->fi()
->beginIF($this->config->systemMode == 'new')->andWhere('`type`')->in($type)->fi()
->fetch();
if(!$project) return false;
+10 -8
View File
@@ -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');
+3 -3
View File
@@ -534,8 +534,8 @@ class upgradeModel extends model
case '17_4':
$this->changeTableEngine();
$this->processCreatedInfo();
$this->updateApproval();
$this->processCreatedBy();
$this->updateApproval();
break;
}
@@ -6777,8 +6777,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)