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

This commit is contained in:
zhujinyong
2021-03-18 16:19:35 +08:00
52 changed files with 323 additions and 251 deletions
+1 -1
View File
@@ -432,7 +432,7 @@ $lang->action->label->product = $lang->productCommon . '|product|view|produc
$lang->action->label->productplan = 'Plan|productplan|view|productID=%s';
$lang->action->label->release = 'Release|release|view|productID=%s';
$lang->action->label->story = 'Story|story|view|storyID=%s';
$lang->action->label->program = "Program|program|pgmproduct|programID=%s";
$lang->action->label->program = "Program|program|product|programID=%s";
$lang->action->label->project = "Project|project|index|projectID=%s";
if($config->systemMode == 'new')
{
+1 -1
View File
@@ -432,7 +432,7 @@ $lang->action->label->product = $lang->productCommon . '|product|view|produc
$lang->action->label->productplan = "计划|productplan|view|productID=%s";
$lang->action->label->release = '发布|release|view|productID=%s';
$lang->action->label->story = "{$lang->SRCommon}|story|view|storyID=%s";
$lang->action->label->program = "项目集|program|pgmproduct|programID=%s";
$lang->action->label->program = "项目集|program|product|programID=%s";
$lang->action->label->project = "项目|project|index|projectID=%s";
if($config->systemMode == 'new')
{
+3 -1
View File
@@ -547,7 +547,9 @@ function notice()
else
{
executionID = $('#execution').val();
html += '<a href="' + createLink('build', 'create','executionID=' + executionID) + '" target="_blank" style="padding-right:5px">' + createBuild + '</a> ';
link = createLink('build', 'create','executionID=' + executionID + '&productID=' + $('#product').val());
link += config.requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes';
html += '<a href="' + link + '" data-toggle="modal" data-type="iframe" style="padding-right:5px">' + createBuild + '</a> ';
html += '<a href="javascript:loadExecutionBuilds(' + executionID + ')">' + refresh + '</a>';
}
var $bba = $('#buildBoxActions');
+24 -15
View File
@@ -19,14 +19,23 @@ class build extends control
* @access public
* @return void
*/
public function create($executionID, $productID = 0)
public function create($executionID = 0, $productID = 0, $projectID = 0)
{
/* Create execution if no execution. */
if($executionID == 0) die(js::locate($this->createLink('execution', 'create'), 'parent'));
/* Load these models. */
$this->loadModel('execution');
$this->loadModel('user');
if($this->app->openApp == 'project')
{
commonModel::setAppObjectID('project', $projectID);
$executions = $this->execution->getPairs($projectID);
$executionID = key($executions);
}
if(!empty($_POST))
{
$buildID = $this->build->create($executionID);
$executionID = $this->post->execution;
$buildID = $this->build->create($executionID);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('build', $buildID, 'opened');
@@ -36,18 +45,18 @@ class build extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('build', 'view', "buildID=$buildID")));
}
/* Load these models. */
$this->loadModel('execution');
$this->loadModel('user');
/* Set session and get execution by id. */
$this->session->set('buildCreate', $this->app->getURI(true));
$execution = $this->execution->getByID($executionID);
if($this->app->openApp == 'execution')
{
/* Set session and get execution by id. */
$this->session->set('buildCreate', $this->app->getURI(true));
/* Set menu. */
$executions = $this->execution->getPairs($execution->project);
$this->execution->setMenu($executions, $executionID);
commonModel::setAppObjectID('execution', $executionID);
}
/* Set menu. */
$executions = $this->execution->getPairs($execution->project);
$this->execution->setMenu($executions, $executionID);
commonModel::setAppObjectID('execution', $executionID);
$productGroups = $this->execution->getProducts($executionID);
$productID = $productID ? $productID : key($productGroups);
@@ -55,13 +64,13 @@ class build extends control
foreach($productGroups as $product) $products[$product->id] = $product->name;
$this->view->title = $execution->name . $this->lang->colon . $this->lang->build->create;
$this->view->position[] = html::a($this->createLink('execution', 'task', "executionID=$executionID"), $execution->name);
$this->view->position[] = $this->lang->build->create;
$this->view->product = isset($productGroups[$productID]) ? $productGroups[$productID] : '';
$this->view->branches = (isset($productGroups[$productID]) and $productGroups[$productID]->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID);
$this->view->executionID = $executionID;
$this->view->products = $products;
$this->view->executions = isset($executions) ? $executions : array();
$this->view->lastBuild = $this->build->getLast($executionID);
$this->view->productGroups = $productGroups;
$this->view->users = $this->user->getPairs('nodeleted|noclosed');
+10 -4
View File
@@ -1,7 +1,7 @@
/**
* Load branches
*
* @param int $productID
* Load branches
*
* @param int $productID
* @access public
* @return void
*/
@@ -9,7 +9,13 @@ function loadBranches(productID)
{
$('#branch').remove();
$('#branch_chosen').remove();
$.get(createLink('branch', 'ajaxGetBranches', 'productID=' + productID + '&oldBranch=' + productGroups[productID]['branch']), function(data)
var oldBranch = 0;
if(typeof(productGroups[productID]) != "undefined")
{
oldBranch = productGroups[productID]['branch'];
}
$.get(createLink('branch', 'ajaxGetBranches', 'productID=' + productID + '&oldBranch=' + oldBranch), function(data)
{
if(data)
{
+23
View File
@@ -4,4 +4,27 @@ $().ready(function()
{
$('#name').val($(this).text()).focus();
});
});
/**
* Load products.
*
* @param int $executionID
* @access public
* @return void
*/
function loadProducts(executionID)
{
$('#product').remove();
$('#product_chosen').remove();
$('#branch').remove();
$('#branch_chosen').remove();
$.get(createLink('product', 'ajaxGetProducts', 'executionID=' + executionID), function(data)
{
if(data)
{
$('.input-group').append(data);
$('#product').chosen();
}
});
}
+2 -3
View File
@@ -60,9 +60,9 @@ class buildModel extends model
*/
public function getProjectBuilds($projectID = 0, $type = 'all', $param = 0)
{
return $this->dao->select('t1.*, t2.name as projectName, t2.id as projectID, t3.name as productName, t4.name as branchName')
return $this->dao->select('t1.*, t2.name as executionName, t2.id as executionID, t3.name as productName, t4.name as branchName')
->from(TABLE_BUILD)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
->where('t1.project')->eq((int)$projectID)
@@ -293,7 +293,6 @@ class buildModel extends model
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
->where('t1.product')->in($products)
->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->beginIF($branch)->andWhere('t1.branch')->in("0,$branch")->fi()
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
+6
View File
@@ -19,6 +19,12 @@
</div>
<form class='load-indicator main-form form-ajax' id='dataform' method='post' enctype='multipart/form-data'>
<table class='table table-form'>
<?php if(!empty($executions)):?>
<tr>
<th><?php echo $lang->executionCommon;?></th>
<td><?php echo html::select('execution', $executions, $executionID, "onchange='loadProducts(this.value);' class='form-control chosen' required");?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->build->product;?></th>
<?php if(!empty($products)):?>
+4 -4
View File
@@ -615,7 +615,7 @@ $lang->navGroup->auditplan = 'project';
$lang->navGroup->cm = 'project';
$lang->navGroup->nc = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->projectbuild = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->repo = 'project';
$lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
@@ -860,7 +860,7 @@ $lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|project
$lang->menu->scrum->doc = 'Doc|doc|index|';
$lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->build = array('link' => 'Build|project|build|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
@@ -887,7 +887,7 @@ $lang->menu->waterfall->ci = 'Repo|repo|browse|';
$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = 'QA|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->build = array('link' => 'Build|project|build|project={PROJECT}');
$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
@@ -927,6 +927,6 @@ $lang->projectstory->menu = new stdclass();
$lang->stakeholder->menu = $lang->scrum->setMenu;
$lang->nc->menu = $lang->auditplan->menu;
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'projectbuild', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
include (dirname(__FILE__) . '/menuOrder.php');
+6 -6
View File
@@ -348,7 +348,7 @@ $lang->execution->menu->qa = array('link' => 'Bug|execution|qa|executionID
$lang->execution->menu->repo = array('link' => 'Repo|repo|browse|projectID=%s');
$lang->execution->menu->doc = array('link' => 'Doc|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc');
$lang->execution->menu->build = array('link' => 'Build|execution|build|executionID=%s', 'subModule' => 'build');
$lang->execution->menu->release = array('link' => 'Release|projectrelease|browse|project=%s');
$lang->execution->menu->release = array('link' => 'Release|projectrelease|browse|projectID=0&executionID=%s', 'subModule' => 'projectrelease');
$lang->execution->menu->action = array('link' => 'Dynamics|execution|dynamic|executionID=%s');
$lang->execution->menu->setting = array('link' => 'Settings|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
@@ -529,7 +529,7 @@ $lang->admin->menu->custom = array('link' => 'Custom|custom|index', 'subModul
$lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension');
$lang->admin->menu->dev = array('link' => 'Develop|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor,entry');
$lang->admin->menu->message = array('link' => 'Message|message|index', 'subModule' => 'message,mail,webhook');
$lang->admin->menu->system = array('link' => 'System|backup|index', 'subModule' => 'cron,backup,action');
$lang->admin->menu->system = array('link' => 'System|backup|index', 'subModule' => 'cron,backup,action,search');
$lang->subject = new stdclass();
$lang->subject->menu = new stdclass();
@@ -613,7 +613,7 @@ $lang->navGroup->auditplan = 'project';
$lang->navGroup->cm = 'project';
$lang->navGroup->nc = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->projectbuild = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
$lang->navGroup->compile = 'project';
@@ -863,7 +863,7 @@ $lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|project
$lang->menu->scrum->doc = 'Doc|doc|index|';
$lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->build = array('link' => 'Build|project|build|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
@@ -890,7 +890,7 @@ $lang->menu->waterfall->ci = 'Repo|repo|browse|';
$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = 'QA|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->build = array('link' => 'Build|project|build|project={PROJECT}');
$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
@@ -930,6 +930,6 @@ $lang->projectstory->menu = new stdclass();
$lang->stakeholder->menu = $lang->scrum->setMenu;
$lang->nc->menu = $lang->auditplan->menu;
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'projectbuild', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
include (dirname(__FILE__) . '/menuOrder.php');
+4 -4
View File
@@ -607,7 +607,7 @@ $lang->navGroup->auditplan = 'project';
$lang->navGroup->cm = 'project';
$lang->navGroup->nc = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->projectbuild = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->repo = 'project';
$lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
@@ -852,7 +852,7 @@ $lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|project
$lang->menu->scrum->doc = 'Doc|doc|index|';
$lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->build = array('link' => 'Build|project|build|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
@@ -879,7 +879,7 @@ $lang->menu->waterfall->ci = 'Repo|repo|browse|';
$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = 'QA|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->build = array('link' => 'Build|project|build|project={PROJECT}');
$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
@@ -919,6 +919,6 @@ $lang->projectstory->menu = new stdclass();
$lang->stakeholder->menu = $lang->scrum->setMenu;
$lang->nc->menu = $lang->auditplan->menu;
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'projectbuild', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
include (dirname(__FILE__) . '/menuOrder.php');
+2 -2
View File
@@ -23,7 +23,7 @@ $lang->waterfall->menuOrder[38] = 'review';
$lang->waterfall->menuOrder[39] = 'cm';
$lang->waterfall->menuOrder[40] = 'qa';
$lang->waterfall->menuOrder[45] = 'doc';
$lang->waterfall->menuOrder[50] = 'projectbuild';
$lang->waterfall->menuOrder[50] = 'build';
$lang->waterfall->menuOrder[55] = 'projectrelease';
$lang->waterfall->menuOrder[60] = 'weekly';
$lang->waterfall->menuOrder[65] = 'other';
@@ -37,7 +37,7 @@ $lang->scrum->menuOrder[15] = 'projectstory';
$lang->scrum->menuOrder[20] = 'qa';
$lang->scrum->menuOrder[25] = 'ci';
$lang->scrum->menuOrder[30] = 'doc';
$lang->scrum->menuOrder[35] = 'projectbuild';
$lang->scrum->menuOrder[35] = 'build';
$lang->scrum->menuOrder[40] = 'projectrelease';
$lang->scrum->menuOrder[45] = 'other';
$lang->scrum->menuOrder[48] = 'dynamic';
+4 -4
View File
@@ -613,7 +613,7 @@ $lang->navGroup->auditplan = 'project';
$lang->navGroup->cm = 'project';
$lang->navGroup->nc = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->projectbuild = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->repo = 'project';
$lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
@@ -858,7 +858,7 @@ $lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|project
$lang->menu->scrum->doc = 'Doc|doc|index|';
$lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->build = array('link' => 'Build|project|build|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
@@ -885,7 +885,7 @@ $lang->menu->waterfall->ci = 'Repo|repo|browse|';
$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = 'QA|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->build = array('link' => 'Build|project|build|project={PROJECT}');
$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
@@ -925,6 +925,6 @@ $lang->projectstory->menu = new stdclass();
$lang->stakeholder->menu = $lang->scrum->setMenu;
$lang->nc->menu = $lang->auditplan->menu;
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'projectbuild', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
include (dirname(__FILE__) . '/menuOrder.php');
+10 -8
View File
@@ -336,7 +336,7 @@ $lang->story->menu = $lang->product->menu;
$lang->execution = new stdclass();
$lang->execution->homeMenu = new stdclass();
$lang->execution->homeMenu->index = '仪表盘|execution|index|';
$lang->execution->homeMenu->list = array('link' => '执行|execution|all|', 'alias' => 'batchedit');
$lang->execution->homeMenu->list = array('link' => '执行|execution|all|', 'alias' => 'create,batchedit');
$lang->execution->menu = new stdclass();
$lang->execution->menu->task = array('link' => '任务|execution|task|executionID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
@@ -348,7 +348,7 @@ $lang->execution->menu->qa = array('link' => '测试|execution|qa|executio
$lang->execution->menu->repo = array('link' => '代码|repo|browse|projectID=%s');
$lang->execution->menu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s', 'subModule' => 'doc');
$lang->execution->menu->build = array('link' => '版本|execution|build|executionID=%s', 'subModule' => 'build');
$lang->execution->menu->release = array('link' => '发布|projectrelease|browse|project=%s');
$lang->execution->menu->release = array('link' => '发布|projectrelease|browse|projectID=0&executionID=%s', 'subModule' => 'projectrelease');
$lang->execution->menu->action = array('link' => '动态|execution|dynamic|executionID=%s');
$lang->execution->menu->setting = array('link' => '设置|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
@@ -535,7 +535,7 @@ $lang->admin->menu->custom = array('link' => '自定义|custom|index', 'subMo
$lang->admin->menu->extension = array('link' => '插件|extension|browse', 'subModule' => 'extension');
$lang->admin->menu->dev = array('link' => '二次开发|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor,entry');
$lang->admin->menu->message = array('link' => '通知|message|index', 'subModule' => 'message,mail,webhook');
$lang->admin->menu->system = array('link' => '系统|backup|index', 'subModule' => 'cron,backup,action');
$lang->admin->menu->system = array('link' => '系统|backup|index', 'subModule' => 'cron,backup,action,search');
$lang->subject = new stdclass();
$lang->subject->menu = new stdclass();
@@ -619,7 +619,7 @@ $lang->navGroup->auditplan = 'project';
$lang->navGroup->cm = 'project';
$lang->navGroup->nc = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->projectbuild = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
$lang->navGroup->compile = 'project';
@@ -634,6 +634,8 @@ $lang->navGroup->doc = 'doc';
$lang->navGroup->qa = 'qa';
$lang->navGroup->repo = 'repo';
$lang->navGroup->company = 'system';
$lang->navGroup->sqlbuilder = 'system';
$lang->navGroup->auditcl = 'system';
@@ -864,12 +866,12 @@ $lang->icons['score'] = 'tint';
$lang->menu = new stdclass();
$lang->menu->scrum = new stdclass();
$lang->menu->scrum->index = '仪表盘|project|index|project={PROJECT}';
$lang->menu->scrum->execution = "$lang->executionCommon|execution|all|status=all&projectID={PROJECT}";
$lang->menu->scrum->execution = "$lang->executionCommon|project|execution|projectID={PROJECT}";
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|projectID={PROJECT}', 'alias' => 'story,track');
$lang->menu->scrum->doc = array('link' => '文档|doc|objectLibs|type=project&objectID={PROJECT}', 'subModule' => 'doc');
$lang->menu->scrum->qa = array('link' => '测试|qa|index', 'subModule' => 'testcase,testtask');
$lang->menu->scrum->ci = '代码|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->build = array('link' => '版本|project|build|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => '发布|projectrelease|browse|project={PROJECT}');
$lang->menu->scrum->dynamic = array('link' => '动态|project|dynamic|project={PROJECT}');
$lang->menu->scrum->projectsetting = array('link' => '设置|project|view|project={PROJECT}', 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
@@ -908,7 +910,7 @@ $lang->menu->waterfall->ci = '代码|repo|browse|';
$lang->menu->waterfall->track = array('link' => '矩阵|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = '测试|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->build = array('link' => '版本|project|build|project={PROJECT}');
$lang->menu->waterfall->dynamic = array('link' => '动态|project|dynamic|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => '设置|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
@@ -948,6 +950,6 @@ $lang->projectstory->menu = new stdclass();
$lang->stakeholder->menu = $lang->scrum->setMenu;
$lang->nc->menu = $lang->auditplan->menu;
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'projectbuild', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry');
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry');
include (dirname(__FILE__) . '/menuOrder.php');
+6 -3
View File
@@ -2374,7 +2374,7 @@ EOD;
self::initProjectSubmenu();
if($project->model == 'scrum')
{
$lang->menuOrder = $lang->scrum->menuOrder;
$lang->project->menuOrder = $lang->scrum->menuOrder;
/* The scrum project temporarily hides the trace matrix. */
unset($lang->projectstory->menu->track);
@@ -2385,7 +2385,7 @@ EOD;
{
$lang->project->dividerMenu = str_replace(',project,', ',', $lang->project->dividerMenu);
$lang->release->menu = new stdclass();
$lang->menuOrder = $lang->waterfall->menuOrder;
$lang->project->menuOrder = $lang->waterfall->menuOrder;
return self::processMenuVars($lang->menu->waterfall);
}
}
@@ -2469,7 +2469,10 @@ EOD;
foreach($lang->$openApp->menu as $label => $menu)
{
$lang->$openApp->menu->{$label}['link'] = is_array($menu) ? sprintf($menu['link'], $objectID) : sprintf($menu, $objectID);
if(isset($lang->$openApp->menu->{$label}['link']))
{
$lang->$openApp->menu->{$label}['link'] = is_array($menu) ? sprintf($menu['link'], $objectID) : sprintf($menu, $objectID);
}
}
if($openApp == 'program')
+10 -20
View File
@@ -59,7 +59,6 @@ class execution extends control
*/
public function index($locate = 'auto', $executionID = 0)
{
$this->lang->execution->menu = $this->lang->execution->homeMenu;
if($locate == 'yes') $this->locate($this->createLink('execution', 'task'));
$this->commonAction($executionID);
@@ -1170,17 +1169,22 @@ class execution extends control
* Create a execution.
*
* @param string $projectID
* @param string $productID
* @param string $executionID
* @param string $copyExecutionID
* @param int $planID
* @param string $confirm
* @param string $productID
*
* @access public
* @return void
*/
public function create($productID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $projectID = 0)
public function create($projectID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0)
{
if($this->app->openApp == 'project')
{
commonModel::setAppObjectID('project', $projectID);
}
$this->app->loadLang('program');
$this->app->loadLang('stage');
$this->app->loadLang('programplan');
@@ -1260,6 +1264,7 @@ class execution extends control
if(!empty($planID)) break;
}
}
if(!empty($planID))
{
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "productID=&executionID=$executionID&copyExecutionID=&planID=$planID&confirm=no")));
@@ -1270,19 +1275,6 @@ class execution extends control
}
}
$isSprint = true;
if($this->config->systemMode == 'new' and !empty($projectID))
{
$project = $this->project->getById($projectID);
if($project->model == 'scrum')
{
unset($this->lang->execution->endList[62]);
unset($this->lang->execution->endList[93]);
unset($this->lang->execution->endList[186]);
unset($this->lang->execution->endList[365]);
}
}
$executionID = key($this->executions);
$this->execution->setMenu($this->executions, $executionID);
@@ -1307,7 +1299,6 @@ class execution extends control
$this->view->copyExecutionID = $copyExecutionID;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed');
$this->view->isSprint = $isSprint;
$this->display();
}
@@ -2678,14 +2669,13 @@ class execution extends control
* @access public
* @return void
*/
public function all($status = 'all', $projectID = 0, $from = 'execution', $orderBy = 'id_desc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
public function all($status = 'all', $projectID = 0, $orderBy = 'id_desc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
{
$this->lang->execution->menu = $this->lang->execution->homeMenu;
$this->app->loadLang('my');
$this->app->loadLang('product');
$this->app->loadLang('programplan');
$from = $this->app->openApp;
if($from == 'execution') $this->session->set('executionList', $this->app->getURI(true));
if($from == 'project') $this->lang->navGroup->execution = 'project';
+1 -1
View File
@@ -38,7 +38,7 @@ $(function()
var adjustMainCol = function()
{
if(isSprint) $('.main-form .col-main').css('width', Math.max(250, Math.floor(($('#productsBox').outerWidth() - 50)/3) + 10));
$('.main-form .col-main').css('width', Math.max(250, Math.floor(($('#productsBox').outerWidth() - 50)/3) + 10));
};
adjustMainCol();
$(window).on('resize', adjustMainCol);
+3 -3
View File
@@ -39,14 +39,14 @@ function deleteItem(obj)
function setDeptUsers(obj)
{
dept = $(obj).val();//Get dept ID.
link = createLink('project', 'manageMembers', 'projectID=' + projectID + '&team2Import=' + team2Import + '&dept=' + dept);//Create manageMembers link.
dept = $(obj).val(); // Get dept ID.
link = createLink('execution', 'manageMembers', 'executionID=' + executionID + '&team2Import=' + team2Import + '&dept=' + dept); // Create manageMembers link.
location.href=link;
}
function choseTeam2Copy(obj)
{
team = $(obj).val();
link = createLink('project', 'manageMembers', 'projectID=' + projectID + '&team2Import=' + team);
link = createLink('execution', 'manageMembers', 'executionID=' + executionID + '&team2Import=' + team);
location.href=link;
}
+2 -2
View File
@@ -36,12 +36,12 @@
<?php endif;?>
<div class='btn-toolbar pull-left'>
<?php foreach($lang->execution->featureBar['all'] as $key => $label):?>
<?php echo html::a(inlink("all", "status=$key&projectID=$projectID&from=$from&orderBy=$orderBy&productID=$productID"), "<span class='text'>{$label}</span>", '', "class='btn btn-link' id='{$key}Tab'");?>
<?php echo html::a(inlink("all", "status=$key&projectID=$projectID&orderBy=$orderBy&productID=$productID"), "<span class='text'>{$label}</span>", '', "class='btn btn-link' id='{$key}Tab' data-app='$from'");?>
<?php endforeach;?>
</div>
<div class='btn-toolbar pull-right'>
<?php common::printLink('execution', 'export', "status=$status&productID=$productID&orderBy=$orderBy&from=$from", "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export'")?>
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create'), "<i class='icon icon-sm icon-plus'></i> " . ($from == 'execution' ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary'");?>
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-sm icon-plus'></i> " . ($from == 'execution' ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary' data-app='$from'");?>
</div>
</div>
<div id='mainContent' class="main-row fade">
+1 -25
View File
@@ -35,7 +35,6 @@
<?php js::set('holders', $lang->execution->placeholder);?>
<?php js::set('errorSameProducts', $lang->execution->errorSameProducts);?>
<?php js::set('productID', empty($productID) ? 0 : $productID);?>
<?php js::set('isSprint', $isSprint);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
@@ -86,31 +85,9 @@
</tr>
<tr>
<th><?php echo $lang->execution->type;?></th>
<td>
<?php
if($isSprint)
{
echo html::select('lifetime', $lang->execution->lifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'");
}
else
{
echo html::select('attribute', $lang->stage->typeList, '', "class='form-control'");
}
?>
</td>
<td><?php echo html::select('lifetime', $lang->execution->lifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'"); ?></td>
<td class='muted' colspan='2'><div id='lifeTimeTips'><?php echo $lang->execution->typeDesc;?></div></td>
</tr>
<?php if(!$isSprint):?>
<tr>
<th><?php echo $lang->programplan->percent;?></th>
<td>
<div class='input-group'>
<?php echo html::input('percent', '', "class='form-control'");?>
<span class='input-group-addon'>%</span>
</div>
</td>
</tr>
<?php endif;?>
<tr class='hide'>
<th><?php echo $lang->execution->status;?></th>
<td><?php echo html::hidden('status', 'wait');?></td>
@@ -183,7 +160,6 @@
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php if($isSprint) echo html::hidden('lifetime', 'short');?>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
+20 -4
View File
@@ -313,9 +313,10 @@ class product extends control
$this->executeHooks($productID);
$moduleName = $programID ? 'program' : $this->moduleName;
$methodName = $programID ? 'product' : 'browse';
$param = $programID ? "programID=$programID" : "productID=$productID";
$openApp = $this->app->openApp;
$moduleName = $openApp == 'program'? 'program' : $this->moduleName;
$methodName = $openApp == 'program'? 'product' : 'browse';
$param = $openApp == 'program' ? "programID=$programID" : "productID=$productID";
$locate = $this->createLink($moduleName, $methodName, $param);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
}
@@ -812,6 +813,21 @@ class product extends control
$this->display();
}
/**
* Ajax get products.
*
* @param int $executionID
* @access public
* @return void
*/
public function ajaxGetProducts($executionID)
{
$products = array('' => '');
$products += $this->product->getProductPairsByProject($executionID);
die(html::select('product', $products, '', "class='form-control' onchange='loadBranches(this.value)'"));
}
/**
* AJAX: get projects of a product in html select.
*
@@ -825,7 +841,7 @@ class product extends control
{
$projects = array('' => '');
$projects += $this->product->getProjectPairsByProduct($productID, $branch ? "0,$branch" : $branch);
if($this->app->getViewType() == 'json') die(json_encode($peojects));
if($this->app->getViewType() == 'json') die(json_encode($projects));
die(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProductExecutions({$productID})'"));
}
+1 -1
View File
@@ -32,7 +32,7 @@ class productModel extends model
$product = $this->getByID($productID);
if($product)
{
$this->lang->modulePageNav = $this->getModuleNav($products, '', $product, $extra, $branch, $module, $moduleType);
$this->getModuleNav($products, '', $product, $extra, $branch, $module, $moduleType);
}
foreach($this->lang->product->menu as $key => $menu)
+2 -2
View File
@@ -22,9 +22,9 @@ $(function()
$('#createExecutionButton').on('click', function()
{
var PRJID = $('#project').val();
var projectID = $('#project').val();
var planID = $('#planID').val();
parent.location.href = createLink('execution', 'create', 'productID=' + productID + '&executionID=&copyExecutionID=&planID=' + planID + '&confirm=&projectID=' + PRJID, '', '');
parent.location.href = createLink('execution', 'create', 'projectID=' + projectID + '&executionID=&copyExecutionID=&planID=' + planID + '&confirm=&productID=' + productID);
});
});
$(document).on('click', 'td.content .more', function(e)
+1 -1
View File
@@ -386,7 +386,7 @@ class program extends control
* @access public
* @return void
*/
public function project($programID = 0, $browseType = 'doing', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
public function project($programID = 0, $browseType = 'all', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$programID = $this->program->saveState($programID, $this->program->getPairs());
if(!$programID) $this->locate($this->createLink('program', 'browse'));
+1
View File
@@ -51,6 +51,7 @@ $lang->program->endGreaterParent = "Parent end date: %s, end date should
$lang->program->beginGreateChild = "Child earliest begin: %s, parent begin date < = child earliest begin date.";
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
$lang->program->confirmDelete = "Do you want to delete it?";
$lang->program->stakeholderTypeList['inside'] = 'Inside';
$lang->program->stakeholderTypeList['outside'] = 'Outside';
+1
View File
@@ -51,6 +51,7 @@ $lang->program->endGreaterParent = "父项目集的完成日期:%s,
$lang->program->beginGreateChild = "子项目集的最小开始日期:%s,父项目集的开始日期不能大于子项目集的最小开始日期";
$lang->program->endLetterChild = "子项目的最大完成日期:%s,父项目的完成日期不能小于子项目的最大完成日期";
$lang->program->closeErrorMessage = '存在子项目集或项目为未关闭状态';
$lang->program->confirmDelete = "您确定要删除吗?";
$lang->program->stakeholderTypeList['inside'] = '内部';
$lang->program->stakeholderTypeList['outside'] = '外部';
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* The html product list file of pgmproduct method of program module of ZenTaoPMS.
* The html product list file of product method of program module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
+4 -4
View File
@@ -45,7 +45,7 @@ js::set('browseType', $browseType);
<?php if(isset($this->config->maxVersion)):?>
<?php common::printLink('program', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info btn-wide " data-toggle="modal" data-target="#guideDialog"');?>
<?php elseif($this->config->systemMode == 'new'):?>
<?php common::printLink('project', 'create', "mode=scrum&programID=$programID&from=program", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info btn-wide"');?>
<?php common::printLink('project', 'create', "mode=scrum&programID=$programID", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info btn-wide"');?>
<?php endif;?>
</p>
</div>
@@ -56,13 +56,13 @@ js::set('browseType', $browseType);
$setting = $this->datatable->getSetting('program');
?>
<table class='table has-sort-head'>
<?php $canBatchEdit = common::hasPriv('program', 'PRJBatchEdit');?>
<?php $canBatchEdit = common::hasPriv('project', 'batchEdit');?>
<thead>
<tr>
<?php
foreach($setting as $value)
{
if($value->id == 'PRJStatus' and $browseType !== 'all') $value->show = false;
if($value->id == 'projectStatus' and $browseType !== 'all') $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
?>
@@ -85,7 +85,7 @@ js::set('browseType', $browseType);
<?php
if($canBatchEdit)
{
$actionLink = $this->createLink('program', 'PRJBatchEdit', "from=pgmproject&programID=$programID");
$actionLink = $this->createLink('project', 'batchEdit', "from=pgmproject&programID=$programID");
$misc = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}
+68 -12
View File
@@ -662,15 +662,75 @@ class project extends control
/**
* Execution list.
*
* @param int $projectID
* @access public
* @return void
*/
public function execution()
public function execution($projectID = 0)
{
$PRJ = $this->session->PRJ;
if(!$PRJ) $PRJ = current(explode(',', $this->app->user->view->projects));
$this->locate($this->createLink('execution', 'all', "status=all&projectID=$projectID", '', false));
}
$this->locate($this->createLink('execution', 'all', "status=all&executionID=0&from=project", '', false, $PRJ));
/**
* Browse builds of a project.
*
* @param string $type all|product|bysearch
* @param int $param
* @access public
* @return void
*/
public function build($projectID = 0, $type = 'all', $param = 0)
{
/* Load module and get project. */
$this->loadModel('build');
$project = $this->project->getByID($projectID);
/* Get products' list. */
$products = $this->project->getProducts($projectID, false);
$products = array('' => '') + $products;
/* Build the search form. */
$type = strtolower($type);
$queryID = ($type == 'bysearch') ? (int)$param : 0;
$actionURL = $this->createLink('project', 'build', "projectID=$projectID&type=bysearch&queryID=myQueryID");
$executions = $this->execution->getByProject($projectID, 'all', '', true);
$this->config->build->search['fields']['execution'] = $this->project->lang->executionCommon;
$this->config->build->search['params']['execution'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $executions);
$this->project->buildProjectBuildSearchForm($products, $queryID, $actionURL, 'project');
if($type == 'bysearch')
{
$builds = $this->build->getProjectBuildsBySearch((int)$projectID, (int)$param);
}
else
{
$builds = $this->build->getProjectBuilds((int)$projectID, $type, $param);
}
/* Set project builds. */
$projectBuilds = array();
if(!empty($builds))
{
foreach($builds as $build) $projectBuilds[$build->product][] = $build;
}
/* Header and position. */
$this->view->title = $project->name . $this->lang->colon . $this->lang->execution->build;
$this->view->position[] = $this->lang->execution->build;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->buildsTotal = count($builds);
$this->view->projectBuilds = $projectBuilds;
$this->view->product = $type == 'product' ? $param : 'all';
$this->view->projectID = $projectID;
$this->view->project = $project;
$this->view->products = $products;
$this->view->executions = $executions;
$this->view->type = $type;
$this->display();
}
/**
@@ -1307,25 +1367,21 @@ class project extends control
* Adjust the navigation.
*
* @param string $from
* @param int $projectID
* @param int $objectID projectID|programID
* @access public
* @return void
*/
public function adjustNavigation($from = '', $projectID = 0)
public function adjustNavigation($from = '', $objectID = 0)
{
if($from == 'project')
{
$this->lang->navGroup->project = 'project';
$this->lang->project->menu = $this->lang->scrum->setMenu;
$moduleIndex = array_search('project', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
}
if($from == 'pgmproject')
else if($from == 'pgmproject')
{
$this->app->rawMethod = 'pgmproject';
$this->lang->project->switcherMenu = $this->project->getPGMSwitcher($projectID, true);
$this->project->setPGMViewMenu($projectID);
$this->lang->program->switcherMenu = $this->loadModel('program')->getSwitcher($objectID, true);
}
}
}
+25
View File
@@ -0,0 +1,25 @@
$(function()
{
$('#createBuild').click(function()
{
if(executions.length == 0)
{
alert(createExecution);
location.href = createLink('execution', 'create', 'productID=&executionID=&copyExecutionID=&planID=&confirm=&projectID=' + projectID);
return false;
}
});
});
/**
* Change product.
*
* @param int $productID
* @access public
* @return void
*/
function changeProduct(productID)
{
link = createLink('project', 'build', 'type=product&param=' + productID);
location.href = link;
}
+1
View File
@@ -101,6 +101,7 @@ $lang->project->changeProgramTip = 'After modifying the project set, the p
$lang->project->linkedProjectsTip = 'Linked projects are as follows';
$lang->project->multiLinkedProductsTip = 'The following products linked to this project are also linked to other projects, please unlink before proceeding.';
$lang->project->linkStoryByPlanTips = "This action will associate all {$lang->SRCommon} under the selected plan to this project";
$lang->project->createExecution = "There is no {$lang->executionCommon} under this project, please create {$lang->executionCommon} first";
$lang->project->tenThousand = '';
+1
View File
@@ -101,6 +101,7 @@ $lang->project->changeProgramTip = 'After modifying the project set, the p
$lang->project->linkedProjectsTip = 'Linked projects are as follows';
$lang->project->multiLinkedProductsTip = 'The following products linked to this project are also linked to other projects, please unlink before proceeding.';
$lang->project->linkStoryByPlanTips = "This action will associate all {$lang->SRCommon} under the selected plan to this project";
$lang->project->createExecution = "There is no {$lang->executionCommon} under this project, please create {$lang->executionCommon} first";
$lang->project->tenThousand = '';
+1
View File
@@ -101,6 +101,7 @@ $lang->project->changeProgramTip = 'After modifying the project set, the p
$lang->project->linkedProjectsTip = 'Linked projects are as follows';
$lang->project->multiLinkedProductsTip = 'The following products linked to this project are also linked to other projects, please unlink before proceeding.';
$lang->project->linkStoryByPlanTips = "This action will associate all {$lang->SRCommon} under the selected plan to this project";
$lang->project->createExecution = "There is no {$lang->executionCommon} under this project, please create {$lang->executionCommon} first";
$lang->project->tenThousand = '';
+1
View File
@@ -101,6 +101,7 @@ $lang->project->changeProgramTip = 'After modifying the project set, the p
$lang->project->linkedProjectsTip = 'Linked projects are as follows';
$lang->project->multiLinkedProductsTip = 'The following products linked to this project are also linked to other projects, please unlink before proceeding.';
$lang->project->linkStoryByPlanTips = "This action will associate all {$lang->SRCommon} under the selected plan to this project";
$lang->project->createExecution = "There is no {$lang->executionCommon} under this project, please create {$lang->executionCommon} first";
$lang->project->tenThousand = '';
+1
View File
@@ -102,6 +102,7 @@ $lang->project->changeProgramTip = '修改项目集后,该项目关联
$lang->project->linkedProjectsTip = '关联的项目如下';
$lang->project->multiLinkedProductsTip = '该项目关联的如下产品还关联了其他项目,请取消关联后再操作';
$lang->project->linkStoryByPlanTips = "此操作会将所选计划下面的{$lang->SRCommon}全部关联到此项目中";
$lang->project->createExecution = "该项目下没有{$lang->executionCommon},请先创建{$lang->executionCommon}";
$lang->project->tenThousand = '万';
@@ -11,8 +11,10 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('confirmDelete', $lang->build->confirmDelete)?>
<?php js::set('executions', $executions)?>
<?php js::set('projectID', $projectID)?>
<?php js::set('createExecution', $lang->project->createExecution)?>
<?php js::set('confirmDelete', $lang->build->confirmDelete)?>
<div id="mainMenu" class="clearfix table-row">
<div class="btn-toolbar pull-left">
<?php
@@ -23,22 +25,20 @@
$active = 'btn-active-text';
$label .= " <span class='label label-light label-badge'>{$buildsTotal}</span>";
}
echo html::a(inlink('browse', "projectID={$projectID}&type=all"), $label, '', "class='btn btn-link $active' id='all'")
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>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::canModify('project', $project)) common::printLink('build', 'create', "executionID=&productID=&projectID=$projectID", "<i class='icon icon-plus'></i> " . $lang->build->create, '', "class='btn btn-primary' id='createBuild'");?>
</div>
</div>
<div id="mainContent">
<div class="cell <?php if($type == 'bysearch') echo 'show';?>" id="queryBox" data-module='projectBuild'></div>
<?php if(empty($projectBuilds)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->build->noBuild;?></span>
<?php if(common::canModify('project', $project) and common::hasPriv('build', 'create')):?>
<?php echo html::a('#projects', "<i class='icon icon-plus'></i> " . $lang->build->create, '', "data-toggle='modal' class='btn btn-info'");?>
<?php endif;?>
</p>
<p><span class="text-muted"><?php echo $lang->build->noBuild;?></span></p>
</div>
<?php else:?>
<div class='main-table' data-ride="table" data-checkable="false">
@@ -66,7 +66,7 @@
<?php if($build->branchName) echo "<span class='label label-outline label-badge'>{$build->branchName}</span>"?>
<?php echo html::a($this->createLink('build', 'view', "build=$build->id"), $build->name);?>
</td>
<td class="c-name text-left" title='<?php echo $build->projectName;?>'><?php echo $build->projectName;?></td>
<td class="c-name text-left" title='<?php echo $build->executionName;?>'><?php echo $build->executionName;?></td>
<td class="c-url" title="<?php echo $build->scmPath?>"><?php echo strpos($build->scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath;?></td>
<td class="c-url" title="<?php echo $build->filePath?>"><?php echo strpos($build->filePath, 'http') === 0 ? html::a($build->filePath) : $build->filePath;?></td>
<td class="c-date"><?php echo $build->date?></td>
@@ -96,20 +96,4 @@
</div>
<?php endif;?>
</div>
<div class="modal fade" id="projects">
<div class="modal-dialog mw-500px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><?php echo $lang->projectbuild->project;?></h4>
</div>
<div class="modal-body">
<div class='input-group'>
<?php echo html::select('executions', $executions, '', "class='form-control chosen' id=project");?>
<span class='input-group-btn'><?php echo html::commonButton($lang->build->create, "id='createBuildButton'", 'btn btn-primary');?></span>
</div>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-20
View File
@@ -1,20 +0,0 @@
$(function()
{
$('#createBuildButton').on('click', function()
{
var projectID = $('#project').val();
parent.location.href = createLink('build', 'create', 'projectID=' + projectID);
})
});
/**
* Change product.
*
* @param int $productID
* @access public
* @return void
*/
function changeProduct(productID)
{
link = createLink('projectbuild', 'browse', 'projectID=' + projectID + '&type=product&param=' + productID);
location.href = link;
}
-5
View File
@@ -1,5 +0,0 @@
<?php
$lang->projectbuild->common = 'Project Build';
$lang->projectbuild->browse = 'Build List';
$lang->projectbuild->project = "Please select {$lang->executionCommon}";
-5
View File
@@ -1,5 +0,0 @@
<?php
$lang->projectbuild->common = 'Project Build';
$lang->projectbuild->browse = 'Build List';
$lang->projectbuild->project = "Please select {$lang->executionCommon}";
-5
View File
@@ -1,5 +0,0 @@
<?php
$lang->projectbuild->common = 'Project Build';
$lang->projectbuild->browse = 'Build List';
$lang->projectbuild->project = "Please select {$lang->executionCommon}";
-5
View File
@@ -1,5 +0,0 @@
<?php
$lang->projectbuild->common = 'Project Build';
$lang->projectbuild->browse = 'Build List';
$lang->projectbuild->project = "Please select {$lang->executionCommon}";
-5
View File
@@ -1,5 +0,0 @@
<?php
$lang->projectbuild->common = '项目版本';
$lang->projectbuild->browse = '版本列表';
$lang->projectbuild->project = "请选择所属{$lang->executionCommon}";
-5
View File
@@ -1,5 +0,0 @@
<?php
$lang->projectbuild->common = '項目版本';
$lang->projectbuild->browse = '版本列表';
$lang->projectbuild->project = "請選擇所屬{$lang->executionCommon}";
+14 -9
View File
@@ -59,23 +59,28 @@ class projectrelease extends control
* Browse releases.
*
* @param int $projectID
* @param int $executionID
* @param string $type
* @access public
* @return void
*/
public function browse($projectID, $type = 'all')
public function browse($projectID = 0, $executionID = 0, $type = 'all')
{
$this->session->set('releaseList', $this->app->getURI(true));
$execution = $this->loadModel('execution')->getById($this->session->PRJ);
commonModel::setAppObjectID('project', $projectID);
$this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse;
$this->view->position[] = $this->lang->release->browse;
$this->view->execution = $execution;
$this->view->products = $this->loadModel('product')->getProducts($this->session->PRJ);
$this->view->releases = $this->projectrelease->getList($projectID, $type);
$this->view->projectID = $projectID;
$this->view->type = $type;
if($projectID) commonModel::setAppObjectID('project', $projectID);
if($executionID) commonModel::setAppObjectID('execution', $executionID);
$this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse;
$this->view->position[] = $this->lang->release->browse;
$this->view->execution = $execution;
$this->view->products = $this->loadModel('product')->getProducts($this->session->PRJ);
$this->view->releases = $this->projectrelease->getList($projectID, $type);
$this->view->projectID = $projectID;
$this->view->executionID = $executionID;
$this->view->type = $type;
$this->view->from = $this->app->openApp;
$this->display();
}
+5 -5
View File
@@ -16,9 +16,9 @@
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php
echo html::a(inlink('browse', "projectID=$projectID&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' : '') . "'");
echo html::a(inlink('browse', "projectID=$projectID&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' : '') . "'");
echo html::a(inlink('browse', "projectID=$projectID&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' : '') . "'");
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'");
?>
</div>
<div class="btn-toolbar pull-right">
@@ -33,7 +33,7 @@
<p>
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
<?php if(common::canModify('execution', $execution) and common::hasPriv('projectrelease', 'create')):?>
<?php echo html::a($this->createLink('projectrelease', 'create'), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('projectrelease', 'create', "projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
@@ -63,7 +63,7 @@
<td>
<?php
$flagIcon = $release->marker ? "<icon class='icon icon-flag red' title='{$lang->release->marker}'></icon> " : '';
echo html::a(inlink('view', "release=$release->id"), $release->name) . $flagIcon;
echo html::a(inlink('view', "release=$release->id"), $release->name, '', "data-app='$from'") . $flagIcon;
?>
</td>
<td title='<?php echo $release->productName?>'><?php echo $release->productName?></td>
+9 -6
View File
@@ -17,19 +17,22 @@ class qa extends control
* @access public
* @return void
*/
public function index($locate = 'auto', $productID = 0)
public function index($locate = 'auto', $productID = 0, $projectID = 0)
{
$this->products = $this->loadModel('product')->getProductPairsByProject($this->projectID, 'noclosed');
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=qa&moduleGroup=' . $this->lang->navGroup->qa . '&activeMenu=index')));
if($this->app->openApp == 'qa') $this->lang->noMenuModule[] = 'qa';
$products = $this->loadModel('product')->getProductPairsByProject($projectID, 'noclosed');
if(empty($products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=qa&moduleGroup=' . $this->lang->navGroup->qa . '&activeMenu=index')));
if($locate == 'yes') $this->locate($this->createLink('bug', 'browse'));
$productID = $this->product->saveState($productID, $this->products);
$productID = $this->product->saveState($productID, $products);
$branch = (int)$this->cookie->preBranch;
$this->qa->setMenu($this->products, $productID, $branch);
$this->qa->setMenu($products, $productID, $branch);
commonModel::setAppObjectID('qa', $productID);
$this->view->title = $this->lang->qa->index;
$this->view->position[] = $this->lang->qa->index;
$this->view->products = $this->products;
$this->view->products = $products;
$this->display();
}
}
-9
View File
@@ -39,15 +39,6 @@ class qaModel extends model
$productIndex .= $selectHtml;
}
$this->lang->modulePageNav = $productIndex;
foreach($this->lang->qa->menu as $key => $menu)
{
if($this->config->global->flow == 'full' && $this->lang->navGroup->qa != 'qa') $this->setSubMenu('qa', $key, $productID);
$replace = $productID;
if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
common::setMenuVars($this->lang->qa->menu, $key, $replace);
}
if($this->lang->navGroup->qa == 'qa') $this->lang->qa->switcherMenu = $this->product->getSwitcher($productID, $extra, $branch);
}
+2
View File
@@ -48,6 +48,8 @@ class story extends control
*/
public function create($productID = 0, $branch = 0, $moduleID = 0, $storyID = 0, $executionID = 0, $bugID = 0, $planID = 0, $todoID = 0, $extra = '', $type = 'story')
{
commonModel::setAppObjectID('product', $productID);
$this->story->replaceURLang($type);
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
+3 -2
View File
@@ -89,7 +89,8 @@
<div class="input-group-addon" style="min-width: 77px;"><?php echo $lang->story->source;?></div>
<?php echo html::select('source', $lang->story->sourceList, $source, "class='form-control chosen'");?>
<span class='input-group-addon'><?php echo $lang->story->sourceNote;?></span>
<?php echo html::input('sourceNote', $sourceNote, "class='form-control' style='width:140px;'");?>
<?php $sourceNoteWidth = isonlybody() ? "style='width: 70px;'" : "style='width: 140px;'"?>
<?php echo html::input('sourceNote', $sourceNote, "class='form-control' $sourceNoteWidth");?>
</div>
</div>
</td>
@@ -120,7 +121,7 @@
<td colspan="2" class='sourceTd'>
<div class="input-group">
<div class="input-group">
<div class="input-group-addon"><?php echo $lang->story->source;?></div>
<div class="input-group-addon" style="min-width: 77px;"><?php echo $lang->story->source;?></div>
<?php echo html::select('source', $lang->story->sourceList, $source, "class='form-control chosen'");?>
<span class='input-group-addon'><?php echo $lang->story->sourceNote;?></span>
<?php echo html::input('sourceNote', $sourceNote, "class='form-control' style='width:140px;'");?>
+10 -4
View File
@@ -39,15 +39,21 @@ class testtask extends control
/* Set testtask menu group. */
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
if(!$this->projectID)
if($this->app->openApp == 'qa')
{
$this->app->loadConfig('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
//$this->lang->noMenuModule[] = $this->app->rawModule;
}
else
elseif($this->app->openApp == 'project')
{
$this->lang->testtask->menu = $this->lang->projectQa->menu;
$this->lang->testtask->subMenu = $this->lang->projectQa->subMenu;
$this->lang->testcase->menu = $this->lang->projectQa->menu;
$this->lang->testcase->subMenu = $this->lang->projectQa->subMenu;
}
elseif($this->app->openApp == 'execution')
{
$this->lang->testcase->menu = $this->lang->execution->qaMenu;
$this->lang->testcase->subMenu = '';
}
$this->loadModel('product');
+4 -2
View File
@@ -983,11 +983,13 @@ class testtaskModel extends model
$this->dao->replace(TABLE_TESTRUN)->data($row)->exec();
/* When the cases linked the testtask, the cases link to the project. */
if($this->lang->navGroup->testtask != 'qa')
if($this->app->openApp != 'qa')
{
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($projectID)->orderBy('order_desc')->limit(1)->fetch('order');
$project = $this->app->openApp == 'project' ? $this->session->PRJ : $this->session->execution;
$data = new stdclass();
$data->project = $this->session->PRJ;
$data->project = $project;
$data->product = $this->session->product;
$data->case = $caseID;
$data->version = 1;
+15 -7
View File
@@ -38,6 +38,14 @@ class todoModel extends model
->remove(implode(',', $this->config->todo->moduleList) . ',uid')
->get();
if($todo->type != 'custom')
{
$type = $todo->type;
$object = $this->loadModel($type)->getByID($this->post->$type);
if(isset($object->name)) $todo->name = $object->name;
if(isset($object->title)) $todo->name = $object->title;
}
if($todo->end < $todo->begin)
{
dao::$errors[] = sprintf($this->lang->error->gt, $this->lang->todo->end, $this->lang->todo->begin);
@@ -499,8 +507,8 @@ class todoModel extends model
* @access public
* @return object
*/
public function getByList($todoIDList = 0)
{
public function getByList($todoIDList = 0)
{
return $this->dao->select('*')->from(TABLE_TODO)
->beginIF($todoIDList)->where('id')->in($todoIDList)->fi()
->fetchAll('id');
@@ -698,9 +706,9 @@ class todoModel extends model
}
/**
* Assign todo.
*
* @param int $todoID
* Assign todo.
*
* @param int $todoID
* @access public
* @return bool
*/
@@ -722,8 +730,8 @@ class todoModel extends model
/**
* Get todo count.
*
* @param string $account
*
* @param string $account
* @access public
* @return int
*/