Merge branch 'sprint/devplat_30'
This commit is contained in:
@@ -200,3 +200,20 @@ ALTER TABLE `zt_sqlview` ENGINE='InnoDB';
|
||||
ALTER TABLE `zt_searchindex` ADD FULLTEXT `title_content` (`title`, `content`);
|
||||
ALTER TABLE `zt_searchindex` DROP INDEX `title`;
|
||||
ALTER TABLE `zt_searchindex` DROP INDEX `content`;
|
||||
|
||||
ALTER TABLE `zt_productplan` ADD `createdBy` varchar(30) NOT NULL AFTER `closedReason`;
|
||||
ALTER TABLE `zt_productplan` ADD `createdDate` datetime NOT NULL AFTER `createdBy`;
|
||||
|
||||
ALTER TABLE `zt_release` ADD `createdBy` varchar(30) NOT NULL AFTER `subStatus`;
|
||||
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`;
|
||||
|
||||
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'),
|
||||
('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');
|
||||
|
||||
@@ -1091,6 +1091,8 @@ CREATE TABLE IF NOT EXISTS `zt_productplan` (
|
||||
`end` date NOT NULL,
|
||||
`order` text NOT NULL,
|
||||
`closedReason` varchar(20) 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`),
|
||||
@@ -1242,6 +1244,8 @@ CREATE TABLE IF NOT EXISTS `zt_release` (
|
||||
`notify` varchar(255),
|
||||
`status` varchar(20) NOT NULL default 'normal',
|
||||
`subStatus` varchar(30) NOT NULL default '',
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `product` (`product`),
|
||||
@@ -1671,6 +1675,8 @@ CREATE TABLE IF NOT EXISTS `zt_testtask` (
|
||||
`testreport` mediumint(8) unsigned NOT NULL,
|
||||
`auto` varchar(10) NOT NULL DEFAULT 'no',
|
||||
`subStatus` varchar(30) NOT NULL default '',
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `product` (`product`),
|
||||
|
||||
@@ -996,14 +996,7 @@ class baseRouter
|
||||
if($writable)
|
||||
{
|
||||
$ztSessionHandler = new ztSessionHandler($_GET['tid']);
|
||||
session_set_save_handler(
|
||||
array($ztSessionHandler, "open"),
|
||||
array($ztSessionHandler, "close"),
|
||||
array($ztSessionHandler, "read"),
|
||||
array($ztSessionHandler, "write"),
|
||||
array($ztSessionHandler, "destroy"),
|
||||
array($ztSessionHandler, "gc")
|
||||
);
|
||||
session_set_save_handler($ztSessionHandler, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3107,7 +3100,7 @@ class EndResponseException extends \Exception
|
||||
*
|
||||
* @package framework
|
||||
*/
|
||||
class ztSessionHandler
|
||||
class ztSessionHandler implements SessionHandlerInterface
|
||||
{
|
||||
public $sessSavePath;
|
||||
public $tagID;
|
||||
|
||||
@@ -157,6 +157,21 @@ class model extends baseModel
|
||||
}
|
||||
if(empty($relations)) $relations = $this->dao->select('next, actions')->from(TABLE_WORKFLOWRELATION)->where('prev')->eq($moduleName)->fetchPairs();
|
||||
|
||||
$this->loadModel('flow');
|
||||
|
||||
$approvalProgressMenu = '';
|
||||
if($type == 'view' && !empty($this->config->openedApproval) && commonModel::hasPriv('approval', 'progress'))
|
||||
{
|
||||
$flow = $this->loadModel('workflow', 'flow')->getByModule($moduleName);
|
||||
if($flow->approval == 'enabled')
|
||||
{
|
||||
$approvalID = isset($data->approval) ? $data->approval : 0;
|
||||
$extraClass = strpos(',testsuite,build,release,productplan,', ",{$moduleName},") !== false ? 'btn-link' : '';
|
||||
$approvalProgressMenu .= "<div class='divider'></div>";
|
||||
$approvalProgressMenu .= baseHTML::a(helper::createLink('approval', 'progress', "approvalID={$approvalID}", '', true), $this->lang->flow->approvalProgress, "class='btn {$extraClass} iframe'");
|
||||
}
|
||||
}
|
||||
|
||||
$menu = '';
|
||||
if($show)
|
||||
{
|
||||
@@ -164,8 +179,10 @@ class model extends baseModel
|
||||
{
|
||||
if(strpos($action->position, $type) === false || $action->show != $show) continue;
|
||||
|
||||
$menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations);
|
||||
$menu .= $this->flow->buildActionMenu($moduleName, $action, $data, $type, $relations);
|
||||
}
|
||||
|
||||
if($approvalProgressMenu) $menu .= $approvalProgressMenu;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -174,10 +191,12 @@ class model extends baseModel
|
||||
{
|
||||
if(strpos($action->position, $type) === false) continue;
|
||||
|
||||
if($type == 'view' || $action->show == 'direct') $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations);
|
||||
if($type == 'browse' && $action->show == 'dropdownlist') $dropdownMenu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations);
|
||||
if($type == 'view' || $action->show == 'direct') $menu .= $this->flow->buildActionMenu($moduleName, $action, $data, $type, $relations);
|
||||
if($type == 'browse' && $action->show == 'dropdownlist') $dropdownMenu .= $this->flow->buildActionMenu($moduleName, $action, $data, $type, $relations);
|
||||
}
|
||||
|
||||
if($approvalProgressMenu) $menu .= $approvalProgressMenu;
|
||||
|
||||
if($type == 'browse' && $dropdownMenu)
|
||||
{
|
||||
$menu .= "<div class='dropdown'><a href='javascript:;' data-toggle='dropdown'>{$this->lang->more}<span class='caret'> </span></a>";
|
||||
|
||||
@@ -401,6 +401,7 @@ class bugModel extends model
|
||||
elseif($browseType == 'bysearch') $bugs = $this->getBySearch($productIDList, $branch, $queryID, $sort, '', $pager, $projectID);
|
||||
elseif($browseType == 'overduebugs') $bugs = $this->getOverdueBugs($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID);
|
||||
elseif($browseType == 'assignedbyme') $bugs = $this->getByAssignedbyme($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID);
|
||||
elseif($browseType == 'review') $bugs = $this->getReviewBugs($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID);
|
||||
|
||||
return $this->checkDelayedBugs($bugs);
|
||||
}
|
||||
@@ -2902,6 +2903,38 @@ class bugModel extends model
|
||||
return $bugs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bugs to review.
|
||||
*
|
||||
* @param array $productIDList
|
||||
* @param int|string $branch
|
||||
* @param array $modules
|
||||
* @param array $executions
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getReviewBugs($productIDList, $branch, $modules, $executions, $orderBy, $pager = null, $projectID = 0)
|
||||
{
|
||||
$bugs = $this->dao->select('t1.*, t2.title as planTitle')->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id')
|
||||
->where('t1.product')->in($productIDList)
|
||||
->andWhere('t1.execution')->in(array_keys($executions))
|
||||
->beginIF($branch !== 'all')->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
|
||||
->beginIF($projectID)->andWhere('t1.project')->eq($projectID)->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in('0,' . $this->app->user->view->projects)->fi()
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug');
|
||||
|
||||
return $bugs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bug query.
|
||||
*
|
||||
|
||||
@@ -37,6 +37,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
</div>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
common::sortFeatureMenu();
|
||||
$menus = customModel::getFeatureMenu($this->moduleName, $this->methodName);
|
||||
foreach($menus as $menuItem)
|
||||
{
|
||||
|
||||
@@ -68,3 +68,5 @@ $lang->build->action = new stdclass();
|
||||
$lang->build->action->buildopened = '$date, erstellt von <strong>$actor</strong>, Build <strong>$extra</strong>.' . "\n";
|
||||
|
||||
$lang->backhome = 'zurück';
|
||||
|
||||
$lang->build->featureBar['browse']['all'] = 'Build List';
|
||||
|
||||
@@ -68,3 +68,5 @@ $lang->build->action = new stdclass();
|
||||
$lang->build->action->buildopened = '$date, created by <strong>$actor</strong>, Build <strong>$extra</strong>.' . "\n";
|
||||
|
||||
$lang->backhome = 'back';
|
||||
|
||||
$lang->build->featureBar['browse']['all'] = 'Build List';
|
||||
|
||||
@@ -68,3 +68,5 @@ $lang->build->action = new stdclass();
|
||||
$lang->build->action->buildopened = '$date, Build <strong>$extra</strong> créé par <strong>$actor</strong>.' . "\n";
|
||||
|
||||
$lang->backhome = 'Retour';
|
||||
|
||||
$lang->build->featureBar['browse']['all'] = 'Build List';
|
||||
|
||||
@@ -64,3 +64,5 @@ $lang->build->action = new stdclass();
|
||||
$lang->build->action->buildopened = '$date, được tạo bởi <strong>$actor</strong>, Bản dựng <strong>$extra</strong>.' . "\n";
|
||||
|
||||
$lang->backhome = 'Trở lại';
|
||||
|
||||
$lang->build->featureBar['browse']['all'] = 'Build List';
|
||||
|
||||
@@ -72,6 +72,7 @@ class buildModel extends model
|
||||
->beginIF($projectID)->andWhere('t1.project')->eq((int)$projectID)->fi()
|
||||
->beginIF($type == 'product' and $param)->andWhere('t1.product')->eq($param)->fi()
|
||||
->beginIF($type == 'bysearch')->andWhere($param)->fi()
|
||||
->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description';
|
||||
|
||||
$lang->caselib->libraryDelete = 'Do you want to delete this library?';
|
||||
$lang->caselib->noModule = '<div>You have no modules.</div><div>Manage it now.</div>';
|
||||
|
||||
$lang->caselib->featureBar['browse']['all'] = 'All';
|
||||
$lang->caselib->featureBar['browse']['wait'] = 'Waiting';
|
||||
|
||||
@@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description';
|
||||
|
||||
$lang->caselib->libraryDelete = 'Do you want to delete this library?';
|
||||
$lang->caselib->noModule = '<div>You have no modules.</div><div>Manage it now.</div>';
|
||||
|
||||
$lang->caselib->featureBar['browse']['all'] = 'All';
|
||||
$lang->caselib->featureBar['browse']['wait'] = 'Waiting';
|
||||
|
||||
@@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description';
|
||||
|
||||
$lang->caselib->libraryDelete = 'Voulez vous supprimer cette library ?';
|
||||
$lang->caselib->noModule = "<div>Vous n'avez aucun modules.</div><div>Gérer les modules maintenant.</div>";
|
||||
|
||||
$lang->caselib->featureBar['browse']['all'] = 'All';
|
||||
$lang->caselib->featureBar['browse']['wait'] = 'Waiting';
|
||||
|
||||
@@ -39,3 +39,6 @@ $lang->caselib->legendDesc = 'Mô tả';
|
||||
|
||||
$lang->caselib->libraryDelete = 'Bạn có muốn xóa thư viện này?';
|
||||
$lang->caselib->noModule = '<div>Chưa có Module.</div><div>Quản lý ngay.</div>';
|
||||
|
||||
$lang->caselib->featureBar['browse']['all'] = 'All';
|
||||
$lang->caselib->featureBar['browse']['wait'] = 'Waiting';
|
||||
|
||||
@@ -44,3 +44,6 @@ $lang->caselib->legendDesc = '描述';
|
||||
|
||||
$lang->caselib->libraryDelete = '您确认要删除该用例库吗?';
|
||||
$lang->caselib->noModule = '<div>您现在还没有模块信息</div><div>请维护用例库模块</div>';
|
||||
|
||||
$lang->caselib->featureBar['browse']['all'] = '所有';
|
||||
$lang->caselib->featureBar['browse']['wait'] = '待评审';
|
||||
|
||||
@@ -220,13 +220,14 @@ class caselibModel extends model
|
||||
$browseType = ($browseType == 'bymodule' and $this->session->libBrowseType and $this->session->libBrowseType != 'bysearch') ? $this->session->libBrowseType : $browseType;
|
||||
|
||||
$cases = array();
|
||||
if($browseType == 'bymodule' or $browseType == 'all' or $browseType == 'wait')
|
||||
if($browseType == 'bymodule' or $browseType == 'all' or $browseType == 'wait' or $browseType == 'review')
|
||||
{
|
||||
$cases = $this->dao->select('*')->from(TABLE_CASE)
|
||||
->where('lib')->eq((int)$libID)
|
||||
->andWhere('product')->eq(0)
|
||||
->beginIF($moduleIdList)->andWhere('module')->in($moduleIdList)->fi()
|
||||
->beginIF($browseType == 'wait')->andWhere('status')->eq($browseType)->fi()
|
||||
->beginIF($browseType == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', `reviewers`)")->fi()
|
||||
->andWhere('deleted')->eq('0')
|
||||
->orderBy($sort)->page($pager)->fetchAll('id');
|
||||
}
|
||||
|
||||
@@ -40,10 +40,12 @@ js::set('flow', $config->global->flow);
|
||||
</div>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php
|
||||
if(common::hasPriv('caselib', 'browse'))
|
||||
common::sortFeatureMenu();
|
||||
if(!$config->testcase->needReview && empty($config->testcase->forceReview)) unset($lang->caselib->featureBar['browse']['wait']);
|
||||
foreach($lang->caselib->featureBar['browse'] as $featureType => $label)
|
||||
{
|
||||
echo html::a($this->inlink('browse', "libID=$libID&browseType=all"), "<span class='text'>{$lang->testcase->allCases}</span>", '', "id='allTab' class='btn btn-link'");
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) echo html::a($this->inlink('browse', "libID=$libID&browseType=wait"), "<span class='text'>" . $lang->testcase->statusList['wait'] . "</span>", '', "id='waitTab' class='btn btn-link'");
|
||||
$activeClass = $browseType == $featureType ? 'btn-active-text' : '';
|
||||
echo html::a(inlink('browse', "libID=$libID&browseType=$featureType"), "<span class='text'>$label</span>", '',"class='btn btn-link $activeClass' data-app={$app->tab} id=" . $featureType .'Tab');
|
||||
}
|
||||
?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->testcase->bySearch;?></a>
|
||||
|
||||
+12
-10
@@ -149,16 +149,18 @@ class ci extends control
|
||||
->fetch();
|
||||
|
||||
$testtask = new stdclass();
|
||||
$testtask->product = $productID;
|
||||
$testtask->name = !empty($post->name) ? $post->name : sprintf($this->lang->testtask->titleOfAuto, date('Y-m-d H:i:s'));
|
||||
$testtask->owner = $this->app->user->account;
|
||||
$testtask->project = $lastProject->project;
|
||||
$testtask->execution = $lastProject->id;
|
||||
$testtask->build = 'trunk';
|
||||
$testtask->auto = strtolower($testType);
|
||||
$testtask->begin = date('Y-m-d');
|
||||
$testtask->end = date('Y-m-d', time() + 24 * 3600);
|
||||
$testtask->status = 'done';
|
||||
$testtask->product = $productID;
|
||||
$testtask->name = !empty($post->name) ? $post->name : sprintf($this->lang->testtask->titleOfAuto, date('Y-m-d H:i:s'));
|
||||
$testtask->owner = $this->app->user->account;
|
||||
$testtask->project = $lastProject->project;
|
||||
$testtask->execution = $lastProject->id;
|
||||
$testtask->build = 'trunk';
|
||||
$testtask->auto = strtolower($testType);
|
||||
$testtask->begin = date('Y-m-d');
|
||||
$testtask->end = date('Y-m-d', time() + 24 * 3600);
|
||||
$testtask->status = 'done';
|
||||
$testtask->createdBy = $this->app->user->account;
|
||||
$testtask->createdDate = helper::now();
|
||||
|
||||
$this->dao->insert(TABLE_TESTTASK)->data($testtask)->exec();
|
||||
$taskID = $this->dao->lastInsertId();
|
||||
|
||||
@@ -3373,6 +3373,45 @@ EOD;
|
||||
|
||||
return $Parsedown->text($markdown);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort featureBar.
|
||||
*
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @static
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public static function sortFeatureMenu($module = '', $method = '')
|
||||
{
|
||||
global $lang, $app;
|
||||
|
||||
$module = $module ? $module : $app->rawModule;
|
||||
$method = $method ? $method : $app->rawMethod;
|
||||
|
||||
/* It will be sorted according to the workflow in the future */
|
||||
if(!empty($lang->featureBarSort[$module][$method]))
|
||||
{
|
||||
$featureBar = array();
|
||||
if(empty($lang->$module->featureBar[$method])) return false;
|
||||
foreach($lang->$module->featureBar[$method] as $key => $label)
|
||||
{
|
||||
foreach($lang->featureBarSort[$module][$method] as $currentKey => $afterKey)
|
||||
{
|
||||
if($key == $currentKey) continue;
|
||||
$featureBar[$method][$key] = $label;
|
||||
if($key == $afterKey && !empty($lang->$module->featureBar[$method][$currentKey]))
|
||||
{
|
||||
$featureBar[$method][$currentKey] = $lang->$module->featureBar[$method][$currentKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
$lang->$module->featureBar = $featureBar;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class common extends commonModel
|
||||
|
||||
@@ -385,7 +385,9 @@ class redmine11ConvertModel extends redmineConvertModel
|
||||
/* Insert into zentao */
|
||||
foreach($productPlans as $id => $productPlan)
|
||||
{
|
||||
$productPlan->product = $this->map['products'][$productPlan->execution_id];
|
||||
$productPlan->product = $this->map['products'][$productPlan->execution_id];
|
||||
$productPlan->createdBy = $this->app->user->account;
|
||||
$productPlan->createdDate = helper::now();
|
||||
unset($productPlan->id);
|
||||
unset($productPlan->execution_id);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_PRODUCTPLAN)->data($productPlan)->exec();
|
||||
@@ -395,7 +397,9 @@ class redmine11ConvertModel extends redmineConvertModel
|
||||
foreach($this->map['products'] as $productID)
|
||||
{
|
||||
$productPlan = $this->dao->dbh($this->dbh)->select("name as title, createdDate as begin")->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch();
|
||||
$productPlan->product = $productID;
|
||||
$productPlan->product = $productID;
|
||||
$productPlan->createdBy = $this->app->user->account;
|
||||
$productPlan->createdDate = helper::now();
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_PRODUCTPLAN)->data($productPlan)->exec();
|
||||
$this->map['planOfProduct'][$productID] = $this->dao->lastinsertID();
|
||||
}
|
||||
|
||||
@@ -989,12 +989,14 @@ class convertModel extends model
|
||||
if(empty($data->RELEASEDATE)) continue;
|
||||
|
||||
$release = new stdclass();
|
||||
$release->product = $build->product;
|
||||
$release->build = $buildID;
|
||||
$release->name = $build->name;
|
||||
$release->date = $build->date;
|
||||
$release->desc = $data->DESCRIPTION;
|
||||
$release->status = 'normal';
|
||||
$release->product = $build->product;
|
||||
$release->build = $buildID;
|
||||
$release->name = $build->name;
|
||||
$release->date = $build->date;
|
||||
$release->desc = $data->DESCRIPTION;
|
||||
$release->status = 'normal';
|
||||
$release->createdBy = $this->app->user->account;
|
||||
$release->createdDate = helper::now();
|
||||
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_RELEASE)->data($release)->exec();
|
||||
$releaseID = $this->dao->dbh($this->dbh)->lastInsertID();
|
||||
|
||||
@@ -513,6 +513,8 @@ $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['build']['all'] = 'Build List';
|
||||
|
||||
$lang->execution->myExecutions = 'Ich bin beteiligt.';
|
||||
$lang->execution->doingProject = 'Laufende Projekte';
|
||||
|
||||
|
||||
@@ -513,6 +513,8 @@ $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['build']['all'] = 'Build List';
|
||||
|
||||
$lang->execution->myExecutions = 'Mine';
|
||||
$lang->execution->doingProject = 'Ongoing Projects';
|
||||
|
||||
|
||||
@@ -513,6 +513,8 @@ $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['build']['all'] = 'Build List';
|
||||
|
||||
$lang->execution->myExecutions = "J'étais impliqué";
|
||||
$lang->execution->doingProject = 'Projets en cours';
|
||||
|
||||
|
||||
@@ -418,6 +418,8 @@ $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['build']['all'] = 'Build List';
|
||||
|
||||
$lang->execution->myExecutions = 'Tôi tham gia';
|
||||
$lang->execution->doingProject = 'Hiện trường';
|
||||
|
||||
|
||||
@@ -513,6 +513,8 @@ $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['build']['all'] = '所有版本';
|
||||
|
||||
$lang->execution->myExecutions = '我参与的';
|
||||
$lang->execution->doingProject = '进行中的项目';
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php common::sortFeatureMenu();?>
|
||||
<?php foreach($lang->execution->featureBar['all'] as $key => $label):?>
|
||||
<?php $label = "<span class='text'>$label</span>";?>
|
||||
<?php if($status == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
<div id="mainMenu" class="clearfix table-row">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
$label = "<span class='text'>{$lang->execution->build}</span>";
|
||||
$active = '';
|
||||
if($type == 'all')
|
||||
common::sortFeatureMenu();
|
||||
foreach($lang->execution->featureBar['build'] as $featureType => $label)
|
||||
{
|
||||
$active = 'btn-active-text';
|
||||
$label .= " <span class='label label-light label-badge'>{$buildsTotal}</span>";
|
||||
$label = "<span class='text'>$label</span>";
|
||||
$activeClass = $type == $featureType ? 'btn-active-text' : '';
|
||||
if($type == $featureType) $label .= " <span class='label label-light label-badge'>{$buildsTotal}</span>";
|
||||
echo html::a(inlink('build', "executionID=$executionID&type=$featureType"), $label, '',"class='btn btn-link $activeClass' data-app={$app->tab} id='$featureType'");
|
||||
}
|
||||
echo html::a(inlink('build', "executionID={$executionID}&type=all"), $label, '', "class='btn btn-link $active' id='all'")
|
||||
?>
|
||||
<div class="input-control space w-150px"><?php echo html::select('product', $products, $product, "onchange='changeProduct(this.value)' class='form-control chosen' data-placeholder='{$lang->productCommon}'");?></div>
|
||||
</div>
|
||||
|
||||
@@ -49,13 +49,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
if(common::hasPriv('execution', 'story'))
|
||||
{
|
||||
echo html::a($this->createLink('execution', 'story', "executionID=$execution->id&orderBy=order_desc&type=all"), "<span class='text'>{$lang->all}</span>" . ($type == 'all' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : ''), '', "class='btn btn-link" . ($type == 'all' ? " btn-active-text" : '') . "'");
|
||||
echo html::a($this->createLink('execution', 'story', "executionID=$execution->id&orderBy=order_desc&type=unclosed"), "<span class='text'>{$lang->story->unclosed}</span>" . ($type == 'unclosed' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : ''), '', "class='btn btn-link" . ($type == 'unclosed' ? " btn-active-text" : '') . "'");
|
||||
}
|
||||
?>
|
||||
<?php foreach($lang->story->featureBar['browse'] as $featureType => $label):?>
|
||||
<?php $active = $type == $featureType ? 'btn-active-text' : '';?>
|
||||
<?php $label = "<span class='text'>$label</span>";?>
|
||||
<?php if($type == $featureType) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('story', "executionID=$execution->id&orderBy=order_desc&type=$featureType"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->product->searchStory;?></a>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
|
||||
@@ -59,6 +59,7 @@ body {margin-bottom: 25px;}
|
||||
</div>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
common::sortFeatureMenu();
|
||||
foreach(customModel::getFeatureMenu('execution', 'task') as $menuItem)
|
||||
{
|
||||
if($execution->type == 'ops' && $menuItem->name == 'needconfirm') continue;
|
||||
|
||||
@@ -272,7 +272,7 @@ class productModel extends model
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->products)->fi()
|
||||
->andWhere('t1.vision')->eq($this->config->vision)->fi()
|
||||
->beginIF($status == 'noclosed')->andWhere('t1.status')->ne('closed')->fi()
|
||||
->beginIF($status != 'all' and $status != 'noclosed' and $status != 'involved')->andWhere('t1.status')->in($status)->fi()
|
||||
->beginIF(!in_array($status, array('all', 'noclosed', 'involved', 'review'), true))->andWhere('t1.status')->in($status)->fi()
|
||||
->beginIF($status == 'involved')
|
||||
->andWhere('t1.PO', true)->eq($this->app->user->account)
|
||||
->orWhere('t1.QD')->eq($this->app->user->account)
|
||||
@@ -280,6 +280,10 @@ class productModel extends model
|
||||
->orWhere('t1.createdBy')->eq($this->app->user->account)
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->beginIF($status == 'review')
|
||||
->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")
|
||||
->andWhere('t1.reviewStatus')->eq('doing')
|
||||
->fi()
|
||||
->orderBy('t2.order_asc, t1.line_desc, t1.order_asc')
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<?php include '../../common/view/sortable.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php common::sortFeatureMenu();?>
|
||||
<?php foreach($lang->product->featureBar['all'] as $key => $label):?>
|
||||
<?php $recTotalLabel = $browseType == $key ? " <span class='label label-light label-badge'>{$recTotal}</span>" : '';?>
|
||||
<?php echo html::a(inlink("all", "browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>" . $recTotalLabel, '', "class='btn btn-link' id='{$key}Tab'");?>
|
||||
|
||||
@@ -105,9 +105,10 @@ class productplanModel extends model
|
||||
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('product')->eq($product)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF(!empty($branch) and $branch != 'all')->andWhere('branch')->eq($branch)->fi()
|
||||
->beginIF(strpos(',all,undone,bySearch,', ",$browseType,") === false)->andWhere('status')->eq($browseType)->fi()
|
||||
->beginIF(strpos(',all,undone,bySearch,review,', ",$browseType,") === false)->andWhere('status')->eq($browseType)->fi()
|
||||
->beginIF($browseType == 'undone')->andWhere('status')->in('wait,doing')->fi()
|
||||
->beginIF($browseType == 'bySearch')->andWhere($productplanQuery)->fi()
|
||||
->beginIF($browseType == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', reviewers)")->fi()
|
||||
->beginIF(strpos($param, 'skipparent') !== false)->andWhere('parent')->ne(-1)->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
@@ -443,6 +444,8 @@ class productplanModel extends model
|
||||
$plan = fixer::input('post')->stripTags($this->config->productplan->editor->create['id'], $this->config->allowedTags)
|
||||
->setIF($this->post->future || empty($_POST['begin']), 'begin', $this->config->productplan->future)
|
||||
->setIF($this->post->future || empty($_POST['end']), 'end', $this->config->productplan->future)
|
||||
->setDefault('createdBy', $this->app->user->account)
|
||||
->setDefault('createdDate', helper::now())
|
||||
->remove('delta,uid,future')
|
||||
->get();
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
</style>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php common::sortFeatureMenu();?>
|
||||
<?php foreach(customModel::getFeatureMenu($this->moduleName, $this->methodName) as $menuItem):?>
|
||||
<?php if(isset($menuItem->hidden)) continue;?>
|
||||
<?php $label = "<span class='text'>{$menuItem->text}</span>";?>
|
||||
|
||||
@@ -139,12 +139,12 @@ $lang->program->statusList['doing'] = 'Doing';
|
||||
$lang->program->statusList['suspended'] = 'Suspended';
|
||||
$lang->program->statusList['closed'] = 'Closed';
|
||||
|
||||
$lang->program->featureBar['all'] = 'All';
|
||||
$lang->program->featureBar['unclosed'] = 'Unclosed';
|
||||
$lang->program->featureBar['wait'] = 'Waiting';
|
||||
$lang->program->featureBar['doing'] = 'Doing';
|
||||
$lang->program->featureBar['suspended'] = 'Suspended';
|
||||
$lang->program->featureBar['closed'] = 'Closed';
|
||||
$lang->program->featureBar['browse']['all'] = 'All';
|
||||
$lang->program->featureBar['browse']['unclosed'] = 'Unclosed';
|
||||
$lang->program->featureBar['browse']['wait'] = 'Waiting';
|
||||
$lang->program->featureBar['browse']['doing'] = 'Doing';
|
||||
$lang->program->featureBar['browse']['suspended'] = 'Suspended';
|
||||
$lang->program->featureBar['browse']['closed'] = 'Closed';
|
||||
|
||||
$lang->program->kanban = new stdclass();
|
||||
$lang->program->kanban->common = 'Program Kanban';
|
||||
|
||||
@@ -139,12 +139,12 @@ $lang->program->statusList['doing'] = 'Doing';
|
||||
$lang->program->statusList['suspended'] = 'Suspended';
|
||||
$lang->program->statusList['closed'] = 'Closed';
|
||||
|
||||
$lang->program->featureBar['all'] = 'All';
|
||||
$lang->program->featureBar['unclosed'] = 'Unclosed';
|
||||
$lang->program->featureBar['wait'] = 'Waiting';
|
||||
$lang->program->featureBar['doing'] = 'Doing';
|
||||
$lang->program->featureBar['suspended'] = 'Suspended';
|
||||
$lang->program->featureBar['closed'] = 'Closed';
|
||||
$lang->program->featureBar['browse']['all'] = 'All';
|
||||
$lang->program->featureBar['browse']['unclosed'] = 'Unclosed';
|
||||
$lang->program->featureBar['browse']['wait'] = 'Waiting';
|
||||
$lang->program->featureBar['browse']['doing'] = 'Doing';
|
||||
$lang->program->featureBar['browse']['suspended'] = 'Suspended';
|
||||
$lang->program->featureBar['browse']['closed'] = 'Closed';
|
||||
|
||||
$lang->program->kanban = new stdclass();
|
||||
$lang->program->kanban->common = 'Program Kanban';
|
||||
|
||||
@@ -139,12 +139,12 @@ $lang->program->statusList['doing'] = 'Doing';
|
||||
$lang->program->statusList['suspended'] = 'Suspended';
|
||||
$lang->program->statusList['closed'] = 'Closed';
|
||||
|
||||
$lang->program->featureBar['all'] = 'All';
|
||||
$lang->program->featureBar['unclosed'] = 'Unclosed';
|
||||
$lang->program->featureBar['wait'] = 'En Attente';
|
||||
$lang->program->featureBar['doing'] = 'En Cours';
|
||||
$lang->program->featureBar['suspended'] = 'Suspendues';
|
||||
$lang->program->featureBar['closed'] = 'Fermées';
|
||||
$lang->program->featureBar['browse']['all'] = 'All';
|
||||
$lang->program->featureBar['browse']['unclosed'] = 'Unclosed';
|
||||
$lang->program->featureBar['browse']['wait'] = 'En Attente';
|
||||
$lang->program->featureBar['browse']['doing'] = 'En Cours';
|
||||
$lang->program->featureBar['browse']['suspended'] = 'Suspendues';
|
||||
$lang->program->featureBar['browse']['closed'] = 'Fermées';
|
||||
|
||||
$lang->program->kanban = new stdclass();
|
||||
$lang->program->kanban->common = 'Program Kanban';
|
||||
|
||||
@@ -96,7 +96,12 @@ $lang->program->statusList['doing'] = 'Doing';
|
||||
$lang->program->statusList['suspended'] = 'Suspended';
|
||||
$lang->program->statusList['closed'] = 'Closed';
|
||||
|
||||
$lang->program->featureBar['all'] = 'All';
|
||||
$lang->program->featureBar['browse']['all'] = 'All';
|
||||
$lang->program->featureBar['browse']['unclosed'] = 'Unclosed';
|
||||
$lang->program->featureBar['browse']['wait'] = 'Waiting';
|
||||
$lang->program->featureBar['browse']['doing'] = 'Doing';
|
||||
$lang->program->featureBar['browse']['suspended'] = 'Suspended';
|
||||
$lang->program->featureBar['browse']['closed'] = 'Closed';
|
||||
|
||||
$lang->program->kanban = new stdclass();
|
||||
$lang->program->kanban->common = 'Program Kanban';
|
||||
|
||||
@@ -139,12 +139,12 @@ $lang->program->statusList['doing'] = '进行中';
|
||||
$lang->program->statusList['suspended'] = '已挂起';
|
||||
$lang->program->statusList['closed'] = '已关闭';
|
||||
|
||||
$lang->program->featureBar['all'] = '所有';
|
||||
$lang->program->featureBar['unclosed'] = '未关闭';
|
||||
$lang->program->featureBar['wait'] = '未开始';
|
||||
$lang->program->featureBar['doing'] = '进行中';
|
||||
$lang->program->featureBar['suspended'] = '已挂起';
|
||||
$lang->program->featureBar['closed'] = '已关闭';
|
||||
$lang->program->featureBar['browse']['all'] = '所有';
|
||||
$lang->program->featureBar['browse']['unclosed'] = '未关闭';
|
||||
$lang->program->featureBar['browse']['wait'] = '未开始';
|
||||
$lang->program->featureBar['browse']['doing'] = '进行中';
|
||||
$lang->program->featureBar['browse']['suspended'] = '已挂起';
|
||||
$lang->program->featureBar['browse']['closed'] = '已关闭';
|
||||
|
||||
$lang->program->kanban = new stdclass();
|
||||
$lang->program->kanban->common = '项目集看板';
|
||||
|
||||
@@ -574,8 +574,12 @@ class programModel extends model
|
||||
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('t1.type')->eq('project')->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and ($this->cookie->involved or $involved))->andWhere('t2.type')->eq('project')->fi()
|
||||
->beginIF($browseType != 'all' and $browseType != 'undone' and $browseType != 'bysearch')->andWhere('t1.status')->eq($browseType)->fi()
|
||||
->beginIF(!in_array($browseType, array('all', 'undone', 'bysearch', 'review'), true))->andWhere('t1.status')->eq($browseType)->fi()
|
||||
->beginIF($browseType == 'undone')->andWhere('t1.status')->in('wait,doing')->fi()
|
||||
->beginIF($browseType == 'review')
|
||||
->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")
|
||||
->andWhere('t1.reviewStatus')->eq('doing')
|
||||
->fi()
|
||||
->beginIF($path)->andWhere('t1.path')->like($path . '%')->fi()
|
||||
->beginIF(!$queryAll and !$this->app->user->admin and $this->config->systemMode == 'new')->andWhere('t1.id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF(!$queryAll and !$this->app->user->admin and $this->config->systemMode == 'classic')->andWhere('t1.id')->in($this->app->user->view->sprints)->fi()
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
<?php endif;?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class="btn-toolBar pull-left">
|
||||
<?php foreach($lang->program->featureBar as $key => $label):?>
|
||||
<?php common::sortFeatureMenu();?>
|
||||
<?php foreach($lang->program->featureBar['browse'] as $key => $label):?>
|
||||
<?php $active = $status == $key ? 'btn-active-text' : '';?>
|
||||
<?php $label = "<span class='text'>$label</span>";?>
|
||||
<?php echo html::a(inlink('browse', "status=$key&orderBy=$orderBy"), $label, '', "class='btn btn-link $active'");?>
|
||||
|
||||
@@ -241,12 +241,14 @@ $lang->project->modelList['scrum'] = "Scrum";
|
||||
$lang->project->modelList['waterfall'] = "CMMI";
|
||||
$lang->project->modelList['kanban'] = "Kanban";
|
||||
|
||||
$lang->project->featureBar['all'] = 'All';
|
||||
$lang->project->featureBar['undone'] = 'Unfinished';
|
||||
$lang->project->featureBar['wait'] = 'Waiting';
|
||||
$lang->project->featureBar['doing'] = 'Doing';
|
||||
$lang->project->featureBar['suspended'] = 'Suspended';
|
||||
$lang->project->featureBar['closed'] = 'Closed';
|
||||
$lang->project->featureBar['browse']['all'] = 'All';
|
||||
$lang->project->featureBar['browse']['undone'] = 'Unfinished';
|
||||
$lang->project->featureBar['browse']['wait'] = 'Waiting';
|
||||
$lang->project->featureBar['browse']['doing'] = 'Doing';
|
||||
$lang->project->featureBar['browse']['suspended'] = 'Suspended';
|
||||
$lang->project->featureBar['browse']['closed'] = 'Closed';
|
||||
|
||||
$lang->project->featureBar['build']['all'] = 'Build List';
|
||||
|
||||
$lang->project->aclList['private'] = 'Private (For team members and stakeholders only)';
|
||||
$lang->project->aclList['open'] = "Open (accessible with project view permissions)";
|
||||
|
||||
@@ -241,12 +241,14 @@ $lang->project->modelList['scrum'] = "Scrum";
|
||||
$lang->project->modelList['waterfall'] = "CMMI";
|
||||
$lang->project->modelList['kanban'] = "Kanban";
|
||||
|
||||
$lang->project->featureBar['all'] = 'All';
|
||||
$lang->project->featureBar['undone'] = 'Unfinished';
|
||||
$lang->project->featureBar['wait'] = 'Waiting';
|
||||
$lang->project->featureBar['doing'] = 'Doing';
|
||||
$lang->project->featureBar['suspended'] = 'Suspended';
|
||||
$lang->project->featureBar['closed'] = 'Closed';
|
||||
$lang->project->featureBar['browse']['all'] = 'All';
|
||||
$lang->project->featureBar['browse']['undone'] = 'Unfinished';
|
||||
$lang->project->featureBar['browse']['wait'] = 'Waiting';
|
||||
$lang->project->featureBar['browse']['doing'] = 'Doing';
|
||||
$lang->project->featureBar['browse']['suspended'] = 'Suspended';
|
||||
$lang->project->featureBar['browse']['closed'] = 'Closed';
|
||||
|
||||
$lang->project->featureBar['build']['all'] = 'Build List';
|
||||
|
||||
$lang->project->aclList['private'] = 'Private (For the project leader, team members and stakeholders only)';
|
||||
$lang->project->aclList['open'] = "Open (accessible with project view permissions)";
|
||||
|
||||
@@ -241,12 +241,14 @@ $lang->project->modelList['scrum'] = "Scrum";
|
||||
$lang->project->modelList['waterfall'] = "CMMI";
|
||||
$lang->project->modelList['kanban'] = "Kanban";
|
||||
|
||||
$lang->project->featureBar['all'] = 'All';
|
||||
$lang->project->featureBar['undone'] = 'Non Terminées';
|
||||
$lang->project->featureBar['wait'] = 'En Attente';
|
||||
$lang->project->featureBar['doing'] = 'En Cours';
|
||||
$lang->project->featureBar['suspended'] = 'Suspendues';
|
||||
$lang->project->featureBar['closed'] = 'Fermées';
|
||||
$lang->project->featureBar['browse']['all'] = 'All';
|
||||
$lang->project->featureBar['browse']['undone'] = 'Non Terminées';
|
||||
$lang->project->featureBar['browse']['wait'] = 'En Attente';
|
||||
$lang->project->featureBar['browse']['doing'] = 'En Cours';
|
||||
$lang->project->featureBar['browse']['suspended'] = 'Suspendues';
|
||||
$lang->project->featureBar['browse']['closed'] = 'Fermées';
|
||||
|
||||
$lang->project->featureBar['build']['all'] = 'Build List';
|
||||
|
||||
$lang->project->aclList['private'] = 'Private (For team members and stakeholders only)';
|
||||
$lang->project->aclList['open'] = "Open (accessible with project view permissions)";
|
||||
|
||||
@@ -160,11 +160,13 @@ $lang->project->currencySymbol['SGD'] = 'S$';
|
||||
$lang->project->modelList['scrum'] = "Scrum";
|
||||
$lang->project->modelList['waterfall'] = "CMMI";
|
||||
|
||||
$lang->project->featureBar['all'] = 'All';
|
||||
$lang->project->featureBar['doing'] = 'Doing';
|
||||
$lang->project->featureBar['wait'] = 'Waiting';
|
||||
$lang->project->featureBar['suspended'] = 'Suspended';
|
||||
$lang->project->featureBar['closed'] = 'Closed';
|
||||
$lang->project->featureBar['browse']['all'] = 'All';
|
||||
$lang->project->featureBar['browse']['doing'] = 'Doing';
|
||||
$lang->project->featureBar['browse']['wait'] = 'Waiting';
|
||||
$lang->project->featureBar['browse']['suspended'] = 'Suspended';
|
||||
$lang->project->featureBar['browse']['closed'] = 'Closed';
|
||||
|
||||
$lang->project->featureBar['build']['all'] = 'Build List';
|
||||
|
||||
$lang->project->aclList['private'] = 'Private (For team members and stakeholders only)';
|
||||
$lang->project->aclList['open'] = "Open (accessible with project view permissions)";
|
||||
|
||||
@@ -241,12 +241,14 @@ $lang->project->modelList['scrum'] = "Scrum";
|
||||
$lang->project->modelList['waterfall'] = "瀑布";
|
||||
$lang->project->modelList['kanban'] = "看板";
|
||||
|
||||
$lang->project->featureBar['all'] = '所有';
|
||||
$lang->project->featureBar['undone'] = '未完成';
|
||||
$lang->project->featureBar['wait'] = '未开始';
|
||||
$lang->project->featureBar['doing'] = '进行中';
|
||||
$lang->project->featureBar['suspended'] = '已挂起';
|
||||
$lang->project->featureBar['closed'] = '已关闭';
|
||||
$lang->project->featureBar['browse']['all'] = '所有';
|
||||
$lang->project->featureBar['browse']['undone'] = '未完成';
|
||||
$lang->project->featureBar['browse']['wait'] = '未开始';
|
||||
$lang->project->featureBar['browse']['doing'] = '进行中';
|
||||
$lang->project->featureBar['browse']['suspended'] = '已挂起';
|
||||
$lang->project->featureBar['browse']['closed'] = '已关闭';
|
||||
|
||||
$lang->project->featureBar['build']['all'] = '所有版本';
|
||||
|
||||
$lang->project->aclList['private'] = "私有 (只有项目负责人、团队成员和干系人可访问)";
|
||||
$lang->project->aclList['open'] = "公开 (有项目视图权限即可访问)";
|
||||
|
||||
@@ -2355,7 +2355,11 @@ class projectModel extends model
|
||||
->beginIF($projectID == 0 and $this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi()
|
||||
->beginIF(!empty($myExecutionIDList))->andWhere('t1.id')->in(array_keys($myExecutionIDList))->fi()
|
||||
->beginIF($status == 'undone')->andWhere('t1.status')->notIN('done,closed')->fi()
|
||||
->beginIF($status != 'all' and $status != 'undone' and $status != 'involved')->andWhere('t1.status')->eq($status)->fi()
|
||||
->beginIF(!in_array($status, array('all', 'undone', 'involved', 'review'), true))->andWhere('t1.status')->eq($status)->fi()
|
||||
->beginIF($status == 'review')
|
||||
->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")
|
||||
->andWhere('t1.reviewStatus')->eq('doing')
|
||||
->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->sprints)->fi()
|
||||
->andWhere('t1.vision')->eq($this->config->vision)
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
<div class="btn-toolBar pull-left">
|
||||
<?php $excludedEmptyPrograms = array_filter($programs);?>
|
||||
<div class="input-control w-150px" id='programBox'><?php echo html::select('programID', $programs, $programID, "onchange=changeProgram(this.value) class='form-control chosen' data-placeholder='{$lang->project->selectProgram}' data-drop_width='" . (empty($excludedEmptyPrograms) ? 170 : 450) . "' data-max_drop_width='0'");?></div>
|
||||
<?php foreach($lang->project->featureBar as $key => $label):?>
|
||||
<?php common::sortFeatureMenu();?>
|
||||
<?php foreach($lang->project->featureBar['browse'] as $key => $label):?>
|
||||
<?php $active = $browseType == $key ? 'btn-active-text' : '';?>
|
||||
<?php $label = "<span class='text'>$label</span>";?>
|
||||
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="btn-toolBar pull-left">
|
||||
<?php foreach($lang->project->featureBar as $key => $label):?>
|
||||
<?php common::sortFeatureMenu();?>
|
||||
<?php foreach($lang->project->featureBar['browse'] as $key => $label):?>
|
||||
<?php $active = $browseType == $key ? 'btn-active-text' : '';?>
|
||||
<?php $label = "<span class='text'>$label</span>";?>
|
||||
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
<div id="mainMenu" class="clearfix table-row">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
$label = "<span class='text'>{$lang->execution->build}</span>";
|
||||
$active = '';
|
||||
if($type == 'all')
|
||||
common::sortFeatureMenu();
|
||||
foreach($lang->project->featureBar['build'] as $featureType => $label)
|
||||
{
|
||||
$active = 'btn-active-text';
|
||||
$label .= " <span class='label label-light label-badge'>{$buildsTotal}</span>";
|
||||
$activeClass = $type == $featureType ? 'btn-active-text' : '';
|
||||
$label = "<span class='text'>$label</span>";
|
||||
if($type == $featureType) $label .= " <span class='label label-light label-badge'>{$buildsTotal}</span>";
|
||||
echo html::a(inlink('build', "projectID=$projectID&type=$featureType"), $label, '',"class='btn btn-link $activeClass' data-app={$app->tab} id=" . $featureType .'Tab');
|
||||
}
|
||||
echo html::a(inlink('build', "projectID=$projectID&type=all"), $label, '', "class='btn btn-link $active' id='all'")
|
||||
?>
|
||||
<div class="input-control space w-150px"><?php echo html::select('product', $products, $product, "onchange='changeProduct(this.value)' class='form-control chosen' data-placeholder='{$lang->productCommon}'");?></div>
|
||||
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->execution->byQuery;?></a>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php common::sortFeatureMenu('execution', 'all');?>
|
||||
<?php foreach($lang->execution->featureBar['all'] as $key => $label):?>
|
||||
<?php $label = "<span class='text'>$label</span>";?>
|
||||
<?php if($status == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
|
||||
@@ -27,3 +27,7 @@ $lang->projectrelease->unlinkBug = 'Unlink Bug';
|
||||
$lang->projectrelease->export = 'Export as HTML';
|
||||
$lang->projectrelease->browseAction = "Release List";
|
||||
$lang->projectrelease->notify = 'notify';
|
||||
|
||||
$lang->projectrelease->featureBar['browse']['all'] = 'All';
|
||||
$lang->projectrelease->featureBar['browse']['normal'] = 'Active';
|
||||
$lang->projectrelease->featureBar['browse']['terminate'] = 'Terminated';
|
||||
|
||||
@@ -27,3 +27,7 @@ $lang->projectrelease->unlinkBug = 'Unlink Bug';
|
||||
$lang->projectrelease->export = 'Export as HTML';
|
||||
$lang->projectrelease->browseAction = "Release List";
|
||||
$lang->projectrelease->notify = 'notify';
|
||||
|
||||
$lang->projectrelease->featureBar['browse']['all'] = 'All';
|
||||
$lang->projectrelease->featureBar['browse']['normal'] = 'Active';
|
||||
$lang->projectrelease->featureBar['browse']['terminate'] = 'Terminated';
|
||||
|
||||
@@ -27,3 +27,7 @@ $lang->projectrelease->unlinkBug = 'Unlink Bug';
|
||||
$lang->projectrelease->export = 'Export HTML';
|
||||
$lang->projectrelease->browseAction = "Release List";
|
||||
$lang->projectrelease->notify = 'notify';
|
||||
|
||||
$lang->projectrelease->featureBar['browse']['all'] = 'All';
|
||||
$lang->projectrelease->featureBar['browse']['normal'] = 'Active';
|
||||
$lang->projectrelease->featureBar['browse']['terminate'] = 'Terminated';
|
||||
|
||||
@@ -27,3 +27,7 @@ $lang->projectrelease->unlinkBug = 'Unlink Bug';
|
||||
$lang->projectrelease->export = 'Xuất ra HTML';
|
||||
$lang->projectrelease->browseAction = "Release List";
|
||||
$lang->projectrelease->notify = 'notify';
|
||||
|
||||
$lang->projectrelease->featureBar['browse']['all'] = 'All';
|
||||
$lang->projectrelease->featureBar['browse']['normal'] = 'Active';
|
||||
$lang->projectrelease->featureBar['browse']['terminate'] = 'Terminated';
|
||||
|
||||
@@ -27,3 +27,7 @@ $lang->projectrelease->unlinkBug = '移除Bug';
|
||||
$lang->projectrelease->export = '导出HTML';
|
||||
$lang->projectrelease->browseAction = "发布列表";
|
||||
$lang->projectrelease->notify = "通知";
|
||||
|
||||
$lang->projectrelease->featureBar['browse']['all'] = '全部';
|
||||
$lang->projectrelease->featureBar['browse']['normal'] = '正常';
|
||||
$lang->projectrelease->featureBar['browse']['terminate'] = '停止维护';
|
||||
|
||||
@@ -57,7 +57,8 @@ class projectreleaseModel extends model
|
||||
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t4')->on('t3.execution = t4.id')
|
||||
->where('t1.project')->eq((int)$projectID)
|
||||
->beginIF($type != 'all')->andWhere('t1.status')->eq($type)->fi()
|
||||
->beginIF($type != 'all' && $type != 'review')->andWhere('t1.status')->eq($type)->fi()
|
||||
->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy($orderBy)
|
||||
->fetchAll();
|
||||
|
||||
@@ -16,9 +16,14 @@
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
echo html::a(inlink('browse', "projectID=$projectID&executionID=$executionID&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "' data-app='$from'");
|
||||
echo html::a(inlink('browse', "projectID=$projectID&executionID=$executionID&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "' data-app='$from'");
|
||||
echo html::a(inlink('browse', "projectID=$projectID&executionID=$executionID&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "' data-app='$from'");
|
||||
common::sortFeatureMenu();
|
||||
foreach($lang->projectrelease->featureBar['browse'] as $featureType => $label)
|
||||
{
|
||||
$active = $type == $featureType ? 'btn-active-text' : '';
|
||||
$label = "<span class='text'>$label</span>";
|
||||
if($type == $featureType) $label .= " <span class='label label-light label-badge'>" . count($releases) . "</span>";
|
||||
echo html::a(inlink('browse', "projectID={$projectID}&executionID=$executionID&type=$featureType"), $label, '', "id='{$featureType}Tab' data-app='$from' class='btn btn-link $active'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
|
||||
@@ -90,3 +90,7 @@ $lang->release->notifyList['SC'] = 'Story Creator';
|
||||
$lang->release->notifyList['ET'] = "{$lang->execution->common} Team Members";
|
||||
$lang->release->notifyList['PT'] = "Project Team Members";
|
||||
$lang->release->notifyList['CT'] = "Copy To";
|
||||
|
||||
$lang->release->featureBar['browse']['all'] = $lang->release->all;
|
||||
$lang->release->featureBar['browse']['normal'] = $lang->release->statusList['normal'];
|
||||
$lang->release->featureBar['browse']['terminate'] = $lang->release->statusList['terminate'];
|
||||
|
||||
@@ -90,3 +90,7 @@ $lang->release->notifyList['SC'] = 'Story Creator';
|
||||
$lang->release->notifyList['ET'] = "{$lang->execution->common} Team Members";
|
||||
$lang->release->notifyList['PT'] = "Project Team Members";
|
||||
$lang->release->notifyList['CT'] = "Copy To";
|
||||
|
||||
$lang->release->featureBar['browse']['all'] = $lang->release->all;
|
||||
$lang->release->featureBar['browse']['normal'] = $lang->release->statusList['normal'];
|
||||
$lang->release->featureBar['browse']['terminate'] = $lang->release->statusList['terminate'];
|
||||
|
||||
@@ -90,3 +90,7 @@ $lang->release->notifyList['SC'] = 'Story Creator';
|
||||
$lang->release->notifyList['ET'] = "{$lang->execution->common} Team Members";
|
||||
$lang->release->notifyList['PT'] = "Project Team Members";
|
||||
$lang->release->notifyList['CT'] = "Copy To";
|
||||
|
||||
$lang->release->featureBar['browse']['all'] = $lang->release->all;
|
||||
$lang->release->featureBar['browse']['normal'] = $lang->release->statusList['normal'];
|
||||
$lang->release->featureBar['browse']['terminate'] = $lang->release->statusList['terminate'];
|
||||
|
||||
@@ -84,3 +84,7 @@ $lang->release->notifyList['QD'] = 'QA Manager';
|
||||
$lang->release->notifyList['SC'] = 'Story Creator';
|
||||
$lang->release->notifyList['ET'] = "{$lang->execution->common} Team Members";
|
||||
$lang->release->notifyList['PT'] = "Project Team Members";
|
||||
|
||||
$lang->release->featureBar['browse']['all'] = $lang->release->all;
|
||||
$lang->release->featureBar['browse']['normal'] = $lang->release->statusList['normal'];
|
||||
$lang->release->featureBar['browse']['terminate'] = $lang->release->statusList['terminate'];
|
||||
|
||||
@@ -90,3 +90,7 @@ $lang->release->notifyList['SC'] = '需求提交人';
|
||||
$lang->release->notifyList['ET'] = "所在{$lang->execution->common}团队成员";
|
||||
$lang->release->notifyList['PT'] = "所在项目团队成员";
|
||||
$lang->release->notifyList['CT'] = "抄送给";
|
||||
|
||||
$lang->release->featureBar['browse']['all'] = $lang->release->all;
|
||||
$lang->release->featureBar['browse']['normal'] = $lang->release->statusList['normal'];
|
||||
$lang->release->featureBar['browse']['terminate'] = $lang->release->statusList['terminate'];
|
||||
|
||||
@@ -61,7 +61,8 @@ class releaseModel extends model
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF($productID)->andWhere('t1.product')->eq((int)$productID)->fi()
|
||||
->beginIF($branch !== 'all')->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($type != 'all')->andWhere('t1.status')->eq($type)->fi()
|
||||
->beginIF($type != 'all' && $type != 'review')->andWhere('t1.status')->eq($type)->fi()
|
||||
->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
@@ -143,6 +144,8 @@ class releaseModel extends model
|
||||
->setIF($projectID, 'project', $projectID)
|
||||
->setIF($this->post->build == false, 'build', 0)
|
||||
->setDefault('stories', '')
|
||||
->setDefault('createdBy', $this->app->user->account)
|
||||
->setDefault('createdDate', helper::now())
|
||||
->join('stories', ',')
|
||||
->join('bugs', ',')
|
||||
->join('mailto', ',')
|
||||
|
||||
@@ -16,9 +16,14 @@
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . $pager->recTotal . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . $pager->recTotal . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . $pager->recTotal . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
|
||||
common::sortFeatureMenu();
|
||||
foreach($lang->release->featureBar['browse'] as $featureType => $label)
|
||||
{
|
||||
$active = $type == $featureType ? 'btn-active-text' : '';
|
||||
$label = "<span class='text'>$label</span>";
|
||||
if($type == $featureType) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
|
||||
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=$featureType"), $label, '', "id='{$featureType}Tab' class='btn btn-link $active'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
|
||||
+47
-25
@@ -24,45 +24,67 @@ class searchModel extends model
|
||||
public function setSearchParams($searchConfig)
|
||||
{
|
||||
$module = $searchConfig['module'];
|
||||
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$flowModule = $module;
|
||||
if($module == 'projectStory') $flowModule = 'story';
|
||||
if($module == 'projectBug') $flowModule = 'bug';
|
||||
if($module == 'projectStory' || $module == 'executionStory') $flowModule = 'story';
|
||||
if($module == 'projectBug') $flowModule = 'bug';
|
||||
|
||||
$fields = $this->loadModel('workflowfield')->getList($flowModule);
|
||||
$maxCount = $this->config->maxCount;
|
||||
$this->config->maxCount = 0;
|
||||
$buildin = false;
|
||||
|
||||
foreach($fields as $field)
|
||||
$this->app->loadLang('workflow');
|
||||
$this->app->loadConfig('workflow');
|
||||
if(!empty($this->config->workflow->buildin))
|
||||
{
|
||||
if($field->canSearch == 0) continue;
|
||||
|
||||
/* The built-in modules and user defined modules all have the subStatus field, so set its configuration first. */
|
||||
if($field->field == 'subStatus')
|
||||
foreach($this->config->workflow->buildin->modules as $appName => $appModules)
|
||||
{
|
||||
$field = $this->workflowfield->getByField($flowModule, 'subStatus');
|
||||
if(!isset($field->options[''])) $field->options[''] = '';
|
||||
if(isset($appModules->$flowModule))
|
||||
{
|
||||
$buildin = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$searchConfig['fields'][$field->field] = $field->name;
|
||||
$searchConfig['params'][$field->field] = array('operator' => '=', 'control' => 'select', 'values' => $field->options);
|
||||
if($buildin)
|
||||
{
|
||||
$fields = $this->loadModel('workflowfield')->getList($flowModule, 'searchOrder, `order`, id');
|
||||
$maxCount = $this->config->maxCount;
|
||||
$this->config->maxCount = 0;
|
||||
|
||||
continue;
|
||||
$fieldValues = array();
|
||||
$formName = $module . 'Form';
|
||||
if($this->session->$formName)
|
||||
{
|
||||
foreach($this->session->$formName as $formKey => $formField)
|
||||
{
|
||||
if(strpos($formKey, 'field') !== false)
|
||||
{
|
||||
$fieldNO = substr($formKey, 5);
|
||||
$fieldNO = "value" . $fieldNO;
|
||||
$formNameList = $this->session->$formName;
|
||||
$fieldValue = $formNameList[$fieldNO];
|
||||
|
||||
if($fieldValue) $fieldValues[$formField][$fieldValue] = $fieldValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* The other built-in fields do not need to set their configuration. */
|
||||
if($field->buildin) continue;
|
||||
foreach($fields as $field)
|
||||
{
|
||||
if($field->canSearch == 0 || $field->buildin) continue;
|
||||
|
||||
/* Set configuration for user defined fields. */
|
||||
$operator = ($field->control == 'input' or $field->control == 'textarea') ? 'include' : '=';
|
||||
$control = ($field->control == 'select' or $field->control == 'multi-select' or $field->control == 'radio' or $field->control == 'checkbox') ? 'select' : 'input';
|
||||
$options = $this->workflowfield->getFieldOptions($field);
|
||||
$class = ($field->control == 'date' or $field->control == 'datetime') ? 'date' : ''; // Set date zui for date and datetime control.
|
||||
if(in_array($field->control, $this->config->workflowfield->optionControls))
|
||||
{
|
||||
$field->options = $this->workflowfield->getFieldOptions($field, true, zget($fieldValues, $field->field, ''), '', $this->config->flowLimit);
|
||||
}
|
||||
|
||||
$searchConfig['fields'][$field->field] = $field->name;
|
||||
$searchConfig['params'][$field->field] = array('operator' => $operator, 'control' => $control, 'values' => $options, 'class' => $class);
|
||||
$searchConfig['fields'][$field->field] = $field->name;
|
||||
$searchConfig['params'][$field->field] = $this->loadModel('flow', 'sys')->processSearchParams($field->control, $field->options);
|
||||
}
|
||||
$this->config->maxCount = $maxCount;
|
||||
}
|
||||
$this->config->maxCount = $maxCount;
|
||||
}
|
||||
|
||||
$searchParams['module'] = $searchConfig['module'];
|
||||
|
||||
@@ -447,3 +447,6 @@ $lang->story->subDivideTip['subStory'] = 'The Sub-stories cannot be subdivided.
|
||||
$lang->story->subDivideTip['planned'] = 'The Story has been planned and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['projected'] = 'The Story has been initiated and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['notActive'] = 'The Story is not active and cannot be subdivided.';
|
||||
|
||||
$lang->story->featureBar['browse']['all'] = $lang->all;
|
||||
$lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed;
|
||||
|
||||
@@ -447,3 +447,6 @@ $lang->story->subDivideTip['subStory'] = 'The Sub-stories cannot be subdivided.
|
||||
$lang->story->subDivideTip['planned'] = 'The Story has been planned and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['projected'] = 'The Story has been initiated and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['notActive'] = 'The Story is not active and cannot be subdivided.';
|
||||
|
||||
$lang->story->featureBar['browse']['all'] = $lang->all;
|
||||
$lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed;
|
||||
|
||||
@@ -447,3 +447,6 @@ $lang->story->subDivideTip['subStory'] = 'Les sous-stories ne peuvent pas être
|
||||
$lang->story->subDivideTip['planned'] = 'Cette Story est planifiée et ne peut être subdivisée.';
|
||||
$lang->story->subDivideTip['projected'] = 'Cette Story a été créée et ne peut être subdivisée.';
|
||||
$lang->story->subDivideTip['notActive'] = "Cette Story n'est pas active et ne peut être subdivisée.";
|
||||
|
||||
$lang->story->featureBar['browse']['all'] = $lang->all;
|
||||
$lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed;
|
||||
|
||||
@@ -439,3 +439,6 @@ $lang->story->subDivideTip['subStory'] = 'The Sub-stories cannot be subdivided.
|
||||
$lang->story->subDivideTip['planned'] = 'The Story has been planned and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['projected'] = 'The Story has been initiated and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['notActive'] = 'The Story is not active and cannot be subdivided.';
|
||||
|
||||
$lang->story->featureBar['browse']['all'] = $lang->all;
|
||||
$lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed;
|
||||
|
||||
@@ -447,3 +447,6 @@ $lang->story->subDivideTip['subStory'] = '子需求无法细分';
|
||||
$lang->story->subDivideTip['planned'] = '该需求已计划,无法进行细分操作';
|
||||
$lang->story->subDivideTip['projected'] = '该需求已立项,无法进行细分操作';
|
||||
$lang->story->subDivideTip['notActive'] = '需求不是激活状态,无法进行细分操作';
|
||||
|
||||
$lang->story->featureBar['browse']['all'] = $lang->all;
|
||||
$lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed;
|
||||
|
||||
@@ -2385,9 +2385,13 @@ class taskModel extends model
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->beginIF($type == 'delayed')->andWhere('t1.deadline')->gt('1970-1-1')->andWhere('t1.deadline')->lt(date(DT_DATE1))->andWhere('t1.status')->in('wait,doing')->fi()
|
||||
->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,myinvolved,assignedbyme,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi()
|
||||
->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,myinvolved,assignedbyme,review,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi()
|
||||
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
|
||||
->beginIF($type == 'assignedbyme')->andWhere('t1.id')->in($actionIDList)->andWhere('t1.status')->ne('closed')->fi()
|
||||
->beginIF($type == 'review')
|
||||
->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")
|
||||
->andWhere('t1.reviewStatus')->eq('doing')
|
||||
->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy($orderBy)
|
||||
->page($pager, 't1.id')
|
||||
|
||||
@@ -50,6 +50,7 @@ class testsuite extends control
|
||||
* Browse test suites.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $type
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
@@ -57,7 +58,7 @@ class testsuite extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($productID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function browse($productID = 0, $type = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Save session. */
|
||||
$this->session->set('testsuiteList', $this->app->getURI(true), 'qa');
|
||||
@@ -78,7 +79,7 @@ class testsuite extends control
|
||||
if(empty($suites) and $pageID > 1)
|
||||
{
|
||||
$pager = pager::init(0, $recPerPage, 1);
|
||||
$suites = $this->testsuite->getSuites($productID, $sort, $pager, 'all');
|
||||
$suites = $this->testsuite->getSuites($productID, $sort, $pager, $type);
|
||||
}
|
||||
|
||||
$this->view->title = $productName . $this->lang->testsuite->common;
|
||||
@@ -89,6 +90,7 @@ class testsuite extends control
|
||||
$this->view->productName = $productName;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->suites = $suites;
|
||||
$this->view->type = $type;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->view->pager = $pager;
|
||||
$this->view->product = $this->product->getByID($productID);
|
||||
|
||||
@@ -54,3 +54,5 @@ $lang->testsuite->lblUnlinkCase = 'Unverknüpfte Fälle';
|
||||
|
||||
$lang->testsuite->authorList['private'] = 'Privat';
|
||||
$lang->testsuite->authorList['public'] = 'Öffentlich';
|
||||
|
||||
$lang->testsuite->featureBar['browse']['all'] = 'Suite List';
|
||||
|
||||
@@ -54,3 +54,5 @@ $lang->testsuite->lblUnlinkCase = 'Unlink Case';
|
||||
|
||||
$lang->testsuite->authorList['private'] = 'Private';
|
||||
$lang->testsuite->authorList['public'] = 'Public';
|
||||
|
||||
$lang->testsuite->featureBar['browse']['all'] = 'Suite List';
|
||||
|
||||
@@ -54,3 +54,5 @@ $lang->testsuite->lblUnlinkCase = 'Retirer CasTest';
|
||||
|
||||
$lang->testsuite->authorList['private'] = 'Privé';
|
||||
$lang->testsuite->authorList['public'] = 'Public';
|
||||
|
||||
$lang->testsuite->featureBar['browse']['all'] = 'Suite List';
|
||||
|
||||
@@ -51,3 +51,5 @@ $lang->testsuite->lblUnlinkCase = 'Hủy liên kết tình huống';
|
||||
|
||||
$lang->testsuite->authorList['private'] = 'Riêng tư';
|
||||
$lang->testsuite->authorList['public'] = 'Công khai';
|
||||
|
||||
$lang->testsuite->featureBar['browse']['all'] = 'Suite List';
|
||||
|
||||
@@ -54,3 +54,5 @@ $lang->testsuite->lblUnlinkCase = '移除用例';
|
||||
|
||||
$lang->testsuite->authorList['private'] = '私有';
|
||||
$lang->testsuite->authorList['public'] = '公开';
|
||||
|
||||
$lang->testsuite->featureBar['browse']['all'] = '套件列表';
|
||||
|
||||
@@ -15,10 +15,16 @@
|
||||
<?php js::set('flow', $config->global->flow);?>
|
||||
<div id="mainMenu" class='clearfix'>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<a href class='btn btn-link btn-active-text'>
|
||||
<span class='text'><?php echo $lang->testsuite->browse?></span>
|
||||
<span class='label label-light label-badge'><?php echo $pager->recTotal;?></span>
|
||||
</a>
|
||||
<?php
|
||||
common::sortFeatureMenu();
|
||||
foreach($lang->testsuite->featureBar['browse'] as $featureType => $label)
|
||||
{
|
||||
$activeClass = $type == $featureType ? 'btn-active-text' : '';
|
||||
$label = "<span class='text'>$label</span>";
|
||||
if($type == $featureType) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
|
||||
echo html::a(inlink('browse', "productID=$productID&type=$featureType"), $label, '',"class='btn btn-link $activeClass'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php if(common::canModify('product', $product)):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
@@ -39,7 +45,7 @@
|
||||
<?php else:?>
|
||||
<table class='table has-sort-head' id='suiteList'>
|
||||
<thead>
|
||||
<?php $vars = "productID=$productID&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<?php $vars = "productID=$productID&type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<tr>
|
||||
<th class='c-id text-left'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->testsuite->name);?></th>
|
||||
|
||||
@@ -31,6 +31,8 @@ class testtaskModel extends model
|
||||
$task = fixer::input('post')
|
||||
->setDefault('build', '')
|
||||
->setIF($this->config->systemMode == 'new', 'project', $projectID)
|
||||
->setDefault('createdBy', $this->app->user->account)
|
||||
->setDefault('createdDate', helper::now())
|
||||
->stripTags($this->config->testtask->editor->create['id'], $this->config->allowedTags)
|
||||
->join('mailto', ',')
|
||||
->join('type', ',')
|
||||
@@ -86,7 +88,7 @@ class testtaskModel extends model
|
||||
->beginIF($scopeAndStatus[0] == 'local')->andWhere('t1.product')->eq((int)$productID)->fi()
|
||||
->beginIF($scopeAndStatus[0] == 'all')->andWhere('t1.product')->in($products)->fi()
|
||||
->beginIF(strtolower($scopeAndStatus[1]) == 'totalstatus')->andWhere('t1.status')->in('blocked,doing,wait,done')->fi()
|
||||
->beginIF(strtolower($scopeAndStatus[1]) != 'totalstatus')->andWhere('t1.status')->eq($scopeAndStatus[1])->fi()
|
||||
->beginIF(!in_array(strtolower($scopeAndStatus[1]), array('totalstatus', 'review'), true))->andWhere('t1.status')->eq($scopeAndStatus[1])->fi()
|
||||
->beginIF($branch !== 'all')->andWhere('t4.branch')->eq($branch)->fi()
|
||||
->beginIF($beginTime)->andWhere('t1.begin')->ge($beginTime)->fi()
|
||||
->beginIF($endTime)->andWhere('t1.end')->le($endTime)->fi()
|
||||
@@ -95,6 +97,10 @@ class testtaskModel extends model
|
||||
->andWhere('t1.product')->eq((int)$productID)
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->beginIF($scopeAndStatus[1] == 'review')
|
||||
->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")
|
||||
->andWhere('t1.reviewStatus')->eq('doing')
|
||||
->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -34,6 +34,7 @@ $status = $this->session->testTaskVersionStatus;
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php common::sortFeatureMenu();?>
|
||||
<?php foreach($lang->testtask->featureBar['browse'] as $key => $label):?>
|
||||
<?php $key = strtolower($key);?>
|
||||
<?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,$key"), "<span class='text'>$label</span>", '', "id='{$key}Tab' class='btn btn-link'");?>
|
||||
|
||||
@@ -370,3 +370,56 @@ $config->delete['17_2'][] = 'extension/lite/extension/lite/workflowrule/ext/view
|
||||
$config->upgrade->openModules = array('action', 'admin', 'api', 'automation', 'backup', 'block', 'branch', 'budget', 'bug', 'build', 'caselib', 'ci', 'client', 'common', 'company', 'compile', 'convert', 'cron', 'custom', 'datatable', 'dept', 'design', 'dev', 'doc', 'durationestimation', 'entry', 'execution', 'extension', 'file', 'git', 'gitlab', 'group', 'holiday', 'im', 'index', 'index.html', 'install', 'issue', 'jenkins', 'job', 'kanban', 'license', 'mail', 'message', 'misc', 'mr', 'my', 'personnel', 'pipeline', 'product', 'productplan', 'productset', 'program', 'programplan', 'project', 'projectbuild', 'projectrelease', 'projectstory', 'qa', 'release', 'repo', 'report', 'risk', 'score', 'search', 'setting', 'sonarqube', 'sso', 'stage', 'stakeholder', 'story', 'subject', 'svn', 'task', 'testcase', 'testreport', 'testsuite', 'testtask', 'todo', 'tree', 'tutorial', 'upgrade', 'user', 'webhook', 'weekly', 'workestimation', 'gitea');
|
||||
|
||||
$config->upgrade->unsetModules = array('design', 'program', 'programplan', 'projectbuild', 'projectrelease', 'stage', 'stakeholder', 'product', 'branch', 'productplan', 'release', 'build', 'qa', 'bug', 'testcase', 'testtask', 'testreport', 'testsuite', 'caselib', 'automation', 'repo', 'ci', 'compile', 'jenkins', 'job', 'svn', 'gitlab', 'sonarqube', 'mr', 'git', 'report', 'sqlbuilder', 'feedback', 'faq', 'attend', 'holiday', 'leave', 'makeup', 'overtime', 'lieu', 'ops', 'host', 'serverroom', 'account', 'domain', 'service', 'deploy', 'conference', 'traincourse', 'pssp', 'baseline', 'classify', 'cm', 'cmcl', 'auditcl', 'reviewcl', 'process', 'activity', 'zoutput', 'auditplan', 'nc', 'subject', 'weekly', 'workestimation', 'issue', 'durationestimation', 'risk', 'opportunity', 'trainplan', 'gapanalysis', 'researchplan', 'researchreport', 'meeting', 'meetingroom', 'budget', 'reviewissue', 'reviewsetting', 'review', 'milestone', 'measurement', 'measrecord', 'assetlib', 'setting', 'im', 'client', 'ldap', 'dev', 'api', 'gitea');
|
||||
|
||||
global $lang;
|
||||
$config->upgrade->defaultActions = array();
|
||||
$config->upgrade->defaultActions['type'] = 'single';
|
||||
$config->upgrade->defaultActions['extensionType'] = 'none';
|
||||
$config->upgrade->defaultActions['batchMode'] = 'different';
|
||||
$config->upgrade->defaultActions['layout'] = 'normal';
|
||||
$config->upgrade->defaultActions['show'] = 'direct';
|
||||
$config->upgrade->defaultActions['order'] = 0;
|
||||
$config->upgrade->defaultActions['buildin'] = 1;
|
||||
$config->upgrade->defaultActions['role'] = 'buildin';
|
||||
$config->upgrade->defaultActions['virtual'] = 0;
|
||||
$config->upgrade->defaultActions['status'] = 'enable';
|
||||
$config->upgrade->defaultActions['vision'] = 'rnd';
|
||||
|
||||
$config->upgrade->recoveryActions = new stdclass();
|
||||
$config->upgrade->recoveryActions->feedback = new stdclass();
|
||||
$config->upgrade->recoveryActions->feedback->review = array();
|
||||
$config->upgrade->recoveryActions->feedback->review['action'] = 'review';
|
||||
$config->upgrade->recoveryActions->feedback->review['module'] = 'feedback';
|
||||
$config->upgrade->recoveryActions->feedback->review['name'] = $lang->upgrade->recoveryActions->review;
|
||||
$config->upgrade->recoveryActions->feedback->review['method'] = 'operate';
|
||||
$config->upgrade->recoveryActions->feedback->review['open'] = 'modal';
|
||||
$config->upgrade->recoveryActions->feedback->review['position'] = 'browseandview';
|
||||
$config->upgrade->recoveryActions->feedback->review['hasLite'] = true;
|
||||
|
||||
$config->upgrade->recoveryActions->task = new stdclass();
|
||||
$config->upgrade->recoveryActions->task->review = array();
|
||||
$config->upgrade->recoveryActions->task->review['action'] = 'cancel';
|
||||
$config->upgrade->recoveryActions->task->review['module'] = 'task';
|
||||
$config->upgrade->recoveryActions->task->review['name'] = $lang->upgrade->recoveryActions->cancel;
|
||||
$config->upgrade->recoveryActions->task->review['method'] = 'operate';
|
||||
$config->upgrade->recoveryActions->task->review['open'] = 'modal';
|
||||
$config->upgrade->recoveryActions->task->review['position'] = 'view';
|
||||
$config->upgrade->recoveryActions->task->review['hasLite'] = true;
|
||||
|
||||
$config->upgrade->recoveryActions->story = new stdclass();
|
||||
$config->upgrade->recoveryActions->story->review = array();
|
||||
$config->upgrade->recoveryActions->story->review['action'] = 'review';
|
||||
$config->upgrade->recoveryActions->story->review['module'] = 'story';
|
||||
$config->upgrade->recoveryActions->story->review['name'] = $lang->upgrade->recoveryActions->review;
|
||||
$config->upgrade->recoveryActions->story->review['method'] = 'operate';
|
||||
$config->upgrade->recoveryActions->story->review['open'] = 'normal';
|
||||
$config->upgrade->recoveryActions->story->review['position'] = 'browseandview';
|
||||
|
||||
$config->upgrade->recoveryActions->testcase = new stdclass();
|
||||
$config->upgrade->recoveryActions->testcase->review = array();
|
||||
$config->upgrade->recoveryActions->testcase->review['action'] = 'review';
|
||||
$config->upgrade->recoveryActions->testcase->review['module'] = 'testcase';
|
||||
$config->upgrade->recoveryActions->testcase->review['name'] = $lang->upgrade->recoveryActions->review;
|
||||
$config->upgrade->recoveryActions->testcase->review['method'] = 'operate';
|
||||
$config->upgrade->recoveryActions->testcase->review['open'] = 'normal';
|
||||
$config->upgrade->recoveryActions->testcase->review['position'] = 'browseandview';
|
||||
|
||||
@@ -156,3 +156,7 @@ $lang->upgrade->createExecutionTip = <<<EOT
|
||||
EOT;
|
||||
|
||||
include dirname(__FILE__) . '/version.php';
|
||||
|
||||
$lang->upgrade->recoveryActions = new stdclass();
|
||||
$lang->upgrade->recoveryActions->cancel = 'Cancel';
|
||||
$lang->upgrade->recoveryActions->review = 'Review';
|
||||
|
||||
@@ -156,3 +156,7 @@ $lang->upgrade->createExecutionTip = <<<EOT
|
||||
EOT;
|
||||
|
||||
include dirname(__FILE__) . '/version.php';
|
||||
|
||||
$lang->upgrade->recoveryActions = new stdclass();
|
||||
$lang->upgrade->recoveryActions->cancel = 'Cancel';
|
||||
$lang->upgrade->recoveryActions->review = 'Review';
|
||||
|
||||
@@ -156,3 +156,7 @@ $lang->upgrade->createExecutionTip = <<<EOT
|
||||
EOT;
|
||||
|
||||
include dirname(__FILE__) . '/version.php';
|
||||
|
||||
$lang->upgrade->recoveryActions = new stdclass();
|
||||
$lang->upgrade->recoveryActions->cancel = 'Cancel';
|
||||
$lang->upgrade->recoveryActions->review = 'Review';
|
||||
|
||||
@@ -156,3 +156,7 @@ $lang->upgrade->createExecutionTip = <<<EOT
|
||||
EOT;
|
||||
|
||||
include dirname(__FILE__) . '/version.php';
|
||||
|
||||
$lang->upgrade->recoveryActions = new stdclass();
|
||||
$lang->upgrade->recoveryActions->cancel = '取消';
|
||||
$lang->upgrade->recoveryActions->review = '评审';
|
||||
|
||||
@@ -531,6 +531,7 @@ class upgradeModel extends model
|
||||
case '17_3':
|
||||
$this->processBugLinkBug();
|
||||
case '17_4':
|
||||
$this->processCreatedInfo();
|
||||
$this->changeSearchTableEngine();
|
||||
}
|
||||
|
||||
@@ -676,6 +677,9 @@ class upgradeModel extends model
|
||||
case 'biz7.0':
|
||||
$this->processFlowPosition();
|
||||
break;
|
||||
case 'biz7.3':
|
||||
$this->updateApproval();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -982,6 +986,8 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('17.3'));
|
||||
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan6.0.1.sql';
|
||||
$confirmContent .= file_get_contents($xuanxuanSql);
|
||||
case '17_4':
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('17.4'));
|
||||
}
|
||||
|
||||
return $confirmContent;
|
||||
@@ -6750,4 +6756,75 @@ class upgradeModel extends model
|
||||
if($mysqlVersion >= 5.6) $this->dao->exec("ALTER TABLE " . TABLE_SEARCHINDEX . " ENGINE='InnoDB'");
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process created information.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function processCreatedInfo()
|
||||
{
|
||||
$objectTypes = array('productplan', 'release', 'testtask');
|
||||
$tables = array('productplan' => TABLE_PRODUCTPLAN, 'release' => TABLE_RELEASE, 'testtask' => TABLE_TESTTASK);
|
||||
|
||||
$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)
|
||||
{
|
||||
foreach($objectActions as $action)
|
||||
{
|
||||
$this->dao->update($tables[$objectType])->set('createdBy')->eq($action->actor)->set('createdDate')->eq($action->date)->where('id')->eq($action->objectID)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
return !dao::isError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update approval process in Workflow.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateApproval()
|
||||
{
|
||||
/* Judge whether the action has opened the approval process before. */
|
||||
/* 判断动作 看之前是否开启过审批流 */
|
||||
$actions = $this->dao->select('id, module, action, createdDate')->from(TABLE_WORKFLOWACTION)
|
||||
->where('role')->eq('approval')
|
||||
->andWhere('action')->in('submit, cancel, review')
|
||||
->fetchAll('id');
|
||||
|
||||
foreach($actions as $id => $action)
|
||||
{
|
||||
$module = $action->module;
|
||||
$actionCode = $action->action;
|
||||
|
||||
$this->dao->update(TABLE_WORKFLOWACTION)->set('action')->eq('approval' . $action->action)->where('id')->eq($id)->exec();
|
||||
/* Change the approval action of the module that has already enabled the approval function */
|
||||
/* 改原来已经开启过审批功能的模块的审批动作 */
|
||||
if(isset($this->config->upgrade->recoveryActions->{$module}->{$actionCode}))
|
||||
{
|
||||
$data = array_merge($this->config->upgrade->defaultActions, $this->config->upgrade->recoveryActions->{$module}->{$actionCode});
|
||||
if(isset($data['hasLite']) && $data['hasLite'] === true)
|
||||
{
|
||||
unset($data['hasLite']);
|
||||
$liteData = $data;
|
||||
$liteData['vision'] = 'lite';
|
||||
$this->dao->insert(TABLE_WORKFLOWACTION)->data($liteData)->exec();
|
||||
}
|
||||
$this->dao->insert(TABLE_WORKFLOWACTION)->data($data)->exec();
|
||||
}
|
||||
|
||||
/* Change history */
|
||||
/* 改历史记录 */
|
||||
$this->dao->update(TABLE_ACTION)->set('action')->eq('approval' . $action->action)->where('objectType')->eq($module)->andWhere('action')->eq($action->action)->andWhere('date')->gt($action->createdDate)->exec();
|
||||
|
||||
/* Change the action field of the workflowlayout table */
|
||||
/* 改workflowlayout表的action字段 */
|
||||
$this->dao->update(TABLE_WORKFLOWLAYOUT)->set('action')->eq('approval' . $action->action)->where('module')->eq($module)->andWhere('action')->eq($action->action)->exec();
|
||||
}
|
||||
|
||||
return !dao::isError();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user