* Code for task #69596.
This commit is contained in:
@@ -168,7 +168,7 @@ $config->bug->datatable->fieldList['id']['required'] = 'yes';
|
||||
|
||||
$config->bug->datatable->fieldList['product']['title'] = 'product';
|
||||
$config->bug->datatable->fieldList['product']['control'] = 'hidden';
|
||||
$config->bug->datatable->fieldList['product']['dataSource'] = array('module' => 'product', 'method' => 'getPairs', 'params' => '&0&&true');
|
||||
$config->bug->datatable->fieldList['product']['dataSource'] = array('module' => 'product', 'method' => 'getPairs', 'params' => '&0&&all');
|
||||
|
||||
$config->bug->datatable->fieldList['module']['control'] = 'select';
|
||||
$config->bug->datatable->fieldList['module']['title'] = 'module';
|
||||
|
||||
@@ -590,9 +590,9 @@ class fileModel extends model
|
||||
return in_array($productID, array_keys($grantProducts));
|
||||
}
|
||||
|
||||
if(isset($projectID) and strpos(",{$this->app->user->view->projects},", ",$projectID,") === false) return false;
|
||||
if(isset($productID) and strpos(",{$this->app->user->view->products},", ",$productID,") === false) return false;
|
||||
if(isset($executionID) and strpos(",{$this->app->user->view->sprints},", ",$executionID,") === false) return false;
|
||||
if((isset($projectID) and $projectID > 0) and strpos(",{$this->app->user->view->projects},", ",$projectID,") === false) return false;
|
||||
if((isset($productID) and $productID > 0) and strpos(",{$this->app->user->view->products},", ",$productID,") === false) return false;
|
||||
if((isset($executionID) and $executionID > 0) and strpos(",{$this->app->user->view->sprints},", ",$executionID,") === false) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -88,11 +88,9 @@ $config->testcase->datatable->fieldList['id']['required'] = 'yes';
|
||||
|
||||
$config->testcase->datatable->fieldList['product']['title'] = 'priAB';
|
||||
$config->testcase->datatable->fieldList['product']['control'] = 'hidden';
|
||||
$config->testcase->datatable->fieldList['product']['dataSource'] = array('module' => 'port', 'method' => 'getRelatedObjects', 'params' => 'testcase&product&id,name');
|
||||
|
||||
$config->testcase->datatable->fieldList['module']['title'] = 'module';
|
||||
$config->testcase->datatable->fieldList['module']['control'] = 'select';
|
||||
$config->testcase->datatable->fieldList['module']['dataSource'] = array('module' => 'tree', 'method' => 'getOptionMenu', 'params' => '$productID&case');
|
||||
|
||||
$config->testcase->datatable->fieldList['pri']['title'] = 'priAB';
|
||||
$config->testcase->datatable->fieldList['pri']['fixed'] = 'left';
|
||||
@@ -109,7 +107,6 @@ $config->testcase->datatable->fieldList['branch']['title'] = 'branch';
|
||||
$config->testcase->datatable->fieldList['branch']['fixed'] = 'left';
|
||||
$config->testcase->datatable->fieldList['branch']['width'] = '100';
|
||||
$config->testcase->datatable->fieldList['branch']['required'] = 'no';
|
||||
$config->testcase->datatable->fieldList['branch']['dataSource'] = array('module' => 'port', 'method' => 'getRelatedObjects', 'params' => 'testcase&branch&id,name');
|
||||
|
||||
$config->testcase->datatable->fieldList['type']['title'] = 'type';
|
||||
$config->testcase->datatable->fieldList['type']['fixed'] = 'no';
|
||||
@@ -205,7 +202,6 @@ $config->testcase->datatable->fieldList['story']['fixed'] = 'no';
|
||||
$config->testcase->datatable->fieldList['story']['width'] = '90';
|
||||
$config->testcase->datatable->fieldList['story']['required'] = 'no';
|
||||
$config->testcase->datatable->fieldList['story']['control'] = 'select';
|
||||
$config->testcase->datatable->fieldList['story']['dataSource'] = array('module' => 'story', 'method' => 'getProductStoryPairs', 'params' => '$productID&$branch');
|
||||
|
||||
$config->testcase->datatable->fieldList['bugs']['title'] = 'B';
|
||||
$config->testcase->datatable->fieldList['bugs']['fixed'] = 'no';
|
||||
@@ -220,7 +216,6 @@ $config->testcase->datatable->fieldList['results']['width'] = '32';
|
||||
$config->testcase->datatable->fieldList['results']['required'] = 'no';
|
||||
$config->testcase->datatable->fieldList['results']['sort'] = 'no';
|
||||
$config->testcase->datatable->fieldList['results']['name'] = $lang->testcase->results;
|
||||
$config->testcase->datatable->fieldList['results']['dataSource'] = array('lang' => 'resultList');
|
||||
|
||||
$config->testcase->datatable->fieldList['stepNumber']['title'] = 'S';
|
||||
$config->testcase->datatable->fieldList['stepNumber']['fixed'] = 'no';
|
||||
|
||||
@@ -163,7 +163,8 @@ class testcase extends control
|
||||
$actionURL = $this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID");
|
||||
$this->config->testcase->search['onMenuBar'] = 'yes';
|
||||
|
||||
$this->testcase->buildSearchForm($productID, $this->products, $queryID, $actionURL, $projectID);
|
||||
$searchProducts = $this->product->getPairs('', 0, '', 'all');
|
||||
$this->testcase->buildSearchForm($productID, $searchProducts, $queryID, $actionURL, $projectID);
|
||||
|
||||
$showModule = !empty($this->config->datatable->testcaseBrowse->showModule) ? $this->config->datatable->testcaseBrowse->showModule : '';
|
||||
|
||||
@@ -570,6 +571,7 @@ class testcase extends control
|
||||
$this->view->precondition = $precondition;
|
||||
$this->view->keywords = $keywords;
|
||||
$this->view->steps = $steps;
|
||||
$this->view->hiddenProduct = !empty($product->shadow);
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->branch = $branch;
|
||||
$this->view->product = $product;
|
||||
@@ -1591,7 +1593,8 @@ class testcase extends control
|
||||
$orderBy = '`' . $field . '`_' . $sort;
|
||||
}
|
||||
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
$products = $this->loadModel('product')->getPairs('', 0, '', 'all');
|
||||
if($product->type != 'normal') $this->lang->testcase->branch = $this->lang->product->branchName[$product->type];
|
||||
if($_POST)
|
||||
{
|
||||
@@ -1654,7 +1657,6 @@ class testcase extends control
|
||||
|
||||
/* Get users, products and projects. */
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
$branches = $this->loadModel('branch')->getPairs($productID);
|
||||
|
||||
/* Get related objects id lists. */
|
||||
@@ -1794,12 +1796,11 @@ class testcase extends control
|
||||
}
|
||||
|
||||
$fileName = $this->lang->testcase->common;
|
||||
$productName = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('name');
|
||||
$browseType = isset($this->lang->testcase->featureBar['browse'][$browseType]) ? $this->lang->testcase->featureBar['browse'][$browseType] : '';
|
||||
|
||||
if($taskID) $taskName = $this->dao->findById($taskID)->from(TABLE_TESTTASK)->fetch('name');
|
||||
|
||||
$this->view->fileName = $productName . $this->lang->dash . ($taskID ? $taskName . $this->lang->dash : '') . $browseType . $fileName;
|
||||
$this->view->fileName = zget($products, $productID, '') . $this->lang->dash . ($taskID ? $taskName . $this->lang->dash : '') . $browseType . $fileName;
|
||||
$this->view->allExportFields = $this->config->testcase->exportFields;
|
||||
$this->view->customExport = true;
|
||||
$this->display();
|
||||
|
||||
@@ -42,8 +42,8 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->product;?></th>
|
||||
<td>
|
||||
<th><?php echo $hiddenProduct ? $lang->testcase->module : $lang->testcase->product;?></th>
|
||||
<td class='<?php if($hiddenProduct) echo 'hidden';?>'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('product', $products, $productID, "onchange='loadAll(this.value);' class='form-control chosen'");?>
|
||||
<?php if(isset($product->type) and $product->type != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control' style='width:120px'");?>
|
||||
@@ -51,7 +51,9 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
|
||||
</td>
|
||||
<td style='padding-left:15px;'>
|
||||
<div class='input-group' id='moduleIdBox'>
|
||||
<?php if(!$hiddenProduct):?>
|
||||
<span class="input-group-addon w-80px"><?php echo $lang->testcase->module?></span>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
echo html::select('module', $moduleOptionMenu, $currentModuleID, "onchange='loadModuleRelated();' class='form-control chosen'");
|
||||
if(count($moduleOptionMenu) == 1)
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<?php if(!$product->shadow):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->product;?></th>
|
||||
<td>
|
||||
@@ -184,6 +185,7 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->module;?></th>
|
||||
<td>
|
||||
|
||||
@@ -146,10 +146,12 @@
|
||||
<td><?php echo common::hasPriv('caselib', 'browse') ? html::a($this->createLink('caselib', 'browse', "libID=$case->lib"), $libName) : $libName;?></td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<?php if(!$product->shadow):?>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->testcase->product;?></th>
|
||||
<td><?php echo (common::hasPriv('product', 'browse') and $productName) ? html::a($this->createLink('product', 'browse', "productID=$case->product"), $productName) : $productName;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<tr>
|
||||
<th><?php echo sprintf($lang->product->branch, $lang->product->branchName[$product->type]);?></th>
|
||||
|
||||
Reference in New Issue
Block a user