Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -205,7 +205,7 @@ class branch extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($productID, $branch = 0, $module, $method, $extra = '')
|
||||
public function ajaxGetDropMenu($productID, $branch, $module, $method, $extra = '')
|
||||
{
|
||||
parse_str($extra, $output);
|
||||
$branches = $this->branch->getPairs($productID, 'all', isset($output['projectID']) ? $output['projectID'] : 0);
|
||||
|
||||
@@ -1267,7 +1267,7 @@ class execution extends control
|
||||
* Create a execution.
|
||||
*
|
||||
* @param string $projectID
|
||||
* @param string $executionID
|
||||
* @param int $executionID
|
||||
* @param string $copyExecutionID
|
||||
* @param int $planID
|
||||
* @param string $confirm
|
||||
@@ -1277,7 +1277,7 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($projectID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0, $extra = '')
|
||||
public function create($projectID = '', $executionID = 0, $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0, $extra = '')
|
||||
{
|
||||
/* Set menu. */
|
||||
if($this->app->tab == 'project')
|
||||
|
||||
@@ -182,7 +182,8 @@ body {margin-bottom: 25px;}
|
||||
<?php if($this->app->getViewType() == 'xhtml'):?>
|
||||
<div id="xx-title">
|
||||
<strong>
|
||||
<?php echo ($this->project->getById($execution->project)->name . ' / ' . $this->execution->getByID($execution->id)->name) ?>
|
||||
<?php $projectName = $this->config->systemMode == 'new' ? $this->project->getById($execution->project)->name . ' / ' : '';?>
|
||||
<?php echo ($projectName . $this->execution->getByID($execution->id)->name);?>
|
||||
</strong>
|
||||
<div class="linkButton" onclick="handleLinkButtonClick()">
|
||||
<span title="<?php echo $lang->viewDetails;?>">
|
||||
|
||||
@@ -32,7 +32,7 @@ class product extends control
|
||||
/* Get all products, if no, goto the create page. */
|
||||
$this->products = $this->product->getPairs('nocode');
|
||||
$isAPI = ($this->app->viewType == 'json' or (defined('RUN_MODE') and RUN_MODE == 'api'));
|
||||
if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban,all', $this->methodName) === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create'));
|
||||
if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban,all,manageline', $this->methodName) === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create'));
|
||||
$this->view->products = $this->products;
|
||||
}
|
||||
|
||||
|
||||
@@ -656,7 +656,7 @@ class program extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($programID = 0, $module, $method)
|
||||
public function ajaxGetDropMenu($programID, $module, $method)
|
||||
{
|
||||
$this->view->programID = $programID;
|
||||
$this->view->module = $module;
|
||||
|
||||
@@ -115,7 +115,7 @@ class project extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($projectID = 0, $module, $method)
|
||||
public function ajaxGetDropMenu($projectID, $module, $method)
|
||||
{
|
||||
/* Load module. */
|
||||
$this->loadModel('program');
|
||||
|
||||
@@ -2440,7 +2440,7 @@ class storyModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function get2BeClosed($productID, $branch, $modules, $type = 'story', $orderBy, $pager)
|
||||
public function get2BeClosed($productID, $branch, $modules, $type = 'story', $orderBy = '', $pager = null)
|
||||
{
|
||||
$stories = $this->dao->select('*')->from(TABLE_STORY)
|
||||
->where('product')->in($productID)
|
||||
|
||||
@@ -22,7 +22,7 @@ class taskModel extends model
|
||||
*/
|
||||
public function create($executionID)
|
||||
{
|
||||
if($this->post->estimate < 0)
|
||||
if((float)$this->post->estimate < 0)
|
||||
{
|
||||
dao::$errors[] = $this->lang->task->error->recordMinus;
|
||||
return false;
|
||||
|
||||
@@ -60,7 +60,7 @@ class testcaseModel extends model
|
||||
if(!empty($case->lib))$param = "lib={$case->lib}";
|
||||
if(!empty($case->product))$param = "product={$case->product}";
|
||||
$result = $this->loadModel('common')->removeDuplicate('case', $case, $param);
|
||||
if($result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']);
|
||||
if($result and $result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']);
|
||||
|
||||
/* Value of story may be showmore. */
|
||||
$case->story = (int)$case->story;
|
||||
|
||||
@@ -947,7 +947,7 @@ class testtaskModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserRuns($taskID, $user, $modules = '', $orderBy, $pager = null)
|
||||
public function getUserRuns($taskID, $user, $modules = '', $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
/* Select the table for these special fields. */
|
||||
$specialFields = ',assignedTo,status,lastRunResult,lastRunner,lastRunDate,';
|
||||
|
||||
Reference in New Issue
Block a user