diff --git a/module/product/control.php b/module/product/control.php index 7bdc525436..e91ad8ba7d 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -95,17 +95,11 @@ class product extends control $stories = array(); if($browseType == 'all') { - $this->session->set('storyReport', 'product in(' . $productID . ')'); $stories = $this->story->getProductStories($productID, 0, 'all', $orderBy, $pager); } elseif($browseType == 'bymodule') { $childModuleIds = $this->tree->getAllChildID($moduleID); - $storyQuery = $this->dao->andWhere('product')->in($productID) - ->beginIF(!empty($childModuleIds))->andWhere('module')->in($childModuleIds)->fi() - ->get(); - $storyQuery = substr($storyQuery, strpos($storyQuery,'product')); - $this->session->set('storyReport', $storyQuery); $stories = $this->story->getProductStories($productID, $childModuleIds, 'all', $orderBy, $pager); } elseif($browseType == 'bysearch') @@ -127,10 +121,16 @@ class product extends control { if($this->session->storyQuery == false) $this->session->set('storyQuery', ' 1 = 1'); } - $this->session->set('storyReport', $this->session->storyQuery); $stories = $this->story->getByQuery($productID, $this->session->storyQuery, $orderBy, $pager); } + /* Set session for report Query*/ + $storyReport = $this->session->reportQuery == false ? $this->dao->get() : $this->session->reportQuery; + $sql = explode('WHERE', $storyReport); + $sql = explode('ORDER', $sql[1]); + $this->session->set('storyReport', str_replace(array('t1.','t2.'), '', $sql[0])); + $this->session->set('reportQuery', ''); + /* Build search form. */ $this->config->product->search['actionURL'] = $this->createLink('product', 'browse', "productID=$productID&browseType=bySearch&queryID=myQueryID"); $this->config->product->search['queryID'] = $queryID; diff --git a/module/story/lang/en.php b/module/story/lang/en.php index dc29d50ef8..468049b728 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -164,7 +164,7 @@ $lang->story->report->charts['storysPerEstimate'] = 'Storys of Estimate'; $lang->story->report->charts['storysPerOpenedBy'] = 'Opened by user'; $lang->story->report->charts['storysPerAssignedTo'] = 'Assigned to user'; $lang->story->report->charts['storysPerClosedReason'] = 'Storys for reason'; -$lang->story->report->charts['storysPerChange'] = 'Storys of change'; +$lang->story->report->charts['storysPerChange'] = 'Story version'; $lang->story->report->options->swf = 'pie2d'; $lang->story->report->options->width = 'auto'; @@ -176,8 +176,8 @@ $lang->story->report->options->graph->decimalPrecision = 0; $lang->story->report->options->graph->animation = 0; $lang->story->report->options->graph->rotateNames = 0; $lang->story->report->options->graph->yAxisName = 'COUNT'; -$lang->story->report->options->graph->pieRadius = 100; // 饼图直径。 -$lang->story->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。 +$lang->story->report->options->graph->pieRadius = 100; +$lang->story->report->options->graph->showColumnShadow = 0; $lang->story->report->storysPerProduct->graph->xAxisName = 'Product'; $lang->story->report->storysPerModule->graph->xAxisName = 'Module';