Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -1052,8 +1052,8 @@ class actionModel extends model
|
||||
elseif($action->objectType == 'team')
|
||||
{
|
||||
$action->objectLink = '';
|
||||
if($action->execution) $action->objectLink = helper::createLink('execution', 'team', 'executionID=' . $action->execution);
|
||||
if($action->project) $action->objectLink = helper::createLink('project', 'manageMembers', 'projectID=' . $action->project);
|
||||
if($action->execution) $action->objectLink = helper::createLink('execution', 'team', 'executionID=' . $action->execution);
|
||||
$action->objectLabel = zget($this->lang->action->objectTypes, $action->objectLabel);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -381,10 +381,10 @@ class build extends control
|
||||
}
|
||||
if($varName == 'testTaskBuild')
|
||||
{
|
||||
$builds = array('') + $this->build->getExecutionBuildPairs($executionID, $productID, $branch, 'noempty,notrunk');
|
||||
$builds = $this->build->getExecutionBuildPairs($executionID, $productID, $branch, 'noempty,notrunk');
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
|
||||
if(empty(array_filter($builds)))
|
||||
if(empty($builds))
|
||||
{
|
||||
$projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('project');
|
||||
|
||||
@@ -393,7 +393,7 @@ class build extends control
|
||||
$html .= html::a("javascript:loadExecutionBuilds($executionID)", $this->lang->refresh);
|
||||
die($html);
|
||||
}
|
||||
die(html::select('build', $builds, $build, "class='form-control' onchange='loadTestReports(this.value)'"));
|
||||
die(html::select('build', array('') + $builds, $build, "class='form-control' onchange='loadTestReports(this.value)'"));
|
||||
}
|
||||
if($varName == 'dropdownList')
|
||||
{
|
||||
|
||||
@@ -2256,10 +2256,7 @@ class execution extends control
|
||||
$account = $user->account;
|
||||
|
||||
$this->execution->unlinkMember($executionID, $account);
|
||||
if(!dao::isError())
|
||||
{
|
||||
$this->loadModel('action')->create('team', $executionID, 'managedTeam');
|
||||
}
|
||||
if(!dao::isError()) $this->loadModel('action')->create('team', $executionID, 'managedTeam');
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
|
||||
@@ -32,8 +32,8 @@ class personnel extends control
|
||||
$program = $this->program->getByID($programID);
|
||||
|
||||
/* Build the search form. */
|
||||
$queryID = $browseType == 'bysearch' ? (int)$param : 0;
|
||||
$actionURL = $this->createLink('personnel', 'accessible', "pargramID=$programID&deptID=$deptID&browseType=bysearch&quertID=myQueryID");
|
||||
$queryID = $browseType == 'bysearch' ? (int)$param : 0;
|
||||
$actionURL = $this->createLink('personnel', 'accessible', "pargramID=$programID&deptID=$deptID&browseType=bysearch&quertID=myQueryID");
|
||||
$personnelList = $this->personnel->getAccessiblePersonnel($programID, $deptID, $browseType, $queryID);
|
||||
|
||||
/* Set the pager. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Load product Lines.
|
||||
* Load product Lines.
|
||||
*
|
||||
* @param $rootID
|
||||
* @access public
|
||||
@@ -47,7 +47,7 @@ $('#program').change(function()
|
||||
*/
|
||||
function toggleLine(obj)
|
||||
{
|
||||
var $obj = $(obj);
|
||||
var $obj = $(obj);
|
||||
if($obj.length == 0) return false;
|
||||
|
||||
var $line = $obj.closest('table').find('#line');
|
||||
|
||||
@@ -537,8 +537,9 @@ class productModel extends model
|
||||
$line->grade = 1;
|
||||
$line->name = $this->post->lineName;
|
||||
$line->root = $product->program;
|
||||
$line->order = $maxOrder;
|
||||
$line->order = $maxOrder;
|
||||
$this->dao->insert(TABLE_MODULE)->data($line)->exec();
|
||||
|
||||
$lineID = $this->dao->lastInsertID();
|
||||
$path = ",$lineID,";
|
||||
$this->dao->update(TABLE_MODULE)->set('path')->eq($path)->where('id')->eq($lineID)->exec();
|
||||
|
||||
@@ -386,7 +386,6 @@ class project extends control
|
||||
* Edit a project.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $from project|program|programProject
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -1487,8 +1487,6 @@ class projectModel extends model
|
||||
*/
|
||||
public function getTeamMemberPairs($projectID)
|
||||
{
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembers();
|
||||
|
||||
$project = $this->getByID($projectID);
|
||||
$type = $this->config->systemMode == 'new' ? $project->type : 'project';
|
||||
if(empty($project)) return array();
|
||||
|
||||
@@ -1279,7 +1279,7 @@ class storyModel extends model
|
||||
|
||||
/* Update the story status by review rules. */
|
||||
$reviewerList = $this->dao->select('reviewer,result')->from(TABLE_STORYREVIEW)->where('story')->eq($storyID)->andWhere('version')->eq($oldStory->version)->fetchPairs('reviewer', 'result');
|
||||
$reviewedBy = explode(',', trim($story->reviewedBy, ','));
|
||||
$reviewedBy = explode(',', trim($story->reviewedBy, ','));
|
||||
if(!array_diff(array_keys($reviewerList), $reviewedBy))
|
||||
{
|
||||
$status = $this->setStatusByReviewRules($reviewerList);
|
||||
@@ -4237,11 +4237,13 @@ class storyModel extends model
|
||||
$passCount = $reviewResult == 'pass' ? $passCount + 1 : $passCount;
|
||||
$rejectCount = $reviewResult == 'reject' ? $rejectCount + 1 : $rejectCount;
|
||||
}
|
||||
|
||||
if($reviewRule == 'allpass')
|
||||
{
|
||||
if($passCount == count($reviewerList)) $status = 'active';
|
||||
if($rejectCount == count($reviewerList)) $status = 'closed';
|
||||
}
|
||||
|
||||
if($reviewRule == 'halfpass')
|
||||
{
|
||||
if($passCount >= floor(count($reviewerList) / 2) + 1) $status = 'active';
|
||||
@@ -4250,5 +4252,4 @@ class storyModel extends model
|
||||
|
||||
return $status;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user