Merge branch 'zentaopms_239' of https://gitlab.zcorp.cc/easycorp/zentaopms into 239
This commit is contained in:
+16
-25
@@ -1245,7 +1245,11 @@ class actionModel extends model
|
||||
$relatedProjects = $relatedData['relatedProjects'];
|
||||
$requirements = $relatedData['requirements'];
|
||||
|
||||
$shadowProducts = $this->dao->select('id')->from(TABLE_PRODUCT)->where('shadow')->eq(1)->fetchPairs();
|
||||
$projectIdList = array();
|
||||
foreach($relatedProjects as $objectType => $idList) $projectIdList += $idList;
|
||||
|
||||
$shadowProducts = $this->dao->select('id')->from(TABLE_PRODUCT)->where('shadow')->eq(1)->fetchPairs();
|
||||
$projectMultiples = $this->dao->select('id,type,multiple')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
|
||||
|
||||
foreach($actions as $i => $action)
|
||||
{
|
||||
@@ -1307,7 +1311,7 @@ class actionModel extends model
|
||||
if(empty($action->objectName) and (substr($objectType, 0, 6) == 'gitlab' or substr($objectType, 0, 5) == 'gitea' or substr($objectType, 0, 4) == 'gogs')) $action->objectName = $action->extra;
|
||||
|
||||
/* Other actions, create a link. */
|
||||
$this->setObjectLink($action, $deptUsers, $shadowProducts);
|
||||
$this->setObjectLink($action, $deptUsers, $shadowProducts, zget($projectMultiples, $projectID, ''));
|
||||
|
||||
/* Set merge request link. */
|
||||
if((empty($action->objectName) or $action->action == 'deleted') and $action->objectType == 'mr') $action->objectLink = '';
|
||||
@@ -1374,10 +1378,7 @@ class actionModel extends model
|
||||
elseif($objectType == 'reviewcl')
|
||||
{
|
||||
$objectInfo = $this->dao->select('id,title')->from($table)->where('id')->in($objectIdList)->fetchAll();
|
||||
foreach($objectInfo as $object)
|
||||
{
|
||||
$objectName[$object->id] = $object->title;
|
||||
}
|
||||
foreach($objectInfo as $object) $objectName[$object->id] = $object->title;
|
||||
}
|
||||
elseif($objectType == 'team')
|
||||
{
|
||||
@@ -1469,10 +1470,11 @@ class actionModel extends model
|
||||
* @param object $action
|
||||
* @param array $deptUsers
|
||||
* @param array $shadowProducts
|
||||
* @param object $project
|
||||
* @access public
|
||||
* @return object|bool
|
||||
*/
|
||||
public function setObjectLink($action, $deptUsers, $shadowProducts)
|
||||
public function setObjectLink($action, $deptUsers, $shadowProducts, $project = null)
|
||||
{
|
||||
$action->objectLink = '';
|
||||
$action->objectLabel = zget($this->lang->action->objectTypes, $action->objectLabel);
|
||||
@@ -1601,15 +1603,8 @@ class actionModel extends model
|
||||
|
||||
if($action->objectType == 'stakeholder' and $action->project == 0) $action->objectLink = '';
|
||||
|
||||
if($action->objectType == 'story' and $action->action == 'import2storylib')
|
||||
{
|
||||
$action->objectLink = helper::createLink('assetlib', 'storyView', "storyID=$action->objectID");
|
||||
}
|
||||
|
||||
if($action->objectType == 'story' and $this->config->vision == 'lite')
|
||||
{
|
||||
$action->objectLink = helper::createLink('projectstory', 'view', "storyID=$action->objectID");
|
||||
}
|
||||
if($action->objectType == 'story' and $action->action == 'import2storylib') $action->objectLink = helper::createLink('assetlib', 'storyView', "storyID=$action->objectID");
|
||||
if($action->objectType == 'story' and $this->config->vision == 'lite') $action->objectLink = helper::createLink('projectstory', 'view', "storyID=$action->objectID");
|
||||
|
||||
if(strpos(',kanbanregion,kanbancard,', ",{$action->objectType},") !== false)
|
||||
{
|
||||
@@ -1630,11 +1625,7 @@ class actionModel extends model
|
||||
$action->objectLink = helper::createLink('kanban', 'view', "kanbanID=$kanbanID");
|
||||
}
|
||||
|
||||
if($action->objectType == 'branch' and $action->action == 'mergedbranch')
|
||||
{
|
||||
$action->objectLink = 'javascript:void(0)';
|
||||
}
|
||||
|
||||
if($action->objectType == 'branch' and $action->action == 'mergedbranch') $action->objectLink = 'javascript:void(0)';
|
||||
if($action->objectType == 'module')
|
||||
{
|
||||
$moduleType = $this->dao->select('type')->from(TABLE_MODULE)->where('id')->eq($action->objectID)->fetch('type');
|
||||
@@ -1645,10 +1636,10 @@ class actionModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if($action->objectType == 'review')
|
||||
{
|
||||
$action->objectLink = helper::createLink('review', 'view', "reviewID=$action->objectID");
|
||||
}
|
||||
if($action->objectType == 'review') $action->objectLink = helper::createLink('review', 'view', "reviewID=$action->objectID");
|
||||
|
||||
/* Set app for no multiple project. */
|
||||
if(!empty($action->objectLink) and !empty($project) and empty($project->multiple)) $action->objectLink .= '#app=project';
|
||||
|
||||
return $action;
|
||||
}
|
||||
|
||||
+66
-64
@@ -642,48 +642,49 @@ class bug extends control
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->bug->custom->createFields;
|
||||
|
||||
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('bug', 'browse', "productID=$productID") : '';
|
||||
$this->view->products = $products;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = isset($this->products[$productID]) ? $this->products[$productID] : '';
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->projects = defined('TUTORIAL') ? $this->loadModel('tutorial')->getProjectPairs() : $projects;
|
||||
$this->view->executions = defined('TUTORIAL') ? $this->loadModel('tutorial')->getExecutionPairs() : $executions;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->moduleID = (int)$moduleID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->projectModel = $projectModel;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->taskID = $taskID;
|
||||
$this->view->storyID = $storyID;
|
||||
$this->view->buildID = $buildID;
|
||||
$this->view->caseID = $caseID;
|
||||
$this->view->runID = $runID;
|
||||
$this->view->version = $version;
|
||||
$this->view->testtask = $testtask;
|
||||
$this->view->bugTitle = $title;
|
||||
$this->view->pri = $pri;
|
||||
$this->view->steps = htmlSpecialString($steps);
|
||||
$this->view->os = $os;
|
||||
$this->view->browser = $browser;
|
||||
$this->view->productMembers = $productMembers;
|
||||
$this->view->assignedTo = $assignedTo;
|
||||
$this->view->deadline = $deadline;
|
||||
$this->view->mailto = $mailto;
|
||||
$this->view->keywords = $keywords;
|
||||
$this->view->severity = $severity;
|
||||
$this->view->type = $type;
|
||||
$this->view->product = $currentProduct;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $branches;
|
||||
$this->view->blockID = $blockID;
|
||||
$this->view->color = $color;
|
||||
$this->view->stepsRequired = strpos($this->config->bug->create->requiredFields, 'steps');
|
||||
$this->view->isStepsTemplate = $steps == $this->lang->bug->tplStep . $this->lang->bug->tplResult . $this->lang->bug->tplExpect ? true : false;
|
||||
$this->view->issueKey = $from == 'sonarqube' ? $output['sonarqubeID'] . ':' . $output['issueKey'] : '';
|
||||
$this->view->feedbackBy = $feedbackBy;
|
||||
$this->view->notifyEmail = $notifyEmail;
|
||||
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('bug', 'browse', "productID=$productID") : '';
|
||||
$this->view->products = $products;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = isset($this->products[$productID]) ? $this->products[$productID] : '';
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->projects = defined('TUTORIAL') ? $this->loadModel('tutorial')->getProjectPairs() : $projects;
|
||||
$this->view->projectExecutionPairs = $this->loadModel('project')->getProjectExecutionPairs();
|
||||
$this->view->executions = defined('TUTORIAL') ? $this->loadModel('tutorial')->getExecutionPairs() : $executions;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->moduleID = (int)$moduleID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->projectModel = $projectModel;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->taskID = $taskID;
|
||||
$this->view->storyID = $storyID;
|
||||
$this->view->buildID = $buildID;
|
||||
$this->view->caseID = $caseID;
|
||||
$this->view->runID = $runID;
|
||||
$this->view->version = $version;
|
||||
$this->view->testtask = $testtask;
|
||||
$this->view->bugTitle = $title;
|
||||
$this->view->pri = $pri;
|
||||
$this->view->steps = htmlSpecialString($steps);
|
||||
$this->view->os = $os;
|
||||
$this->view->browser = $browser;
|
||||
$this->view->productMembers = $productMembers;
|
||||
$this->view->assignedTo = $assignedTo;
|
||||
$this->view->deadline = $deadline;
|
||||
$this->view->mailto = $mailto;
|
||||
$this->view->keywords = $keywords;
|
||||
$this->view->severity = $severity;
|
||||
$this->view->type = $type;
|
||||
$this->view->product = $currentProduct;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $branches;
|
||||
$this->view->blockID = $blockID;
|
||||
$this->view->color = $color;
|
||||
$this->view->stepsRequired = strpos($this->config->bug->create->requiredFields, 'steps');
|
||||
$this->view->isStepsTemplate = $steps == $this->lang->bug->tplStep . $this->lang->bug->tplResult . $this->lang->bug->tplExpect ? true : false;
|
||||
$this->view->issueKey = $from == 'sonarqube' ? $output['sonarqubeID'] . ':' . $output['issueKey'] : '';
|
||||
$this->view->feedbackBy = $feedbackBy;
|
||||
$this->view->notifyEmail = $notifyEmail;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1158,28 +1159,29 @@ class bug extends control
|
||||
|
||||
if($product->shadow) $this->view->project = $this->loadModel('project')->getByShadowProduct($bug->product);
|
||||
|
||||
$this->view->bug = $bug;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->product = $product;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->productBugs = $productBugs;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs($productID, $bug->branch, '', true);
|
||||
$this->view->projects = array(0 => '') + $this->product->getProjectPairsByProduct($productID, $bug->branch, $bug->project);
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->currentModuleID = $currentModuleID;
|
||||
$this->view->executions = array(0 => '') + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, 'id_desc', $bug->project);
|
||||
$this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'all', 'id_desc', 0, 'full', 'story', false);
|
||||
$this->view->branchOption = $branchOption;
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->tasks = $this->task->getExecutionTaskPairs($bug->execution);
|
||||
$this->view->testtasks = $this->loadModel('testtask')->getPairs($bug->product, $bug->execution, $bug->testtask);
|
||||
$this->view->users = $this->user->getPairs('', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy");
|
||||
$this->view->assignedToList = $assignedToList;
|
||||
$this->view->cases = array('' => '') + $cases;
|
||||
$this->view->openedBuilds = $openedBuilds;
|
||||
$this->view->resolvedBuilds = array('' => '') + $openedBuilds + $oldResolvedBuild;
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
$this->view->bug = $bug;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->product = $product;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->productBugs = $productBugs;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs($productID, $bug->branch, '', true);
|
||||
$this->view->projects = array(0 => '') + $this->product->getProjectPairsByProduct($productID, $bug->branch, $bug->project);
|
||||
$this->view->projectExecutionPairs = $this->loadModel('project')->getProjectExecutionPairs();
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->currentModuleID = $currentModuleID;
|
||||
$this->view->executions = array(0 => '') + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, 'id_desc', $bug->project);
|
||||
$this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'all', 'id_desc', 0, 'full', 'story', false);
|
||||
$this->view->branchOption = $branchOption;
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->tasks = $this->task->getExecutionTaskPairs($bug->execution);
|
||||
$this->view->testtasks = $this->loadModel('testtask')->getPairs($bug->product, $bug->execution, $bug->testtask);
|
||||
$this->view->users = $this->user->getPairs('', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy");
|
||||
$this->view->assignedToList = $assignedToList;
|
||||
$this->view->cases = array('' => '') + $cases;
|
||||
$this->view->openedBuilds = $openedBuilds;
|
||||
$this->view->resolvedBuilds = array('' => '') + $openedBuilds + $oldResolvedBuild;
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
+11
-1
@@ -327,7 +327,17 @@ function loadProductExecutions(productID, projectID = 0)
|
||||
branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
|
||||
var execution = $('#execution').val();
|
||||
if(projectExecutionPairs[projectID] !== undefined)
|
||||
{
|
||||
$('#executionIdBox').parents('.executionBox').hide();
|
||||
var execution = projectExecutionPairs[projectID];
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#executionIdBox').parents('.executionBox').show();
|
||||
var execution = $('#execution').val();
|
||||
}
|
||||
|
||||
link = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=' + projectID + '&branch=' + branch + '&number=&executionID=' + execution);
|
||||
$('#executionIdBox').load(link, function()
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@ js::set('moduleID', $moduleID);
|
||||
js::set('tab', $this->app->tab);
|
||||
js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
js::set('showFields', $showFields);
|
||||
js::set('projectExecutionPairs', $projectExecutionPairs);
|
||||
if($this->app->tab == 'execution') js::set('objectID', zget($execution, 'id', ''));
|
||||
if($this->app->tab == 'project') js::set('objectID', $projectID);
|
||||
?>
|
||||
@@ -117,7 +118,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
|
||||
<?php echo html::select('project', $projects, $projectID, "class='form-control chosen' onchange='loadProductExecutions({$productID}, this.value)'");?>
|
||||
</div>
|
||||
<?php $executionClass = ($execution and !$execution->multiple) ? 'hidden' : '';?>
|
||||
<div class="table-col <?php echo $executionClass;?>">
|
||||
<div class="table-col executionBox <?php echo $executionClass;?>">
|
||||
<div class='input-group' id='executionIdBox'>
|
||||
<span class='input-group-addon fix-border' id='executionBox'><?php echo $projectModel == 'kanban' ? $lang->bug->kanban : $lang->bug->execution;?></span>
|
||||
<?php echo html::select('execution', $executions, zget($execution, 'id', ''), "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?>
|
||||
|
||||
@@ -29,6 +29,7 @@ js::set('tab' , $this->app->tab);
|
||||
js::set('bugID' , $bug->id);
|
||||
js::set('bugBranch' , $bug->branch);
|
||||
js::set('isClosedBug' , $bug->status == 'closed');
|
||||
js::set('projectExecutionPairs' , $projectExecutionPairs);
|
||||
if($this->app->tab == 'execution') js::set('objectID', $bug->execution);
|
||||
if($this->app->tab == 'project') js::set('objectID', $bug->project);
|
||||
?>
|
||||
@@ -210,12 +211,11 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
|
||||
<th class='w-85px'><?php echo $lang->bug->project;?></th>
|
||||
<td><span id='projectBox'><?php echo html::select('project', $projects, $bug->project, "class='form-control chosen' onchange='loadProductExecutions($bug->product, this.value)'");?></span></td>
|
||||
</tr>
|
||||
<?php if(!$execution or $execution->multiple):?>
|
||||
<tr>
|
||||
<?php $executionClass = ($execution and !$execution->multiple) ? 'hide' : '';?>
|
||||
<tr class="executionBox <?php echo $executionClass;?>" >
|
||||
<th class='w-85px' id='executionBox'><?php echo $lang->bug->execution;?></th>
|
||||
<td><span id='executionIdBox'><?php echo html::select('execution', $executions, $bug->execution, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?></span></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->story;?></th>
|
||||
<td><div id='storyIdBox'><?php echo html::select('story', $stories, $bug->story, "class='form-control chosen'");?></div>
|
||||
|
||||
@@ -68,6 +68,7 @@ $lang->my->menu = new stdclass();
|
||||
$lang->my->menu->index = array('link' => "$lang->dashboard|my|index");
|
||||
$lang->my->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo');
|
||||
$lang->my->menu->work = array('link' => "{$lang->my->work}|my|work|mode=task", 'subModule' => 'task');
|
||||
$lang->my->menu->audit = array('link' => "{$lang->review->common}|my|audit|type=all¶m=&orderBy=time_desc", 'subModule' => 'review');
|
||||
$lang->my->menu->project = array('link' => "{$lang->project->common}|my|project|");
|
||||
$lang->my->menu->execution = array('link' => "{$lang->execution->common}|my|execution|type=undone");
|
||||
$lang->my->menu->contribute = array('link' => "$lang->contribute|my|contribute|mode=task");
|
||||
@@ -79,7 +80,7 @@ $lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|
|
||||
$lang->my->menuOrder[5] = 'index';
|
||||
$lang->my->menuOrder[10] = 'calendar';
|
||||
$lang->my->menuOrder[15] = 'work';
|
||||
$lang->my->menuOrder[20] = 'follow';
|
||||
$lang->my->menuOrder[20] = 'audit';
|
||||
$lang->my->menuOrder[25] = 'project';
|
||||
$lang->my->menuOrder[30] = 'execution';
|
||||
$lang->my->menuOrder[35] = 'contribute';
|
||||
@@ -96,7 +97,6 @@ $lang->my->menu->work['subMenu']->story = "$lang->SRCommon|my|work|mode=st
|
||||
$lang->my->menu->work['subMenu']->bug = "{$lang->bug->common}|my|work|mode=bug";
|
||||
$lang->my->menu->work['subMenu']->testcase = array('link' => "{$lang->testcase->common}|my|work|mode=testcase&type=assigntome", 'subModule' => 'testtask');
|
||||
$lang->my->menu->work['subMenu']->testtask = "{$lang->testtask->common}|my|work|mode=testtask&type=wait";
|
||||
$lang->my->menu->work['subMenu']->audit = array('link' => "{$lang->review->common}|my|work|mode=audit&type=all¶m=&orderBy=time_desc", 'subModule' => 'review');
|
||||
|
||||
$lang->my->menu->work['menuOrder'][5] = 'task';
|
||||
$lang->my->menu->work['menuOrder'][10] = 'requirement';
|
||||
@@ -114,7 +114,7 @@ $lang->my->menu->contribute['subMenu']->story = "$lang->SRCommon|my|contri
|
||||
$lang->my->menu->contribute['subMenu']->bug = "{$lang->bug->common}|my|contribute|mode=bug";
|
||||
$lang->my->menu->contribute['subMenu']->testcase = "{$lang->testcase->shortCommon}|my|contribute|mode=testcase&type=openedbyme";
|
||||
$lang->my->menu->contribute['subMenu']->testtask = "{$lang->testtask->common}|my|contribute|mode=testtask&type=done";
|
||||
$lang->my->menu->contribute['subMenu']->audit = array('link' => "{$lang->review->common}|my|contribute|mode=audit&type=all", 'subModule' => 'review');
|
||||
$lang->my->menu->contribute['subMenu']->audit = array('link' => "{$lang->review->common}|my|contribute|mode=audit&type=reviewedbyme", 'subModule' => 'review');
|
||||
$lang->my->menu->contribute['subMenu']->doc = "{$lang->doc->common}|my|contribute|mode=doc&type=openedbyme";
|
||||
|
||||
$lang->my->menu->contribute['menuOrder'][5] = 'task';
|
||||
|
||||
@@ -151,7 +151,6 @@ class my extends control
|
||||
|
||||
$issueCount = 0;
|
||||
$riskCount = 0;
|
||||
$reviewCount = 0;
|
||||
$ncCount = 0;
|
||||
$qaCount = 0;
|
||||
$meetingCount = 0;
|
||||
@@ -181,10 +180,6 @@ class my extends control
|
||||
$risks = $this->risk->getUserRisks('assignedTo', $this->app->user->account, 'id_desc', $pager);
|
||||
$riskCount = $pager->recTotal;
|
||||
|
||||
/* Get the number of reviews assigned to me. */
|
||||
$reviewList = $this->my->getReviewingList('all', 'time_desc', $pager);
|
||||
$reviewCount = $pager->recTotal;
|
||||
|
||||
/* Get the number of nc assigned to me. */
|
||||
$ncList = $this->my->getNcList('assignedToMe', 'id_desc', $pager, 'active');
|
||||
$ncCount = $pager->recTotal;
|
||||
@@ -206,7 +201,6 @@ var storyCount = $storyCount;
|
||||
var bugCount = $bugCount;
|
||||
var caseCount = $caseCount;
|
||||
var testTaskCount = $testTaskCount;
|
||||
var reviewCount = $reviewCount;
|
||||
|
||||
var isOpenedURAndSR = $isOpenedURAndSR;
|
||||
if(isOpenedURAndSR !== 0) var requirementCount = $requirementCount;
|
||||
|
||||
@@ -10,7 +10,6 @@ $(function()
|
||||
$("#subNavbar li[data-id='bug'] a").append('<span class="label label-light label-badge">' + bugCount + '</span>');
|
||||
$("#subNavbar li[data-id='testcase'] a").append('<span class="label label-light label-badge">' + caseCount + '</span>');
|
||||
$("#subNavbar li[data-id='testtask'] a").append('<span class="label label-light label-badge">' + testTaskCount + '</span>');
|
||||
$("#subNavbar li[data-id='audit'] a").append('<span class="label label-light label-badge">' + reviewCount + '</span>');
|
||||
|
||||
if(isOpenedURAndSR !== 0) $("#subNavbar li[data-id='requirement'] a").append('<span class="label label-light label-badge">' + requirementCount + '</span>');
|
||||
|
||||
|
||||
+14
-8
@@ -54,10 +54,10 @@ $lang->my->contributeAction = 'My Contribute';
|
||||
$lang->my->profileAction = 'Profile';
|
||||
$lang->my->dynamicAction = 'Dynamic';
|
||||
|
||||
$lang->my->myExecutions = "My Stage/Sprint/Iteration";
|
||||
$lang->my->myExecutions = "My Executions";
|
||||
$lang->my->name = 'Name';
|
||||
$lang->my->code = 'Code';
|
||||
$lang->my->projects = 'Project';
|
||||
$lang->my->projects = 'Projects';
|
||||
$lang->my->executions = 'Executions';
|
||||
|
||||
$lang->my->executionMenu = new stdclass();
|
||||
@@ -87,12 +87,18 @@ $lang->my->audit->type = 'Type';
|
||||
$lang->my->audit->status = 'Status';
|
||||
|
||||
$lang->my->auditMenu = new stdclass();
|
||||
$lang->my->auditMenu->all = 'All';
|
||||
$lang->my->auditMenu->story = 'Story';
|
||||
$lang->my->auditMenu->testcase = 'Case';
|
||||
if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->project = 'Project';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->feedback = 'Feedback';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->oa = 'OA';
|
||||
$lang->my->auditMenu->audit = new stdclass();
|
||||
$lang->my->auditMenu->audit->all = 'All';
|
||||
$lang->my->auditMenu->audit->story = 'Story';
|
||||
$lang->my->auditMenu->audit->testcase = 'Case';
|
||||
if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->audit->project = 'Project';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = 'Feedback';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->audit->oa = 'OA';
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->audit = new stdclass();
|
||||
$lang->my->contributeMenu->audit->reviewedbyme = 'ReviewedByMe';
|
||||
$lang->my->contributeMenu->audit->createdbyme = 'CreatedByMe';
|
||||
|
||||
$lang->my->projectMenu = new stdclass();
|
||||
$lang->my->projectMenu->doing = 'Doing';
|
||||
|
||||
+12
-6
@@ -87,12 +87,18 @@ $lang->my->audit->type = 'Type';
|
||||
$lang->my->audit->status = 'Status';
|
||||
|
||||
$lang->my->auditMenu = new stdclass();
|
||||
$lang->my->auditMenu->all = 'All';
|
||||
$lang->my->auditMenu->story = 'Story';
|
||||
$lang->my->auditMenu->testcase = 'Case';
|
||||
if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->project = 'Project';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->feedback = 'Feedback';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->oa = 'OA';
|
||||
$lang->my->auditMenu->audit = new stdclass();
|
||||
$lang->my->auditMenu->audit->all = 'All';
|
||||
$lang->my->auditMenu->audit->story = 'Story';
|
||||
$lang->my->auditMenu->audit->testcase = 'Case';
|
||||
if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->audit->project = 'Project';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = 'Feedback';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->audit->oa = 'OA';
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->audit = new stdclass();
|
||||
$lang->my->contributeMenu->audit->reviewedbyme = 'ReviewedByMe';
|
||||
$lang->my->contributeMenu->audit->createdbyme = 'CreatedByMe';
|
||||
|
||||
$lang->my->projectMenu = new stdclass();
|
||||
$lang->my->projectMenu->doing = 'Doing';
|
||||
|
||||
+14
-8
@@ -54,10 +54,10 @@ $lang->my->contributeAction = 'My Contribute';
|
||||
$lang->my->profileAction = 'Profile';
|
||||
$lang->my->dynamicAction = 'Dynamic';
|
||||
|
||||
$lang->my->myExecutions = "My Stage/Sprint/Iteration";
|
||||
$lang->my->myExecutions = "My Executions";
|
||||
$lang->my->name = 'Name';
|
||||
$lang->my->code = 'Code';
|
||||
$lang->my->projects = 'Project';
|
||||
$lang->my->projects = 'Projects';
|
||||
$lang->my->executions = 'Executions';
|
||||
|
||||
$lang->my->executionMenu = new stdclass();
|
||||
@@ -87,12 +87,18 @@ $lang->my->audit->type = 'Type';
|
||||
$lang->my->audit->status = 'Status';
|
||||
|
||||
$lang->my->auditMenu = new stdclass();
|
||||
$lang->my->auditMenu->all = 'All';
|
||||
$lang->my->auditMenu->story = 'Story';
|
||||
$lang->my->auditMenu->testcase = 'Case';
|
||||
if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->project = 'Project';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->feedback = 'Feedback';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->oa = 'OA';
|
||||
$lang->my->auditMenu->audit = new stdclass();
|
||||
$lang->my->auditMenu->audit->all = 'All';
|
||||
$lang->my->auditMenu->audit->story = 'Story';
|
||||
$lang->my->auditMenu->audit->testcase = 'Case';
|
||||
if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->audit->project = 'Project';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = 'Feedback';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->audit->oa = 'OA';
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->audit = new stdclass();
|
||||
$lang->my->contributeMenu->audit->reviewedbyme = 'ReviewedByMe';
|
||||
$lang->my->contributeMenu->audit->createdbyme = 'CreatedByMe';
|
||||
|
||||
$lang->my->projectMenu = new stdclass();
|
||||
$lang->my->projectMenu->doing = 'Doing';
|
||||
|
||||
@@ -83,16 +83,22 @@ $lang->my->storyMenu->assignedByMe = '由我指派';
|
||||
$lang->my->audit = new stdclass();
|
||||
$lang->my->audit->title = '评审标题';
|
||||
$lang->my->audit->time = '提交时间';
|
||||
$lang->my->audit->type = '类型';
|
||||
$lang->my->audit->type = '评审对象';
|
||||
$lang->my->audit->status = '状态';
|
||||
|
||||
$lang->my->auditMenu = new stdclass();
|
||||
$lang->my->auditMenu->all = '所有';
|
||||
$lang->my->auditMenu->story = '需求';
|
||||
$lang->my->auditMenu->testcase = '用例';
|
||||
if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->project = '项目';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->feedback = '反馈';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->oa = '办公';
|
||||
$lang->my->auditMenu->audit = new stdclass();
|
||||
$lang->my->auditMenu->audit->all = '所有';
|
||||
$lang->my->auditMenu->audit->story = '需求';
|
||||
$lang->my->auditMenu->audit->testcase = '用例';
|
||||
if($config->edition == 'max' and strpos(",$config->disabledFeatures,", ',waterfall,') === false) $lang->my->auditMenu->audit->project = '项目';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = '反馈';
|
||||
if($config->edition != 'open') $lang->my->auditMenu->audit->oa = '办公';
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->audit = new stdclass();
|
||||
$lang->my->contributeMenu->audit->reviewedbyme = '由我评审';
|
||||
$lang->my->contributeMenu->audit->createdbyme = '由我发起';
|
||||
|
||||
$lang->my->projectMenu = new stdclass();
|
||||
$lang->my->projectMenu->doing = '进行中';
|
||||
|
||||
+13
-8
@@ -979,7 +979,7 @@ class myModel extends model
|
||||
*/
|
||||
public function getReviewingList($browseType, $orderBy = 'time_desc', $pager = null)
|
||||
{
|
||||
if($this->app->rawMethod != 'work') return array();
|
||||
if($this->app->rawMethod != 'audit') return array();
|
||||
$reviewList = array();
|
||||
if($browseType == 'all' or $browseType == 'story') $reviewList = array_merge($reviewList, $this->getReviewingStories());
|
||||
if($browseType == 'all' or $browseType == 'testcase') $reviewList = array_merge($reviewList, $this->getReviewingCases());
|
||||
@@ -1225,15 +1225,20 @@ class myModel extends model
|
||||
if(empty($actionField)) $actionField = 'date';
|
||||
$orderBy = $actionField . '_' . $direction;
|
||||
|
||||
$objectType = $this->config->my->reviewObjectType;
|
||||
if($browseType != 'all') $objectType = $browseType;
|
||||
if($browseType == 'oa') $objectType = $this->config->my->oaObjectType;
|
||||
if($objectType == 'testcase') $objectType = 'case';
|
||||
$condition = "action = 'reviewed'";
|
||||
if($browseType == 'createdbyme')
|
||||
{
|
||||
$condition = "(objectType in('story','case','feedback') and action = 'submitreview') OR ";
|
||||
$condition .= "(objectType = 'review' and action = 'opened') OR ";
|
||||
$condition .= "(objectType = 'attend' and action = 'commited') OR ";
|
||||
$condition .= "(objectType in('leave','makeup','overtime','lieu') and action = 'created')";
|
||||
$condition = "($condition)";
|
||||
}
|
||||
|
||||
$actions = $this->dao->select('objectType,objectID,actor,action,MAX(`date`) as `date`')->from(TABLE_ACTION)
|
||||
->where('action')->eq('reviewed')
|
||||
->andWhere('objectType')->in($objectType)
|
||||
->andWhere('actor')->eq($this->app->user->account)
|
||||
->where('actor')->eq($this->app->user->account)
|
||||
->andWhere('objectType')->in($this->config->my->reviewObjectType)
|
||||
->andWhere($condition)
|
||||
->groupBy('objectType,objectID')
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
|
||||
@@ -5,11 +5,18 @@
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php $rawMethod = $app->rawMethod;?>
|
||||
<?php foreach($lang->my->auditMenu as $key => $type):?>
|
||||
<?php $active = $key == $browseType ? 'btn-active-text' : '';?>
|
||||
<?php $recTotalLabel = '';?>
|
||||
<?php if($key == $browseType) $recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a($this->createLink('my', $app->rawMethod, "mode=$mode&browseType=$key¶m=&orderBy=time_desc"), '<span class="text">' . $type . '</span>' . $recTotalLabel, '', 'class="btn btn-link ' . $active .'"');?>
|
||||
<?php $menuKey = $rawMethod . 'Menu';?>
|
||||
<?php foreach($lang->my->$menuKey->audit as $key => $type):?>
|
||||
<?php
|
||||
$active = $key == $browseType ? 'btn-active-text' : '';
|
||||
|
||||
$recTotalLabel = '';
|
||||
if($key == $browseType) $recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
|
||||
|
||||
$param = "browseType=$key¶m=&orderBy=time_desc";
|
||||
if($rawMethod == 'contribute') $param = "mode=$mode&browseType=$key¶m=&orderBy=time_desc";
|
||||
?>
|
||||
<?php echo html::a($this->createLink('my', $app->rawMethod, $param), '<span class="text">' . $type . '</span>' . $recTotalLabel, '', 'class="btn btn-link ' . $active .'"');?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,14 +31,17 @@
|
||||
<form id='myReviewForm' class="main-table" method="post" data-ride="table">
|
||||
<table class='table has-sort-head' id='reviewList'>
|
||||
<thead>
|
||||
<?php $vars = "mode=$mode&browseType=$browseType¶m=&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID";?>
|
||||
<?php
|
||||
$vars = "browseType=$browseType¶m=&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID";
|
||||
if($rawMethod == 'contribute') $vars = "mode=$mode&browseType=$browseType¶m=&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID";
|
||||
?>
|
||||
<tr>
|
||||
<th class='c-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='c-title'> <?php $rawMethod == 'contribute' ? print($lang->my->audit->title) : common::printOrderLink('title', $orderBy, $vars, $lang->my->audit->title);?></th>
|
||||
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->my->audit->type);?></th>
|
||||
<th class='c-date w-150px'> <?php common::printOrderLink('time', $orderBy, $vars, $lang->my->audit->time);?></th>
|
||||
<th class='c-status w-80px'><?php $rawMethod == 'contribute' ? print($lang->my->audit->status) : common::printOrderLink('status', $orderBy, $vars, $lang->my->audit->status);?></th>
|
||||
<?php if($rawMethod == 'work'):?>
|
||||
<?php if($rawMethod == 'audit'):?>
|
||||
<th class='c-actions-2'><?php echo $lang->actions?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
@@ -58,7 +68,7 @@
|
||||
<td class='c-type'> <?php echo $typeName;?></td>
|
||||
<td class='c-time'> <?php echo $review->time?></td>
|
||||
<td class='c-status'><?php echo zget($statusList, $review->status, '')?></td>
|
||||
<?php if($rawMethod == 'work'):?>
|
||||
<?php if($rawMethod == 'audit'):?>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
$module = $type;
|
||||
|
||||
@@ -1201,7 +1201,7 @@ class productModel extends model
|
||||
{
|
||||
$product = $this->getById($productID);
|
||||
|
||||
$projects = $this->dao->select('t2.id,t2.name')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
return $this->dao->select('t2.id, t2.name')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.product')->eq($productID)
|
||||
->beginIF($status == 'closed')->andWhere('t2.status')->ne('closed')->fi()
|
||||
@@ -1209,11 +1209,9 @@ class productModel extends model
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF($product->type != 'normal' and $branch !== '')->andWhere('t1.branch')->in($branch)->fi()
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->beginIF($appendProject)->orWhere('t2.id')->in($appendProject)->fi()
|
||||
->orderBy('order_asc')
|
||||
->fetchPairs('id', 'name');
|
||||
|
||||
if($appendProject) $projects += $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($appendProject)->fetchPairs('id', 'name');
|
||||
return $projects;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -908,6 +908,17 @@ class projectModel extends model
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project and execution pairs.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectExecutionPairs()
|
||||
{
|
||||
return $this->dao->select('project, id')->from(TABLE_PROJECT)->where('type')->eq('sprint')->andWhere('multiple')->eq('0')->andWhere('deleted')->eq('0')->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the project privs according to the project model.
|
||||
*
|
||||
@@ -1713,7 +1724,11 @@ class projectModel extends model
|
||||
/* When it has multiple errors, only the first one is prompted */
|
||||
if(dao::isError() and count(dao::$errors['realBegan']) > 1) dao::$errors['realBegan'] = dao::$errors['realBegan'][0];
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldProject, $project);
|
||||
if(!dao::isError())
|
||||
{
|
||||
if(!$oldProject->multiple) $this->changeExecutionStatus($projectID, 'start');
|
||||
return common::createChanges($oldProject, $project);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1773,7 +1788,11 @@ class projectModel extends model
|
||||
->where('id')->eq((int)$projectID)
|
||||
->exec();
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldProject, $project);
|
||||
if(!dao::isError())
|
||||
{
|
||||
if(!$oldProject->multiple) $this->changeExecutionStatus($projectID, 'suspend');
|
||||
return common::createChanges($oldProject, $project);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1817,6 +1836,8 @@ class projectModel extends model
|
||||
|
||||
if(dao::isError()) return false;
|
||||
|
||||
if(!$oldProject->multiple) $this->changeExecutionStatus($projectID, 'activate');
|
||||
|
||||
/* Readjust task. */
|
||||
if($this->post->readjustTime and $this->post->readjustTask)
|
||||
{
|
||||
@@ -1909,6 +1930,8 @@ class projectModel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!$oldProject->multiple) $this->changeExecutionStatus($projectID, 'close');
|
||||
|
||||
/* Close the shadow product of the project. */
|
||||
if(!$oldProject->hasProduct)
|
||||
{
|
||||
@@ -1921,6 +1944,22 @@ class projectModel extends model
|
||||
return common::createChanges($oldProject, $project);
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify the execution status when changing the status of no execution project.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $status
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function changeExecutionStatus($projectID, $status)
|
||||
{
|
||||
if(!in_array($status, array('start', 'suspend', 'activate', 'close'))) return false;
|
||||
$executionID = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($projectID)->andWhere('multiple')->eq('0')->fetch('id');
|
||||
if(!$executionID) return false;
|
||||
return $this->loadModel('execution')->$status($executionID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a product's name as its project.
|
||||
*
|
||||
|
||||
@@ -292,7 +292,7 @@ class reportModel extends model
|
||||
|
||||
if($assign == 'noassign')
|
||||
{
|
||||
$members = $this->dao->select('t1.account,t2.name,t1.root,t3.id as project,t3.name as projectname')->from(TABLE_TEAM)->alias('t1')
|
||||
$members = $this->dao->select('t1.account,t2.name,t2.multiple,t1.root,t3.id as project,t3.name as projectname')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t2.id = t1.root')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t3.id = t2.project')
|
||||
->where('t2.status')->notin('cancel, closed, done, suspended')
|
||||
@@ -314,6 +314,7 @@ class reportModel extends model
|
||||
{
|
||||
$project[$execution->projectname]['projectID'] = $execution->project;
|
||||
$project[$execution->projectname]['execution'][$name]['executionID'] = $execution->root;
|
||||
$project[$execution->projectname]['execution'][$name]['multiple'] = $execution->multiple;
|
||||
$project[$execution->projectname]['execution'][$name]['count'] = 0;
|
||||
$project[$execution->projectname]['execution'][$name]['manhour'] = 0;
|
||||
|
||||
@@ -1202,7 +1203,7 @@ class reportModel extends model
|
||||
*/
|
||||
public function getProjectExecutions()
|
||||
{
|
||||
$executions = $this->dao->select('t1.id, t1.name, t2.name as projectname, t1.status')
|
||||
$executions = $this->dao->select('t1.id, t1.name, t2.name as projectname, t1.status, t1.multiple')
|
||||
->from(TABLE_EXECUTION)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
@@ -1210,7 +1211,11 @@ class reportModel extends model
|
||||
->fetchAll();
|
||||
|
||||
$pairs = array();
|
||||
foreach($executions as $execution) $pairs[$execution->id] = $execution->projectname . '/' .$execution->name;
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
if($execution->multiple) $pairs[$execution->id] = $execution->projectname . '/' . $execution->name;
|
||||
if(!$execution->multiple) $pairs[$execution->id] = $execution->projectname;
|
||||
}
|
||||
|
||||
return $pairs;
|
||||
}
|
||||
|
||||
@@ -95,9 +95,13 @@
|
||||
<?php foreach($info['execution'] as $executionName => $executionInfo):?>
|
||||
<?php if($projectTimes != 1 || $userTimes != 1) echo "<tr>";?>
|
||||
<?php if($projectTimes == 1):?>
|
||||
<td class="text-center" rowspan="<?php echo $projectCount;?>" title="<?php echo $projectName;?>"><?php echo html::a($this->createLink('project', 'view', "projectID={$info['projectID']}"), $projectName);?></td>
|
||||
<td class="text-center" rowspan="<?php echo $projectCount;?>" title="<?php echo $projectName;?>"><?php echo html::a($this->createLink('project', 'view', "projectID={$info['projectID']}"), $projectName);?></td>
|
||||
<?php endif;?>
|
||||
<?php if($executionInfo['multiple']):?>
|
||||
<td class="text-center" title="<?php echo $executionName;?>"><?php echo html::a($this->createLink('execution', 'view', "executionID={$executionInfo['executionID']}"), $executionName);?></td>
|
||||
<?php else:?>
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
<td class="text-center" title="<?php echo $executionName;?>"><?php echo html::a($this->createLink('execution', 'view', "executionID={$executionInfo['executionID']}"), $executionName);?></td>
|
||||
<td class="text-center"><?php echo $executionInfo['count'];?></td>
|
||||
<td class="text-center"><?php echo $executionInfo['manhour'];?></td>
|
||||
<?php if($userTimes == 1):?>
|
||||
|
||||
@@ -166,6 +166,10 @@ class story extends control
|
||||
}
|
||||
$actionID = $this->action->create('story', $storyID, $action, '', $extra);
|
||||
|
||||
/* Record submit review action. */
|
||||
$story = $this->dao->findById((int)$storyID)->from(TABLE_STORY)->fetch();
|
||||
if($story->status == 'reviewing') $this->action->create('story', $storyID, 'submitReview');
|
||||
|
||||
if($objectID != 0)
|
||||
{
|
||||
$object = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch();
|
||||
@@ -1153,6 +1157,10 @@ class story extends control
|
||||
$action = !empty($changes) ? 'Changed' : 'Commented';
|
||||
$actionID = $this->action->create('story', $storyID, $action, $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
/* Record submit review action. */
|
||||
$story = $this->dao->findById((int)$storyID)->from(TABLE_STORY)->fetch();
|
||||
if($story->status == 'reviewing') $this->action->create('story', $storyID, 'submitReview');
|
||||
}
|
||||
|
||||
$this->executeHooks($storyID);
|
||||
@@ -1341,7 +1349,7 @@ class story extends control
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.product')->eq($product->id)
|
||||
->andWhere('t2.type')->eq('project')
|
||||
->fetch('model');
|
||||
->fetch('model');
|
||||
|
||||
if($projectModel === 'waterfall')
|
||||
{
|
||||
|
||||
@@ -409,6 +409,7 @@ class testcase extends control
|
||||
|
||||
$this->loadModel('action');
|
||||
$this->action->create('case', $caseID, 'Opened');
|
||||
if($this->testcase->getStatus('create') == 'wait') $this->action->create('case', $caseID, 'submitReview');
|
||||
|
||||
/* If the story is linked project, make the case link the project. */
|
||||
$this->testcase->syncCase2Project($caseResult['caseInfo'], $caseID);
|
||||
@@ -858,6 +859,9 @@ class testcase extends control
|
||||
{
|
||||
$this->loadModel('story');
|
||||
|
||||
$case = $this->testcase->getById($caseID);
|
||||
if(!$case) return print(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$testtasks = $this->loadModel('testtask')->getGroupByCases($caseID);
|
||||
$testtasks = empty($testtasks[$caseID]) ? array() : $testtasks[$caseID];
|
||||
|
||||
@@ -875,6 +879,8 @@ class testcase extends control
|
||||
$action = !empty($changes) ? 'Edited' : 'Commented';
|
||||
$actionID = $this->action->create('case', $caseID, $action, $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
if($case->status != 'wait' and $this->post->status == 'wait') $this->action->create('case', $caseID, 'submitReview');
|
||||
}
|
||||
|
||||
$this->executeHooks($caseID);
|
||||
@@ -889,8 +895,6 @@ class testcase extends control
|
||||
}
|
||||
}
|
||||
|
||||
$case = $this->testcase->getById($caseID);
|
||||
if(!$case) return print(js::error($this->lang->notFound) . js::locate('back'));
|
||||
if($case->auto == 'unit')
|
||||
{
|
||||
$this->lang->testcase->subMenu->testcase->feature['alias'] = '';
|
||||
|
||||
@@ -61,7 +61,6 @@ class testcaseModel extends model
|
||||
->setIF($this->app->tab == 'project', 'project', $this->session->project)
|
||||
->setIF($this->app->tab == 'execution', 'execution', $this->session->execution)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story))
|
||||
->stripTags($this->config->testcase->editor->create['id'], $this->config->allowedTags)
|
||||
->remove('steps,expects,files,labels,stepType,forceNotReview')
|
||||
->setDefault('story', 0)
|
||||
->cleanInt('story,product,branch,module')
|
||||
@@ -78,7 +77,6 @@ class testcaseModel extends model
|
||||
|
||||
/* Value of story may be showmore. */
|
||||
$case->story = (int)$case->story;
|
||||
$case = $this->loadModel('file')->processImgURL($case, $this->config->testcase->editor->create['id'], $this->post->uid);
|
||||
$this->dao->insert(TABLE_CASE)->data($case)->autoCheck()->batchCheck($this->config->testcase->create->requiredFields, 'notempty')->checkFlow()->exec();
|
||||
if(!$this->dao->isError())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user