Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
hufangzhou
2021-06-01 15:29:19 +08:00
10 changed files with 29 additions and 18 deletions
+2 -2
View File
@@ -182,10 +182,10 @@ $lang->project->homeMenu->browse = array('link' => ($config->systemMode == 'new'
/* Scrum menu. */
$lang->scrum->menu = new stdclass();
$lang->scrum->menu->index = array('link' => "{$lang->dashboard}|project|index|project=%s");
$lang->scrum->menu->execution = array('link' => "$lang->executionCommon|project|execution|status=all&projectID=%s");
$lang->scrum->menu->execution = array('link' => "$lang->executionCommon|project|execution|status=all&projectID=%s", 'exclude' => 'execution-testreport');
$lang->scrum->menu->story = array('link' => "$lang->SRCommon|projectstory|story|projectID=%s", 'subModule' => 'projectstory,tree', 'alias' => 'story,track');
$lang->scrum->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=project&objectID=%s", 'subModule' => 'doc');
$lang->scrum->menu->qa = array('link' => "{$lang->qa->common}|project|bug|projectID=%s", 'subModule' => 'testcase,testtask,bug,testreport', 'alias' => 'bug,testtask,testcase,testreport');
$lang->scrum->menu->qa = array('link' => "{$lang->qa->common}|project|bug|projectID=%s", 'subModule' => 'testcase,testtask,bug,testreport,execution', 'alias' => 'bug,testtask,testcase,testreport');
$lang->scrum->menu->devops = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&branchID=&objectID=%s", 'subModule' => 'repo');
$lang->scrum->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s");
$lang->scrum->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|project=%s", 'subModule' => 'projectrelease');
+6 -3
View File
@@ -1399,9 +1399,12 @@ EOD;
if(strtolower($key) == 'editedby') continue;
if(strtolower($key) == 'editeddate') continue;
if(strtolower($key) == 'uid') continue;
if(strtolower($key) == 'finisheddate' && $value == '') continue;
if(strtolower($key) == 'canceleddate' && $value == '') continue;
if(strtolower($key) == 'closeddate' && $value == '') continue;
if(strtolower($key) == 'finisheddate' && $value == '') continue;
if(strtolower($key) == 'canceleddate' && $value == '') continue;
if(strtolower($key) == 'hangupeddate' && $value == '') continue;
if(strtolower($key) == 'lastcheckeddate' && $value == '') continue;
if(strtolower($key) == 'activateddate' && $value == '') continue;
if(strtolower($key) == 'closeddate' && $value == '') continue;
if(isset($old->$key) and $value != stripslashes($old->$key))
{
+1
View File
@@ -966,6 +966,7 @@ class execution extends control
*/
public function testreport($executionID = 0, $objectType = 'execution', $extra = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($this->session->project);
echo $this->fetch('testreport', 'browse', "objectID=$executionID&objectType=$objectType&extra=$extra&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
+1 -1
View File
@@ -103,7 +103,7 @@
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link');
if(common::hasPriv('execution', 'testreport'))
{
echo html::a($this->createLink('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id"), '<i class="icon-testreport-browse icon-flag"></i>', '', 'class="btn " title="' . $lang->testreport->browse . '" data-app="qa"');
echo html::a($this->createLink('execution', 'testreport', "executionID=$executionID&objctType=execution&extra=$task->id"), '<i class="icon-testreport-browse icon-flag"></i>', '', 'class="btn " title="' . $lang->testreport->browse . '" data-app="execution"');
}
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list');
common::printIcon('testtask', 'delete', "taskID=$task->id", $task, 'list', 'trash', 'hiddenwin');
+5 -1
View File
@@ -181,7 +181,11 @@ class my extends control
public function story($type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. */
if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true), 'product');
if($this->app->viewType != 'json')
{
$this->session->set('storyList', $this->app->getURI(true), 'product');
$this->session->set('storyList', $this->app->getURI(true), 'my');
}
/* Load pager. */
$this->app->loadClass('pager', $static = true);
+1 -1
View File
@@ -507,7 +507,7 @@ class productModel extends model
->remove('uid,newLine,lineName')
->get();
if(!empty($this->post->lineName))
if(!empty($_POST['lineName']))
{
/* Insert product line. */
$maxOrder = $this->dao->select("max(`order`) as maxOrder")->from(TABLE_MODULE)->where('type')->eq('line')->fetch('maxOrder');
+3 -3
View File
@@ -60,7 +60,7 @@
<th class='w-100px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->begin);?></th>
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->testtask->end);?></th>
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-actions-5 text-center'><?php echo $lang->actions;?></th>
<th class='<?php echo $project->model == 'scrum' ? 'c-actions-5' : 'c-actions-4';?> text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -92,9 +92,9 @@
{
common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'list', 'sitemap');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link');
if(common::hasPriv('execution', 'testreport'))
if(common::hasPriv('execution', 'testreport') and $project->model == 'scrum')
{
echo html::a($this->createLink('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id"), '<i class="icon-testreport-browse icon-flag"></i>', '', 'class="btn " title="' . $lang->testreport->browse . '" data-app="qa"');
echo html::a($this->createLink('execution', 'testreport', "executionID=$task->execution&objectType=execution&extra=$task->id"), '<i class="icon-testreport-browse icon-flag"></i>', '', 'class="btn " title="' . $lang->testreport->browse . '" data-app="project"');
}
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list');
common::printIcon('testtask', 'delete', "taskID=$task->id", $task, 'list', 'trash', 'hiddenwin');
+1 -1
View File
@@ -2470,7 +2470,7 @@ class storyModel extends model
->fi()
->beginIF($execution->type != 'project')
->beginIF(!empty($productParam))->andWhere('t1.product')->eq($productParam)->fi()
->beginIF($this->session->executionStoryBrowseType == 'unclosed')->andWhere('t2.status')->in(array_keys($unclosedStatus))->fi()
->beginIF(strpos('changed|closed', $this->session->executionStoryBrowseType) !== false)->andWhere('t2.status')->in(array_keys($unclosedStatus))->fi()
->fi()
->beginIF($this->session->storyBrowseType == 'unclosed')->andWhere('t2.status')->in(array_keys($unclosedStatus))->fi()
->beginIF(!empty($branchParam))->andWhere('t2.branch')->eq($branchParam)->fi()
+7 -4
View File
@@ -97,9 +97,9 @@ class testreport extends control
$reports = $this->testreport->getList($objectID, $objectType, $extra, $orderBy, $pager);
if(strpos('project|execution', $objectType) !== false and isset($_POST['taskIdList']))
if(strpos('project|execution', $objectType) !== false and ($extra or isset($_POST['taskIdList'])))
{
$taskIdList = $_POST['taskIdList'];
$taskIdList = isset($_POST['taskIdList']) ? $_POST['taskIdList'] : array($extra);
foreach($reports as $reportID => $report)
{
$tasks = explode(',', $report->tasks);
@@ -114,8 +114,8 @@ class testreport extends control
if($objectType == 'product' and $extra) $param = "objectID=$extra&objectType=testtask";
if(($objectType == 'project' or $objectType == 'execution') and ($extra or !empty($_POST['taskIdList'])))
{
$param = "objectID=$objectID&objectType=$objectType";
if(isset($_POST['taskIdList'])) $param .= '&extra=' . join(',', $_POST['taskIdList']);
$param = "objectID=$objectID&objectType=$objectType";
$param .= isset($_POST['taskIdList']) ? '&extra=' . join(',', $_POST['taskIdList']) : '&extra=' . $extra;
}
if($param) $this->locate($this->createLink('testreport', 'create', $param));
}
@@ -196,6 +196,9 @@ class testreport extends control
$productID = $this->commonAction($task->product, 'product');
}
$this->view->taskPairs = $taskPairs;
if($this->app->openApp == 'execution') $this->execution->setMenu($task->execution);
if($this->app->openApp == 'project') $this->project->setMenu($task->project);
}
if(empty($objectID)) die(js::alert($this->lang->testreport->noObjectID) . js::locate('back'));
+2 -2
View File
@@ -115,8 +115,8 @@ class testreportModel extends model
$objectID = (int)$objectID;
return $this->dao->select('*')->from(TABLE_TESTREPORT)
->where('deleted')->eq(0)
->beginIF($objectType == 'execution')->andWhere('objectID')->eq($objectID)->andWhere('objectType')->eq('execution')->fi()
->beginIF($objectType == 'project')->andWhere('project')->eq($objectID)->andWhere('objectType')->eq('execution')->fi()
->beginIF($objectType == 'execution')->andWhere('execution')->eq($objectID)->fi()
->beginIF($objectType == 'project')->andWhere('project')->eq($objectID)->fi()
->beginIF($objectType == 'product' and $extra)->andWhere('objectID')->eq((int)$extra)->andWhere('objectType')->eq('testtask')->fi()
->beginIF($objectType == 'product' and empty($extra))->andWhere('product')->eq($objectID)->fi()
->orderBy($orderBy)