Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -59,7 +59,7 @@ class buildsEntry extends entry
|
||||
$control = $this->loadController('build', 'create');
|
||||
$this->requireFields('execution,product,name,builder,date');
|
||||
|
||||
$control->create(0,0,$projectID);
|
||||
$control->create(0, 0, $projectID);
|
||||
|
||||
$data = $this->getData();
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* The productplanlinkbug entry point of ZenTaoPMS.
|
||||
* The productplanlinkbugs entry point of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
@@ -9,7 +9,7 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class productplanLinkBugEntry extends entry
|
||||
class productplanLinkBugsEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* The productplanlinkstory entry point of ZenTaoPMS.
|
||||
* The productplanlinkstories entry point of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
@@ -9,7 +9,7 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class productplanLinkStoryEntry extends entry
|
||||
class productplanLinkStoriesEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* The productplanunlinkbug entry point of ZenTaoPMS.
|
||||
* The productplanunlinkbugs entry point of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
@@ -9,7 +9,7 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class productplanUnlinkBugEntry extends entry
|
||||
class productplanUnlinkBugsEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* The productplanunlinkstory entry point of ZenTaoPMS.
|
||||
* The productplanunlinkstories entry point of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
@@ -9,7 +9,7 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class productplanUnlinkStoryEntry extends entry
|
||||
class productplanUnlinkStoriesEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
+25
-3
@@ -14,7 +14,7 @@ class userEntry extends Entry
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $userID
|
||||
* @param int|string $userID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -23,6 +23,13 @@ class userEntry extends Entry
|
||||
/* Get my info defaultly. */
|
||||
if(!$userID) return $this->getInfo($this->param('fields', ''));
|
||||
|
||||
if(!is_numeric($userID))
|
||||
{
|
||||
$user = $this->loadModel('user')->getById($userID, 'account');
|
||||
if(!$user) return $this->send404();
|
||||
$userID = $user->id;
|
||||
}
|
||||
|
||||
/* Get user by id. */
|
||||
$control = $this->loadController('user', 'profile');
|
||||
$control->profile($userID);
|
||||
@@ -349,17 +356,25 @@ class userEntry extends Entry
|
||||
/**
|
||||
* PUT method.
|
||||
*
|
||||
* @param int $userID
|
||||
* @param int|string $userID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function put($userID)
|
||||
{
|
||||
if(!is_numeric($userID))
|
||||
{
|
||||
$user = $this->loadModel('user')->getById($userID, 'account');
|
||||
if(!$user) return $this->send404();
|
||||
$userID = $user->id;
|
||||
}
|
||||
|
||||
$oldUser = $this->loadModel('user')->getByID($userID, 'id');
|
||||
|
||||
/* Set $_POST variables. */
|
||||
$fields = 'dept,realname,email,commiter,gender';
|
||||
$this->batchSetPost($fields, $oldUser);
|
||||
$this->setPost('account', $oldUser->account);
|
||||
|
||||
if($this->request('gender') and !in_array($this->request('gender'), array('f', 'm'))) return $this->sendError(400, "The value of gendar must be 'f' or 'm'");
|
||||
|
||||
@@ -380,12 +395,19 @@ class userEntry extends Entry
|
||||
/**
|
||||
* DELETE method.
|
||||
*
|
||||
* @param int $userID
|
||||
* @param int|string $userID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($userID)
|
||||
{
|
||||
if(!is_numeric($userID))
|
||||
{
|
||||
$user = $this->loadModel('user')->getById($userID, 'account');
|
||||
if(!$user) return $this->send404();
|
||||
$userID = $user->id;
|
||||
}
|
||||
|
||||
$this->setPost('verifyPassword', md5($this->app->user->password . $this->app->session->rand));
|
||||
|
||||
$control = $this->loadController('user', 'delete');
|
||||
|
||||
+7
-7
@@ -24,13 +24,13 @@ $routes['/products/:id'] = 'product';
|
||||
$routes['/productlines'] = 'productLines';
|
||||
$routes['/productlines/:id'] = 'productLine';
|
||||
|
||||
$routes['/productplans'] = 'productPlans';
|
||||
$routes['/products/:id/plans'] = 'productPlans';
|
||||
$routes['/productplans/:id'] = 'productPlan';
|
||||
$routes['/productplans/:id/linkstory'] = 'productPlanLinkStory';
|
||||
$routes['/productplans/:id/unlinkstory'] = 'productPlanUnlinkStory';
|
||||
$routes['/productplans/:id/linkbug'] = 'productPlanLinkBug';
|
||||
$routes['/productplans/:id/unlinkbug'] = 'productPlanUnlinkBug';
|
||||
$routes['/productplans'] = 'productPlans';
|
||||
$routes['/products/:id/plans'] = 'productPlans';
|
||||
$routes['/productplans/:id'] = 'productPlan';
|
||||
$routes['/productplans/:id/linkstories'] = 'productPlanLinkStories';
|
||||
$routes['/productplans/:id/unlinkstories'] = 'productPlanUnlinkStories';
|
||||
$routes['/productplans/:id/linkbugs'] = 'productPlanLinkBugs';
|
||||
$routes['/productplans/:id/unlinkbugs'] = 'productPlanUnlinkBugs';
|
||||
|
||||
$routes['/releases'] = 'releases';
|
||||
$routes['/products/:id/releases'] = 'releases';
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
$moduleTitle .= $module->name;
|
||||
if(!common::printLink('bug', 'browse', "productID=$bug->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if(!common::printLink('bug', 'browse', "productID=$bug->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name, '', "data-app='qa'")) echo $module->name;
|
||||
if(isset($modulePath[$key + 1]))
|
||||
{
|
||||
$moduleTitle .= '/';
|
||||
|
||||
@@ -73,7 +73,7 @@ class executionModel extends model
|
||||
/* Unset story, bug, build and testtask if type is ops. */
|
||||
$execution = $this->getByID($executionID);
|
||||
|
||||
if($execution and $execution->type == 'stage')
|
||||
if($execution and $execution->type == 'stage' and $this->config->systemMode == 'new')
|
||||
{
|
||||
global $lang;
|
||||
$this->app->loadLang('project');
|
||||
|
||||
@@ -161,6 +161,7 @@ class productModel extends model
|
||||
|
||||
if($this->cookie->preProductID != $this->session->product)
|
||||
{
|
||||
$this->cookie->set('preBranch', 0);
|
||||
setcookie('preBranch', 0, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
}
|
||||
return $this->session->product;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
$productID = $productID == 0 ? key($this->product->getProductPairsByProject($project->id)) : $productID;
|
||||
$buildName = $build ? " <span class='label label-danger'>Build:{$build->name}</span>" : '';
|
||||
echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&orderBy=status,id_desc&build=$buildID&type=all"), "<span class='text'>{$lang->bug->allBugs}</span>" . ($type == 'all' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&orderBy=status,id_desc&build=$buildID&type=unresolved"), "<span class='text'>{$lang->bug->unResolved}</span>" . ($type == 'unresolved' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'");
|
||||
|
||||
+4
-1
@@ -32,7 +32,10 @@ class qaModel extends model
|
||||
$branch = ($this->cookie->preBranch !== '' and $branch === '') ? $this->cookie->preBranch : $branch;
|
||||
setcookie('preBranch', $branch, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
|
||||
if(!in_array($this->app->rawModule, $this->config->qa->noDropMenuModule)) $this->lang->switcherMenu = $this->loadModel('product')->getSwitcher($productID, $extra, $branch);
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
if($product->type != 'normal') $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]);
|
||||
|
||||
if(!in_array($this->app->rawModule, $this->config->qa->noDropMenuModule)) $this->lang->switcherMenu = $this->product->getSwitcher($productID, $extra, $branch);
|
||||
if($this->app->rawModule == 'product' and $this->app->rawMethod == 'showerrornone') $this->lang->switcherMenu = '';
|
||||
common::setMenuVars('qa', $productID);
|
||||
}
|
||||
|
||||
@@ -1839,7 +1839,8 @@ class testcase extends control
|
||||
|
||||
$caseLang = $this->lang->testcase;
|
||||
$caseConfig = $this->config->testcase;
|
||||
$modules = $this->loadModel('tree')->getOptionMenu($productID, 'case', 0, $branch);
|
||||
$branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$modules = $this->loadModel('tree')->getOptionMenu($productID, 'case', 0, empty(array_keys($branches)) ? 0 : array_keys($branches));
|
||||
$stories = $this->loadModel('story')->getProductStoryPairs($productID, $branch);
|
||||
$fields = $this->testcase->getImportFields($productID);
|
||||
$fields = array_flip($fields);
|
||||
@@ -2020,7 +2021,7 @@ class testcase extends control
|
||||
$this->view->caseData = $caseData;
|
||||
$this->view->stepData = $stepData;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->branches = $branches;
|
||||
$this->view->isEndPage = $pagerID >= $allPager;
|
||||
$this->view->allCount = $allCount;
|
||||
$this->view->allPager = $allPager;
|
||||
|
||||
@@ -81,7 +81,8 @@ $(function()
|
||||
</td>
|
||||
<td><?php echo html::input("title[$key]", htmlSpecialString($case->title, ENT_QUOTES), "class='form-control'")?></td>
|
||||
<td style='overflow:visible'>
|
||||
<?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen moduleChange'")?>
|
||||
<?php $caseModules = (isset($case->branch) and $case->branch != 0) ? $modules[BRANCH_MAIN] + $modules[$case->branch] : $modules;?>
|
||||
<?php echo html::select("module[$key]", $caseModules, isset($case->module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen moduleChange'")?>
|
||||
</td>
|
||||
<td style='overflow:visible'>
|
||||
<?php $storyID = isset($case->story) ? $case->story : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->story : '');?>
|
||||
|
||||
Reference in New Issue
Block a user