diff --git a/module/testreport/model.php b/module/testreport/model.php index ab67c5ef5a..15bc4f4b8d 100644 --- a/module/testreport/model.php +++ b/module/testreport/model.php @@ -57,7 +57,7 @@ class testreportModel extends model { $data = fixer::input('post') ->stripTags($this->config->testreport->editor->create['id'], $this->config->allowedTags) - ->add('PRJ', $this->session->PRJ) + ->setIF($this->lang->navGroup->testreport != 'qa', 'PRJ', $this->session->PRJ) ->add('createdBy', $this->app->user->account) ->add('createdDate', helper::now()) ->join('stories', ',') @@ -149,7 +149,7 @@ class testreportModel extends model { $objectID = (int)$objectID; return $this->dao->select('*')->from(TABLE_TESTREPORT)->where('deleted')->eq(0) - ->andWhere('PRJ')->eq($this->session->PRJ) + ->beginIF($this->lang->navGroup->testreport != 'qa')->andWhere('PRJ')->eq($this->session->PRJ)->fi() ->beginIF($objectType == 'project')->andWhere('objectID')->eq($objectID)->andWhere('objectType')->eq('project')->fi() ->beginIF($objectType == 'product' and $extra)->andWhere('objectID')->eq((int)$extra)->andWhere('objectType')->eq('testtask')->fi() ->beginIF($objectType == 'product' and empty($extra))->andWhere('product')->eq($objectID)->fi() diff --git a/module/testsuite/model.php b/module/testsuite/model.php index dad4a1bb49..a09c797328 100644 --- a/module/testsuite/model.php +++ b/module/testsuite/model.php @@ -101,7 +101,7 @@ class testsuiteModel extends model { $suite = fixer::input('post') ->stripTags($this->config->testsuite->editor->create['id'], $this->config->allowedTags) - ->add('PRJ', $this->session->PRJ) + ->setIF($this->lang->navGroup->testsuite != 'qa', 'PRJ', $this->session->PRJ) ->add('product', (int)$productID) ->add('addedBy', $this->app->user->account) ->add('addedDate', helper::now())