* Fix bug.

This commit is contained in:
tianshujie98
2021-03-08 09:30:34 +08:00
parent faf9dcaf50
commit cdfbebc58b
11 changed files with 53 additions and 53 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
var executionID = $('#execution').val();
function loadExecutons()
function loadExecutions()
{
var productID = $('#product').val();
var branchID = $('#branch').length > 0 ? $('#branch').val() : 0;
@@ -11,5 +11,5 @@ function loadExecutons()
$(document).on('change', '#product,#branch', function()
{
loadExecutons();
loadExecutions();
})
+5 -5
View File
@@ -497,11 +497,11 @@ $lang->projectrelease->menu = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => 'Annual Summary|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->project = array('link' => $lang->executionCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => 'Test|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => 'Unternehmen|report|workload');
$lang->report->menu->annual = array('link' => 'Annual Summary|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->execution = array('link' => $lang->executionCommon . '|report|executiondeviation');
$lang->report->menu->test = array('link' => 'Test|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => 'Unternehmen|report|workload');
$lang->report->notice = new stdclass();
$lang->report->notice->help = 'Hinweis: Berichte wurde auf Basis der Suche generiert. Bitte suchen Sie in der Liste bevor Sie einen Bericht generieren.';
+5 -5
View File
@@ -497,11 +497,11 @@ $lang->projectrelease->menu = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => 'Annual Summary|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->project = array('link' => $lang->executionCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => 'Request|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => 'Company|report|workload');
$lang->report->menu->annual = array('link' => 'Annual Summary|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->execution = array('link' => $lang->executionCommon . '|report|executiondeviation');
$lang->report->menu->test = array('link' => 'Request|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => 'Company|report|workload');
$lang->report->notice = new stdclass();
$lang->report->notice->help = 'Note: The report is generated on the results of browsing the list. Click, e.g. AssignedToMe, then click Create Report to generate a report based on AssignedToMe list.';
+5 -5
View File
@@ -497,11 +497,11 @@ $lang->projectrelease->menu = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => 'Annual Summary|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->project = array('link' => $lang->executionCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => 'Recette|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => 'Entreprise|report|workload');
$lang->report->menu->annual = array('link' => 'Annual Summary|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->execution = array('link' => $lang->executionCommon . '|report|executiondeviation');
$lang->report->menu->test = array('link' => 'Recette|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => 'Entreprise|report|workload');
$lang->report->notice = new stdclass();
$lang->report->notice->help = 'Note : Le rapport est généré à partir des résultats de la liste consultée. Par exemple, cliquez sur AssignedToMe, puis Générer Rapport pour obtenir un rapport basé sur la liste de ce qui vous est assigné.';
+1 -1
View File
@@ -131,7 +131,7 @@ $lang->doc->menuOrder[30] = 'create';
/* report menu order. */
$lang->report->menuOrder[5] = 'annual';
$lang->report->menuOrder[10] = 'product';
$lang->report->menuOrder[15] = 'project';
$lang->report->menuOrder[15] = 'execution';
$lang->report->menuOrder[20] = 'test';
$lang->report->menuOrder[25] = 'staff';
+5 -5
View File
@@ -497,11 +497,11 @@ $lang->projectrelease->menu = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => 'Tóm tắt năm|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->project = array('link' => $lang->executionCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => 'Yêu cầu|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => 'Doanh nghiệp|report|workload');
$lang->report->menu->annual = array('link' => 'Tóm tắt năm|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->execution = array('link' => $lang->executionCommon . '|report|executiondeviation');
$lang->report->menu->test = array('link' => 'Yêu cầu|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => 'Doanh nghiệp|report|workload');
$lang->report->notice = new stdclass();
$lang->report->notice->help = 'Ghi chú: The report is generated on the results of browsing the list. Click, ví dụ: AssignedToMe, then click Create Report to generate a report based on AssignedToMe list.';
+5 -5
View File
@@ -497,11 +497,11 @@ $lang->projectrelease->menu = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => '年度总结|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->project = array('link' => $lang->executionCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => '测试|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => '组织|report|workload');
$lang->report->menu->annual = array('link' => '年度总结|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->execution = array('link' => $lang->executionCommon . '|report|executiondeviation');
$lang->report->menu->test = array('link' => '测试|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => '组织|report|workload');
$lang->report->notice = new stdclass();
$lang->report->notice->help = '注:统计报表的数据来源于列表页面的检索结果,生成统计报表前请先在列表页面进行检索。比如列表页面我们检索的是%tab%,那么报表就是基于之前检索的%tab%的结果集进行统计。';
+5 -5
View File
@@ -497,11 +497,11 @@ $lang->projectrelease->menu = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => '年度總結|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->project = array('link' => $lang->executionCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => '測試|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => '組織|report|workload');
$lang->report->menu->annual = array('link' => '年度總結|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->execution = array('link' => $lang->executionCommon . '|report|executiondeviation');
$lang->report->menu->test = array('link' => '測試|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => '組織|report|workload');
$lang->report->notice = new stdclass();
$lang->report->notice->help = '註:統計報表的數據來源於列表頁面的檢索結果,生成統計報表前請先在列表頁面進行檢索。比如列表頁面我們檢索的是%tab%,那麼報表就是基于之前檢索的%tab%的結果集進行統計。';
+5 -5
View File
@@ -67,10 +67,10 @@ class report extends control
$this->view->title = $this->lang->report->executionDeviation;
$this->view->position[] = $this->lang->report->executionDeviation;
$this->view->executons = $this->report->getExecutions($begin, $end);
$this->view->begin = $begin;
$this->view->end = $end;
$this->view->submenu = 'executon';
$this->view->executions = $this->report->getExecutions($begin, $end);
$this->view->begin = $begin;
$this->view->end = $end;
$this->view->submenu = 'execution';
$this->display();
}
@@ -118,7 +118,7 @@ class report extends control
$this->view->end = $end;
$this->view->bugs = $this->report->getBugs($begin, $end, $product, $execution);
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed|nodeleted');
$this->view->executions = array('' => '') + $this->loadModel('execution')->getExecutionPairs();
$this->view->executions = array('' => '') + $this->loadModel('execution')->getPairs();
$this->view->products = array('' => '') + $this->loadModel('product')->getPairs();
$this->view->execution = $execution;
$this->view->product = $product;
+14 -14
View File
@@ -89,15 +89,15 @@ class reportModel extends model
}
/**
* Get executons.
* Get executions.
*
* @access public
* @return void
*/
public function getExecutons($begin = 0, $end = 0)
public function getExecutions($begin = 0, $end = 0)
{
$tasks = $this->dao->select('t1.*,t2.name as executonName')->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.executon = t2.id')
$tasks = $this->dao->select('t1.*,t2.name as executionName')->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')
->where('t1.status')->ne('cancel')
->andWhere('t1.deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
@@ -109,23 +109,23 @@ class reportModel extends model
->orderBy('t2.end_desc')
->fetchAll();
$executons = array();
$executions = array();
foreach($tasks as $task)
{
$executonID = $task->executon;
if(!isset($executons[$executonID]))
$executionID = $task->execution;
if(!isset($executions[$executionID]))
{
$executons[$executonID] = new stdclass();
$executons[$executonID]->estimate = 0;
$executons[$executonID]->consumed = 0;
$executions[$executionID] = new stdclass();
$executions[$executionID]->estimate = 0;
$executions[$executionID]->consumed = 0;
}
$executons[$executonID]->name = $task->executonName;
$executons[$executonID]->estimate += $task->estimate;
$executons[$executonID]->consumed += $task->consumed;
$executions[$executionID]->name = $task->executionName;
$executions[$executionID]->estimate += $task->estimate;
$executions[$executionID]->consumed += $task->consumed;
}
return $executons;
return $executions;
}
/**
+1 -1
View File
@@ -267,7 +267,7 @@ class searchModel extends model
$users['$@me'] = $this->lang->search->me;
}
if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs('', $this->session->project);
if($hasExecution) $executions = array('' => '') + $this->loadModel('execution')->getExecutionPairs($this->session->project);
if($hasExecution) $executions = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project);
foreach($fields as $fieldName)
{