Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
+2
-2
@@ -21,8 +21,8 @@ UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource`
|
||||
UPDATE `zt_project` SET `closedDate`='' AND `closedBy`='' WHERE `status` != 'closed';
|
||||
UPDATE `zt_grouppriv` SET `method`='exportTemplate' WHERE `method` = 'exportTemplet';
|
||||
|
||||
INSERT INTO `zt_grouppriv` (SELECT `group`,`module`,'reply' FROM `zt_grouppriv` WHERE `module` = 'feedback' AND `method` = 'comment');
|
||||
INSERT INTO `zt_grouppriv` (SELECT `group`,`module`,'ask' FROM `zt_grouppriv` WHERE `module` = 'feedback' AND `method` = 'comment');
|
||||
REPLACE INTO `zt_grouppriv` (SELECT `group`,`module`,'reply' FROM `zt_grouppriv` WHERE `module` = 'feedback' AND `method` = 'comment');
|
||||
REPLACE INTO `zt_grouppriv` (SELECT `group`,`module`,'ask' FROM `zt_grouppriv` WHERE `module` = 'feedback' AND `method` = 'comment');
|
||||
|
||||
CREATE TABLE `zt_chart` (
|
||||
`id` mediumint NOT NULL AUTO_INCREMENT,
|
||||
|
||||
@@ -1979,7 +1979,7 @@ class bugModel extends model
|
||||
}
|
||||
if(empty($executionIdList)) return array();
|
||||
|
||||
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($executionIdList)->fetch();
|
||||
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($executionIdList)->fetchAll();
|
||||
$minBegin = '';
|
||||
$maxEnd = '';
|
||||
foreach($executions as $execution)
|
||||
@@ -2077,8 +2077,11 @@ class bugModel extends model
|
||||
*
|
||||
* @param int $buildID
|
||||
* @param int $productID
|
||||
* @param string $branch
|
||||
* @param string $linkedBugs
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return object
|
||||
* @return array
|
||||
*/
|
||||
public function getReleaseBugs($buildID, $productID, $branch = 0, $linkedBugs = '', $pager = null)
|
||||
{
|
||||
@@ -2102,7 +2105,7 @@ class bugModel extends model
|
||||
->andWhere('product')->eq($productID)
|
||||
->beginIF($linkedBugs)->andWhere('id')->notIN($linkedBugs)->fi()
|
||||
->beginIF($branch)->andWhere('branch')->in("0,$branch")->fi()
|
||||
->andWhere("$condition)")
|
||||
->andWhere("($condition)")
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('openedDate ASC')
|
||||
->page($pager)
|
||||
|
||||
@@ -172,7 +172,7 @@ class build extends control
|
||||
{
|
||||
$productGroups = $this->product->getProducts($build->project);
|
||||
$branches = $this->loadModel('branch')->getList($build->product, $build->project, 'all');
|
||||
$builds = $this->build->getBuildPairs($build->product, $build->branch, 'noempty,notrunk,separate,noproject');
|
||||
$builds = $this->build->getBuildPairs($build->product, $build->branch, 'noempty,notrunk,separate,noproject', $build->project, 'project');
|
||||
}
|
||||
|
||||
$executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project, 'stagefilter');
|
||||
|
||||
@@ -311,11 +311,16 @@ class buildModel extends model
|
||||
$build->stories = '';
|
||||
$build->bugs = '';
|
||||
|
||||
if($projectID)
|
||||
if($projectID && !$executionID)
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
if(!$project->multiple) $executionID = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($projectID)->fetch('id');
|
||||
}
|
||||
else if($executionID && !$projectID)
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getByID($executionID);
|
||||
$projectID = $execution->project;
|
||||
}
|
||||
|
||||
$build = fixer::input('post')
|
||||
->setDefault('project', $projectID)
|
||||
|
||||
@@ -2420,9 +2420,9 @@ EOD;
|
||||
'message' => array('ajaxgetmessage'),
|
||||
);
|
||||
if(!empty($this->app->user->modifyPassword) and (!isset($beforeValidMethods[$module]) or !in_array($method, $beforeValidMethods[$module]))) return print(js::locate(helper::createLink('my', 'changepassword')));
|
||||
if($this->isOpenMethod($module, $method)) return true;
|
||||
if(!$this->loadModel('user')->isLogon() and $this->server->php_auth_user) $this->user->identifyByPhpAuth();
|
||||
if(!$this->loadModel('user')->isLogon() and $this->cookie->za) $this->user->identifyByCookie();
|
||||
if($this->isOpenMethod($module, $method)) return true;
|
||||
|
||||
if(isset($this->app->user))
|
||||
{
|
||||
|
||||
@@ -2473,7 +2473,7 @@ class executionModel extends model
|
||||
/* Link stories. */
|
||||
$executionStories = $this->loadModel('story')->getExecutionStoryPairs($executionID);
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('project')->eq($executionID)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
$stories = $this->dao->findById($storyID)->fields("id as story, product, version")->from(TABLE_STORY)->where('id')->in(array_keys($executionStories))->fetchAll('story');
|
||||
$stories = $this->dao->select("id as story, product, version")->from(TABLE_STORY)->where('id')->in(array_keys($executionStories))->fetchAll('story');
|
||||
foreach($stories as $storyID)
|
||||
{
|
||||
if(!isset($executionStories[$storyID]))
|
||||
@@ -4727,7 +4727,7 @@ class executionModel extends model
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($execution->division)) echo "<td class='text-left' title='{$execution->productName}'>{$execution->productName}</td>";
|
||||
if(!empty($execution->division) and $execution->hasProduct) echo "<td class='text-left' title='{$execution->productName}'>{$execution->productName}</td>";
|
||||
echo "<td class='status-{$execution->status} text-center'>" . zget($this->lang->project->statusList, $execution->status) . '</td>';
|
||||
echo '<td>' . zget($users, $execution->PM) . '</td>';
|
||||
echo helper::isZeroDate($execution->begin) ? '<td class="c-date"></td>' : '<td class="c-date">' . $execution->begin . '</td>';
|
||||
|
||||
@@ -3900,7 +3900,7 @@ class kanbanModel extends model
|
||||
if(common::hasPriv('task', 'recordEstimate') and $this->task->isClickable($task, 'recordEstimate')) $menu[] = array('label' => $this->lang->task->recordEstimate, 'icon' => 'time', 'url' => helper::createLink('task', 'recordEstimate', "taskID=$task->id&from=taskkanban", '', true));
|
||||
if(common::hasPriv('task', 'activate') and $this->task->isClickable($task, 'activate')) $menu[] = array('label' => $this->lang->task->activate, 'icon' => 'magic', 'url' => helper::createLink('task', 'activate', "taskID=$task->id&extra=from=taskkanban", '', true));
|
||||
if(common::hasPriv('task', 'batchCreate') and $this->task->isClickable($task, 'batchCreate') and !$task->mode) $menu[] = array('label' => $this->lang->task->children, 'icon' => 'split', 'url' => helper::createLink('task', 'batchCreate', "execution=$task->execution&storyID=$task->story&moduleID=$task->module&taskID=$task->id", '', true), 'size' => '95%');
|
||||
if(common::hasPriv('task', 'create') and $this->task->isClickable($task, 'create') and !$task->mode) $menu[] = array('label' => $this->lang->task->copy, 'icon' => 'copy', 'url' => helper::createLink('task', 'create', "projctID=$task->execution&storyID=$task->story&moduleID=$task->module&taskID=$task->id", '', true), 'size' => '95%');
|
||||
if(common::hasPriv('task', 'create') and $this->task->isClickable($task, 'create')) $menu[] = array('label' => $this->lang->task->copy, 'icon' => 'copy', 'url' => helper::createLink('task', 'create', "projctID=$task->execution&storyID=$task->story&moduleID=$task->module&taskID=$task->id", '', true), 'size' => '95%');
|
||||
if(common::hasPriv('task', 'cancel') and $this->task->isClickable($task, 'cancel')) $menu[] = array('label' => $this->lang->task->cancel, 'icon' => 'ban-circle', 'url' => helper::createLink('task', 'cancel', "taskID=$task->id&extra=from=taskkanban", '', true));
|
||||
if(common::hasPriv('task', 'delete')) $menu[] = array('label' => $this->lang->task->delete, 'icon' => 'trash', 'url' => helper::createLink('task', 'delete', "executionID=$task->execution&taskID=$task->id&confirm=no&from=taskkanban"));
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<?php js::set('checkedExecutions', $lang->execution->checkedExecutions);?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php if($project->division):?>
|
||||
<?php if($project->division and $project->hasProduct):?>
|
||||
<div class='btn-group'>
|
||||
<?php $viewName = $productID != 0 ? zget($productList,$productID) : $lang->product->allProduct;?>
|
||||
<a href='javascript:;' class='btn btn-link btn-limit' data-toggle='dropdown'><span class='text' title='<?php echo $viewName;?>'><?php echo $viewName;?></span> <span class='caret'></span></a>
|
||||
@@ -85,7 +85,7 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</th>
|
||||
<?php if($project->division) echo "<th class='text-left c-product'>{$lang->project->product}</th>";?>
|
||||
<?php if($project->division and $project->hasProduct) echo "<th class='text-left c-product'>{$lang->project->product}</th>";?>
|
||||
<th class='c-status text-center'><?php echo $lang->project->status;?></th>
|
||||
<th class='c-user'><?php echo $lang->execution->owner;?></th>
|
||||
<th class='c-date'><?php echo $lang->programplan->begin;?></th>
|
||||
|
||||
@@ -184,7 +184,7 @@ class projectrelease extends control
|
||||
|
||||
/* Get release and build. */
|
||||
$release = $this->projectrelease->getById((int)$releaseID);
|
||||
if(!$this->session->project) $this->session->set('project', explode(',', trim($release->project, ','))[0], 'project');
|
||||
if(!$this->session->project) $this->session->set('project', explode(',', $release->project)[0], 'project');
|
||||
|
||||
$this->commonAction($this->session->project, $release->product, $release->branch);
|
||||
$bindBuilds = $this->build->getByList($release->build);
|
||||
@@ -529,10 +529,10 @@ class projectrelease extends control
|
||||
$this->session->set('storyList', inlink('view', "releaseID=$releaseID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), $this->app->tab);
|
||||
|
||||
$release = $this->projectrelease->getByID($releaseID);
|
||||
if(!$this->session->project) $this->session->set('project', explode(',', trim($release->project, ','))[0], 'project');
|
||||
if(!$this->session->project) $this->session->set('project', explode(',', $release->project)[0], 'project');
|
||||
|
||||
$builds = $this->loadModel('build')->getByList($release->build);
|
||||
$project = $this->loadModel('project')->getByIdList($this->session->project);
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$this->commonAction($this->session->project, $release->product);
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('tree');
|
||||
@@ -550,9 +550,14 @@ class projectrelease extends control
|
||||
$this->config->product->search['actionURL'] = $this->createLink('projectrelease', 'view', "releaseID=$releaseID&type=story&link=true¶m=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
|
||||
$this->config->product->search['queryID'] = $queryID;
|
||||
$this->config->product->search['style'] = 'simple';
|
||||
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairsForStory($release->product, $release->branch, 'skipParent|withMainPlan');
|
||||
$this->config->product->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, 'story', 0, $release->branch);;
|
||||
$this->config->product->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $this->lang->story->statusList);
|
||||
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairsForStory($release->product, $release->branch, 'skipParent|withMainPlan');
|
||||
$this->config->product->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $this->lang->story->statusList);
|
||||
|
||||
$searchModules = array();
|
||||
$moduleGroups = $this->loadModel('tree')->getOptionMenu($release->product, 'story', 0, explode(',', $release->branch));
|
||||
foreach($moduleGroups as $modules) $searchModules += $modules;
|
||||
$this->config->product->search['params']['module']['values'] = $searchModules;
|
||||
|
||||
if($release->productType == 'normal')
|
||||
{
|
||||
unset($this->config->product->search['fields']['branch']);
|
||||
@@ -663,7 +668,7 @@ class projectrelease extends control
|
||||
$this->session->set('bugList', inlink('view', "releaseID=$releaseID&type=$type&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), 'qa');
|
||||
/* Set menu. */
|
||||
$release = $this->projectrelease->getByID($releaseID);
|
||||
if(!$this->session->project) $this->session->set('project', explode(',', trim($release->project, ','))[0], 'project');
|
||||
if(!$this->session->project) $this->session->set('project', explode(',', $release->project)[0], 'project');
|
||||
|
||||
$builds = $this->loadModel('build')->getByList($release->build);
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
@@ -683,10 +688,15 @@ class projectrelease extends control
|
||||
$this->config->bug->search['queryID'] = $queryID;
|
||||
$this->config->bug->search['style'] = 'simple';
|
||||
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairsForStory($release->product, $release->branch, 'skipParent|withMainPlan');
|
||||
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, 'bug', 0, $release->branch);
|
||||
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, $release->branch, 'id_desc', $release->project);
|
||||
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($release->product, $branch = 0, $params = '');
|
||||
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
|
||||
|
||||
$searchModules = array();
|
||||
$moduleGroups = $this->loadModel('tree')->getOptionMenu($release->product, 'story', 0, explode(',', $release->branch));
|
||||
foreach($moduleGroups as $modules) $searchModules += $modules;
|
||||
$this->config->bug->search['params']['module']['values'] = $searchModules;
|
||||
|
||||
if($release->productType == 'normal')
|
||||
{
|
||||
unset($this->config->bug->search['fields']['branch']);
|
||||
|
||||
@@ -31,6 +31,10 @@ class projectreleaseModel extends model
|
||||
->fetch();
|
||||
if(!$release) return false;
|
||||
|
||||
$release->project = trim($release->project, ',');
|
||||
$release->branch = trim($release->branch, ',');
|
||||
$release->build = trim($release->build, ',');
|
||||
|
||||
$this->loadModel('file');
|
||||
$release = $this->file->replaceImgURL($release, 'desc');
|
||||
$release->files = $this->file->getByObject('release', $releaseID);
|
||||
|
||||
@@ -2244,7 +2244,8 @@ class story extends control
|
||||
$this->view->story = $story;
|
||||
$this->view->storyType = $storyType;
|
||||
$this->view->actions = $this->action->getList('story', $storyID);
|
||||
$this->view->users = ($this->config->vision == 'lite' || !empty($product->shadow)) ? $this->loadModel('user')->getTeamMemberPairs($this->session->project) : $this->loadModel('user')->getPairs('nodeleted|noclosed|pofirst|noletter');
|
||||
$this->view->users = $this->config->vision == 'lite' ? $this->loadModel('user')->getTeamMemberPairs($this->session->project) : $this->loadModel('user')->getPairs('nodeleted|noclosed|pofirst|noletter');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -4218,7 +4218,8 @@ class storyModel extends model
|
||||
if($action == 'batchcreate' and $story->parent > 0) return false;
|
||||
if($action == 'batchcreate' and $story->type == 'requirement' and $story->status != 'closed') return strpos('draft,reviewing,changing', $story->status) === false;
|
||||
if($action == 'batchcreate' and $config->vision == 'lite' and ($story->status == 'active' and ($story->stage == 'wait' or $story->stage == 'projected'))) return true;
|
||||
if($action == 'batchcreate' and ($story->status != 'active' or (isset($shadowProducts[$story->product]) && $story->stage != 'projected') or (!isset($shadowProducts[$story->product]) && $story->stage != 'wait') or !empty($story->plan))) return false;
|
||||
/* Adjust code, hide split entry, fix bug #29432. */
|
||||
if($action == 'batchcreate' and ($story->status != 'active' or (isset($shadowProducts[$story->product])) or (!isset($shadowProducts[$story->product]) && $story->stage != 'wait') or !empty($story->plan))) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -4487,7 +4488,9 @@ class storyModel extends model
|
||||
if(($canEstimate or $canCreateCase) and $canUnlinkStory) $menu .= "<div class='dividing-line'></div>";
|
||||
|
||||
$executionID = empty($execution) ? 0 : $execution->id;
|
||||
if(common::hasPriv('story', 'batchCreate') and !$execution->multiple and !$execution->hasProduct)
|
||||
|
||||
/* Adjust code, hide split entry, fix bug #29432. */
|
||||
if(common::hasPriv('story', 'batchCreate') and !$execution->multiple and !$execution->hasProduct and false)
|
||||
{
|
||||
$isClick = $this->isClickable($story, 'batchcreate');
|
||||
$title = $this->lang->story->subdivide;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
.c-modulel {width: 110px;}
|
||||
|
||||
.keep-row-height {height: 32px;}
|
||||
#modalTeam .modal-dialog {min-height: 120px; width: 520px; color: #3c4353;}
|
||||
#modalTeam .modal-dialog {min-height: 120px; width: 570px; color: #3c4353;}
|
||||
#taskTeamEditor .hourBox {padding-bottom: 7px; width: 135px;}
|
||||
#taskTeamEditor .estimateBox {width: 120px;}
|
||||
#modalTeam .modal-content {padding: 0;}
|
||||
|
||||
@@ -81,7 +81,7 @@ $(function()
|
||||
var output = '';
|
||||
$('#linkBugsForm').find('tr.checked').each(function(){
|
||||
var bugID = $(this).find('td.c-id').find('div.checkbox-primary input').attr('value');
|
||||
var bugTitle = "#" + bugID + ' ' + $(this).find('td').eq(3).attr('title');
|
||||
var bugTitle = "#" + bugID + ' ' + $(this).find('td').eq(2).attr('title');
|
||||
var checkbox = "<li title='" + bugTitle + "'><div class='checkbox-primary'><input type='checkbox' checked='checked' name='linkBug[]' " + "value=" + bugID + " /><label class='linkBugTitle'>" + bugTitle + "</label></div></li>";
|
||||
|
||||
output += checkbox;
|
||||
|
||||
@@ -81,7 +81,7 @@ $(function()
|
||||
var output = '';
|
||||
$('#linkCasesForm').find('tr.checked').each(function(){
|
||||
var caseID = $(this).find('td.c-id').find('div.checkbox-primary input').attr('value');
|
||||
var caseTitle = "#" + caseID + ' ' + $(this).find('td').eq(3).attr('title');
|
||||
var caseTitle = "#" + caseID + ' ' + $(this).find('td').eq(2).attr('title');
|
||||
var checkbox = "<li title='" + caseTitle + "'><div class='checkbox-primary'><input type='checkbox' checked='checked' name='linkCase[]' " + "value=" + caseID + " /><label class='linkCaseTitle'>" + caseTitle + "</label></div></li>";
|
||||
|
||||
output += checkbox;
|
||||
|
||||
@@ -161,6 +161,8 @@
|
||||
<th class='thWidth'><?php echo $lang->testcase->module;?></th>
|
||||
<td>
|
||||
<?php
|
||||
$tab = $this->app->tab;
|
||||
|
||||
if(empty($modulePath))
|
||||
{
|
||||
echo "/";
|
||||
@@ -174,7 +176,7 @@
|
||||
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
if($this->app->tab == 'qa' || $this->app->tab == 'ops')
|
||||
if($tab == 'qa' || $tab == 'ops')
|
||||
{
|
||||
if($isLibCase)
|
||||
{
|
||||
@@ -185,8 +187,8 @@
|
||||
if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
}
|
||||
}
|
||||
if($this->app->tab == 'project' and !common::printLink('project', 'testcase', "projectID={$this->session->project}&productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if($this->app->tab == 'execution') echo $module->name;
|
||||
if($tab == 'project' and !common::printLink('project', 'testcase', "projectID={$this->session->project}&productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if($tab == 'execution' or $tab == 'product') echo $module->name;
|
||||
if(isset($modulePath[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
@@ -199,7 +201,7 @@
|
||||
<td>
|
||||
<?php
|
||||
$class = isonlybody() ? 'showinonlybody' : 'iframe';
|
||||
$param = $this->app->tab == 'project' ? "&version=0&projectID={$this->session->project}" : '';
|
||||
$param = $tab == 'project' ? "&version=0&projectID={$this->session->project}" : '';
|
||||
if(isset($case->storyTitle))
|
||||
{
|
||||
if(common::hasPriv('story', 'view'))
|
||||
|
||||
@@ -31,7 +31,7 @@ class testsuite extends control
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getPairs();
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getPairs('', 0, '', 'all');
|
||||
if(empty($this->products) and !helper::isAjaxRequest()) return print($this->locate($this->createLink('product', 'showErrorNone', "moduleName=qa&activeMenu=testsuite")));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user