Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -59,6 +59,7 @@ 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);
|
||||
@@ -265,9 +266,7 @@ class execution extends control
|
||||
*/
|
||||
public function grouptask($executionID = 0, $groupBy = 'story', $filter = '')
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
$this->showModuleMenu();
|
||||
$execution = $this->commonAction($executionID);
|
||||
$executionID = $execution->id;
|
||||
|
||||
@@ -819,6 +818,21 @@ class execution extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Exectuion qa dashboard.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function qa($executionID = 0)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
$this->commonAction($executionID);
|
||||
$this->view->title = $this->lang->execution->qa;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse bugs of a execution.
|
||||
*
|
||||
@@ -835,6 +849,8 @@ class execution extends control
|
||||
*/
|
||||
public function bug($executionID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
/* Load these two models. */
|
||||
$this->loadModel('bug');
|
||||
$this->loadModel('user');
|
||||
@@ -893,6 +909,33 @@ class execution extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execution case list.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function testcase($executionID = 0, $type = 'all', $param = 0, $productID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->loadModel('testcase');
|
||||
$this->showModuleMenu();
|
||||
$this->commonAction($executionID);
|
||||
|
||||
$products = $this->execution->getProducts($executionID, false);
|
||||
if(empty($products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testcase")));
|
||||
|
||||
$productID = $this->loadModel('product')->saveState($productID, $products);
|
||||
$this->product->setMenu($products, $productID);
|
||||
|
||||
$this->view->title = $this->lang->execution->testcase;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->execution = $this->execution->getByID($executionID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse builds of a execution.
|
||||
*
|
||||
@@ -967,6 +1010,8 @@ class execution extends control
|
||||
*/
|
||||
public function testtask($executionID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
$this->loadModel('testtask');
|
||||
/* Save session. */
|
||||
$this->session->set('testtaskList', $this->app->getURI(true));
|
||||
@@ -1136,8 +1181,8 @@ class execution extends control
|
||||
die(js::confirm($this->lang->execution->importPlanStory, inlink('create', "productID=&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "productID=&executionID=$executionID"), 'parent', 'parent'));
|
||||
}
|
||||
}
|
||||
$this->view->title = $this->lang->execution->tips;
|
||||
$this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID");
|
||||
$this->view->title = $this->lang->execution->tips;
|
||||
$this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID");
|
||||
$this->view->executionID = $executionID;
|
||||
$this->display();
|
||||
exit;
|
||||
@@ -1180,7 +1225,7 @@ class execution extends control
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$executionID = $copyExecutionID == '' ? $this->execution->create() : $this->execution->create($copyExecutionID);
|
||||
$executionID = $this->execution->create($copyExecutionID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->execution->updateProducts($executionID);
|
||||
@@ -1226,7 +1271,7 @@ class execution extends control
|
||||
|
||||
$this->view->title = $this->lang->execution->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->executions = array('' => '') + $this->executions;
|
||||
$this->view->executions = array('' => '') + $this->execution->getList();
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->allProducts = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->view->acl = $acl;
|
||||
@@ -1234,6 +1279,7 @@ class execution extends control
|
||||
$this->view->name = $name;
|
||||
$this->view->code = $code;
|
||||
$this->view->team = $team;
|
||||
$this->view->allProjects = array('' => '') + $this->project->getPairsByModel();
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->products = $products;
|
||||
@@ -1259,6 +1305,8 @@ class execution extends control
|
||||
*/
|
||||
public function edit($executionID, $action = 'edit', $extra = '')
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
/* Load language files and get browseExecutionLink. */
|
||||
$this->app->loadLang('program');
|
||||
$this->app->loadLang('stage');
|
||||
@@ -1396,6 +1444,8 @@ class execution extends control
|
||||
*/
|
||||
public function batchEdit($executionID = 0)
|
||||
{
|
||||
$this->lang->execution->menu = $this->lang->execution->homeMenu;
|
||||
|
||||
$this->app->loadLang('stage');
|
||||
|
||||
if($this->post->names)
|
||||
@@ -1651,8 +1701,7 @@ class execution extends control
|
||||
*/
|
||||
public function view($executionID)
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->showModuleMenu();
|
||||
|
||||
$execution = $this->execution->getById($executionID, true);
|
||||
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
@@ -1767,8 +1816,7 @@ class execution extends control
|
||||
*/
|
||||
public function tree($executionID, $type = 'task')
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->showModuleMenu();
|
||||
|
||||
$this->execution->setMenu($this->executions, $executionID);
|
||||
$execution = $this->loadModel('execution')->getById($executionID);
|
||||
@@ -2087,6 +2135,8 @@ class execution extends control
|
||||
*/
|
||||
public function manageMembers($executionID = 0, $team2Import = 0, $dept = 0)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->execution->manageMembers($executionID);
|
||||
@@ -2526,7 +2576,7 @@ class execution extends control
|
||||
$executionsPinYin = common::convert2Pinyin($executionsName);
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
$link = helper::createLink('execution', 'task', 'executionID=' . $execution->id, '', false, $execution->execution);
|
||||
$link = helper::createLink('execution', 'task', 'executionID=' . $execution->id, '', false, $execution->project);
|
||||
$execution->code = empty($execution->code) ? $execution->name : $execution->code;
|
||||
$dataKey = 'date-key="' . zget($executionsPinYin, $execution->name, $execution->name) . '"';
|
||||
$class = "class='search-list-item $color' title='$execution->name' $dataKey";
|
||||
@@ -2596,6 +2646,8 @@ class execution extends control
|
||||
*/
|
||||
public function all($status = 'all', $projectID = 0, $from = 'execution', $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');
|
||||
@@ -2661,6 +2713,8 @@ class execution extends control
|
||||
*/
|
||||
public function addWhitelist($executionID = 0, $deptID = 0)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
/* use first execution if executionID does not exist. */
|
||||
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
|
||||
|
||||
@@ -2678,9 +2732,9 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unbindWhielist($id = 0, $confirm = 'no')
|
||||
public function unbindWhitelist($id = 0, $confirm = 'no')
|
||||
{
|
||||
echo $this->fetch('personnel', 'unbindWhielist', "id=$id&confirm=$confirm");
|
||||
echo $this->fetch('personnel', 'unbindWhitelist', "id=$id&confirm=$confirm");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2934,4 +2988,16 @@ class execution extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show module menu for some module.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function showModuleMenu()
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user