* Rename session->PRJ to session->project.

This commit is contained in:
zhujinyong
2021-03-22 12:03:10 +08:00
parent 28017454fa
commit 82428349ad
38 changed files with 165 additions and 166 deletions
+5 -5
View File
@@ -61,7 +61,7 @@ class bugModel extends model
->setDefault('execution,story,task', 0)
->setDefault('openedBuild', '')
->setDefault('deadline', '0000-00-00')
->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa', 'project', $this->session->PRJ)
->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa', 'project', $this->session->project)
->setIF(strpos($this->config->bug->create->requiredFields, 'deadline') !== false, 'deadline', $this->post->deadline)
->setIF($this->post->assignedTo != '', 'assignedDate', $now)
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
@@ -227,7 +227,7 @@ class bugModel extends model
}
}
if($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa') $bug->project = $this->session->PRJ;
if($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa') $bug->project = $this->session->project;
$this->dao->insert(TABLE_BUG)->data($bug)
->autoCheck()
->batchCheck($this->config->bug->create->requiredFields, 'notempty')
@@ -1230,7 +1230,7 @@ class bugModel extends model
*/
public function buildSearchForm($productID, $products, $queryID, $actionURL)
{
$projectID = $this->lang->navGroup->bug == 'qa' ? 0 : $this->session->PRJ;
$projectID = $this->lang->navGroup->bug == 'qa' ? 0 : $this->session->project;
$productParams = $productID ? array($productID => $products[$productID]) : $products;
$productParams = $productParams + array('all' => $this->lang->bug->allProduct);
@@ -1248,7 +1248,7 @@ class bugModel extends model
$this->config->bug->search['params']['product']['values'] = $productParams;
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($productID);
$this->config->bug->search['params']['module']['values'] = $modules;
$this->config->bug->search['params']['execution']['values'] = $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$this->config->bug->search['params']['severity']['values'] = array(0 => '') + $this->lang->bug->severityList; //Fix bug #939.
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
@@ -1753,7 +1753,7 @@ class bugModel extends model
{
$datas = $this->dao->select('execution as name, count(execution) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('execution')->orderBy('value DESC')->fetchAll('name');
if(!$datas) return array();
$executions = $this->loadModel('execution')->getPairs($this->session->PRJ);
$executions = $this->loadModel('execution')->getPairs($this->session->project);
$maxLength = 12;
if(common::checkNotCN()) $maxLength = 22;