* finish task #3344.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
UPDATE `zt_grouppriv` SET `method`='productSummary' WHERE `method`='productInfo' AND `module`='report';
|
||||
+11
-11
@@ -906,7 +906,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1, 'report', 'bugAssign'),
|
||||
(1, 'report', 'bugSummary'),
|
||||
(1, 'report', 'index'),
|
||||
(1, 'report', 'productInfo'),
|
||||
(1, 'report', 'productSummary'),
|
||||
(1, 'report', 'projectDeviation'),
|
||||
(1, 'report', 'workload'),
|
||||
(1, 'search', 'buildForm'),
|
||||
@@ -1113,7 +1113,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(2, 'report', 'bugAssign'),
|
||||
(2, 'report', 'bugSummary'),
|
||||
(2, 'report', 'index'),
|
||||
(2, 'report', 'productInfo'),
|
||||
(2, 'report', 'productSummary'),
|
||||
(2, 'report', 'projectDeviation'),
|
||||
(2, 'report', 'workload'),
|
||||
(2, 'search', 'buildForm'),
|
||||
@@ -1271,7 +1271,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(3, 'report', 'bugAssign'),
|
||||
(3, 'report', 'bugSummary'),
|
||||
(3, 'report', 'index'),
|
||||
(3, 'report', 'productInfo'),
|
||||
(3, 'report', 'productSummary'),
|
||||
(3, 'report', 'projectDeviation'),
|
||||
(3, 'report', 'workload'),
|
||||
(3, 'search', 'buildForm'),
|
||||
@@ -1487,7 +1487,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(4, 'report', 'bugAssign'),
|
||||
(4, 'report', 'bugSummary'),
|
||||
(4, 'report', 'index'),
|
||||
(4, 'report', 'productInfo'),
|
||||
(4, 'report', 'productSummary'),
|
||||
(4, 'report', 'projectDeviation'),
|
||||
(4, 'report', 'workload'),
|
||||
(4, 'search', 'buildForm'),
|
||||
@@ -1711,7 +1711,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(5, 'report', 'bugAssign'),
|
||||
(5, 'report', 'bugSummary'),
|
||||
(5, 'report', 'index'),
|
||||
(5, 'report', 'productInfo'),
|
||||
(5, 'report', 'productSummary'),
|
||||
(5, 'report', 'projectDeviation'),
|
||||
(5, 'report', 'workload'),
|
||||
(5, 'search', 'buildForm'),
|
||||
@@ -1915,7 +1915,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(6, 'report', 'bugAssign'),
|
||||
(6, 'report', 'bugSummary'),
|
||||
(6, 'report', 'index'),
|
||||
(6, 'report', 'productInfo'),
|
||||
(6, 'report', 'productSummary'),
|
||||
(6, 'report', 'projectDeviation'),
|
||||
(6, 'report', 'workload'),
|
||||
(6, 'search', 'buildForm'),
|
||||
@@ -2120,7 +2120,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(7, 'report', 'bugAssign'),
|
||||
(7, 'report', 'bugSummary'),
|
||||
(7, 'report', 'index'),
|
||||
(7, 'report', 'productInfo'),
|
||||
(7, 'report', 'productSummary'),
|
||||
(7, 'report', 'projectDeviation'),
|
||||
(7, 'report', 'workload'),
|
||||
(7, 'search', 'buildForm'),
|
||||
@@ -2300,7 +2300,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(8, 'report', 'bugAssign'),
|
||||
(8, 'report', 'bugSummary'),
|
||||
(8, 'report', 'index'),
|
||||
(8, 'report', 'productInfo'),
|
||||
(8, 'report', 'productSummary'),
|
||||
(8, 'report', 'projectDeviation'),
|
||||
(8, 'report', 'workload'),
|
||||
(8, 'search', 'buildForm'),
|
||||
@@ -2486,7 +2486,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(9, 'report', 'bugAssign'),
|
||||
(9, 'report', 'bugSummary'),
|
||||
(9, 'report', 'index'),
|
||||
(9, 'report', 'productInfo'),
|
||||
(9, 'report', 'productSummary'),
|
||||
(9, 'report', 'projectDeviation'),
|
||||
(9, 'report', 'workload'),
|
||||
(9, 'search', 'buildForm'),
|
||||
@@ -2603,7 +2603,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(10, 'report', 'bugAssign'),
|
||||
(10, 'report', 'bugSummary'),
|
||||
(10, 'report', 'index'),
|
||||
(10, 'report', 'productInfo'),
|
||||
(10, 'report', 'productSummary'),
|
||||
(10, 'report', 'projectDeviation'),
|
||||
(10, 'report', 'workload'),
|
||||
(10, 'search', 'buildForm'),
|
||||
@@ -2682,7 +2682,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(11, 'report', 'bugAssign'),
|
||||
(11, 'report', 'bugSummary'),
|
||||
(11, 'report', 'index'),
|
||||
(11, 'report', 'productInfo'),
|
||||
(11, 'report', 'productSummary'),
|
||||
(11, 'report', 'projectDeviation'),
|
||||
(11, 'report', 'workload'),
|
||||
(11, 'search', 'buildForm'),
|
||||
|
||||
@@ -249,7 +249,7 @@ $lang->doc->menu->create = array('link' => '<span class="icon-add1"> </spa
|
||||
$lang->report = new stdclass();
|
||||
$lang->report->menu = new stdclass();
|
||||
|
||||
$lang->report->menu->product = array('link' => "{$lang->productcommon}|report|productinfo");
|
||||
$lang->report->menu->product = array('link' => "{$lang->productcommon}|report|productSummary");
|
||||
$lang->report->menu->prj = array('link' => "{$lang->projectcommon}|report|projectdeviation");
|
||||
$lang->report->menu->test = array('link' => 'Test|report|bugsummary', 'alias' => 'bugassign');
|
||||
$lang->report->menu->staff = array('link' => 'Company|report|workload');
|
||||
|
||||
@@ -249,7 +249,7 @@ $lang->doc->menu->create = array('link' => '<i class="icon-plus"></i> 添
|
||||
$lang->report = new stdclass();
|
||||
$lang->report->menu = new stdclass();
|
||||
|
||||
$lang->report->menu->product = array('link' => $lang->productcommon . '|report|productinfo');
|
||||
$lang->report->menu->product = array('link' => $lang->productcommon . '|report|productSummary');
|
||||
$lang->report->menu->prj = array('link' => $lang->projectcommon . '|report|projectdeviation');
|
||||
$lang->report->menu->test = array('link' => '测试|report|bugsummary', 'alias' => 'bugassign');
|
||||
$lang->report->menu->staff = array('link' => '组织|report|workload');
|
||||
|
||||
@@ -690,14 +690,14 @@ $lang->tree->methodOrder[30] = 'delete';
|
||||
$lang->resource->report = new stdclass();
|
||||
$lang->resource->report->index = 'index';
|
||||
$lang->resource->report->projectDeviation = 'projectDeviation';
|
||||
$lang->resource->report->productInfo = 'productInfo';
|
||||
$lang->resource->report->productSummary = 'productSummary';
|
||||
$lang->resource->report->bugSummary = 'bugSummary';
|
||||
$lang->resource->report->bugAssign = 'bugAssign';
|
||||
$lang->resource->report->workload = 'workload';
|
||||
|
||||
$lang->report->methodOrder[0] = 'index';
|
||||
$lang->report->methodOrder[5] = 'projectDeviation';
|
||||
$lang->report->methodOrder[10] = 'productInfo';
|
||||
$lang->report->methodOrder[10] = 'productSummary';
|
||||
$lang->report->methodOrder[15] = 'bugSummary';
|
||||
$lang->report->methodOrder[17] = 'bugSummary';
|
||||
$lang->report->methodOrder[20] = 'workload';
|
||||
@@ -949,7 +949,7 @@ $lang->changelog['3.2'][] = 'task-batchEdit';
|
||||
$lang->changelog['3.2'][] = 'release-export';
|
||||
$lang->changelog['3.2'][] = 'report-index';
|
||||
$lang->changelog['3.2'][] = 'report-projectDeviation';
|
||||
$lang->changelog['3.2'][] = 'report-productInfo';
|
||||
$lang->changelog['3.2'][] = 'report-productSummary';
|
||||
$lang->changelog['3.2'][] = 'report-bugSummary';
|
||||
$lang->changelog['3.2'][] = 'report-workload';
|
||||
$lang->changelog['3.2'][] = 'tree-fix';
|
||||
|
||||
@@ -411,7 +411,7 @@ class my extends control
|
||||
|
||||
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->profile;
|
||||
$this->view->position[] = $this->lang->my->profile;
|
||||
$this->view->user = $this->user->getById($this->app->user->id);
|
||||
$this->view->user = $user;
|
||||
$this->view->groups = $this->loadModel('group')->getByAccount($this->app->user->account);
|
||||
$this->view->deptPath = $this->dept->getParents($user->dept);
|
||||
$this->display();
|
||||
|
||||
@@ -757,7 +757,6 @@ class project extends control
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->tabID = 'burn';
|
||||
$this->view->charts = $charts;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->projectName = $project->name;
|
||||
$this->view->type = $type;
|
||||
|
||||
@@ -19,7 +19,7 @@ class report extends control
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->locate(inlink('productinfo'));
|
||||
$this->locate(inlink('productSummary'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,16 +43,17 @@ class report extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function productInfo()
|
||||
public function productSummary($conditions = '')
|
||||
{
|
||||
$this->app->loadLang('product');
|
||||
$this->app->loadLang('productplan');
|
||||
$this->app->loadLang('story');
|
||||
$this->view->title = $this->lang->report->productInfo;
|
||||
$this->view->position[] = $this->lang->report->productInfo;
|
||||
$this->view->products = $this->report->getProducts();
|
||||
$this->view->title = $this->lang->report->productSummary;
|
||||
$this->view->position[] = $this->lang->report->productSummary;
|
||||
$this->view->products = $this->report->getProducts($conditions);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
|
||||
$this->view->submenu = 'product';
|
||||
$this->view->conditions = $conditions;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,3 +31,4 @@ td .deviation{padding-left:20px; text-align:left;}
|
||||
.d20{color:#33A52E;}
|
||||
|
||||
#titlebar {display: none}
|
||||
#conditions{ padding: 10px; margin: 0 0 10px; border: 1px solid #ddd;}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
$('#conditions input:checkbox').change(function()
|
||||
{
|
||||
var conditions = '';
|
||||
$('#conditions input:checkbox').each(function(i)
|
||||
{
|
||||
if($(this).prop('checked')) conditions += $(this).val() + ',';
|
||||
})
|
||||
conditions = conditions.substring(0, conditions.length - 1);
|
||||
location.href = createLink('report', 'productSummary', 'conditions=' + conditions);
|
||||
})
|
||||
@@ -34,13 +34,13 @@ $lang->report->colors[] = 'A186BE';
|
||||
$lang->report->singleColor[] = 'F6BD0F';
|
||||
|
||||
$lang->report->projectDeviation = $lang->projectcommon . ' deviation';
|
||||
$lang->report->productInfo = $lang->productcommon . ' information';
|
||||
$lang->report->productSummary = $lang->productcommon . ' summary';
|
||||
$lang->report->bugSummary = 'Bug summary';
|
||||
$lang->report->bugAssign = 'Bug assign';
|
||||
$lang->report->workload = 'Workload';
|
||||
|
||||
$lang->reportList->project->lists[10] = $lang->projectcommon . ' deviation|report|projectdeviation';
|
||||
$lang->reportList->product->lists[10] = $lang->productcommon . ' information|report|productinfo';
|
||||
$lang->reportList->product->lists[10] = $lang->productcommon . ' summary|report|productsummary';
|
||||
$lang->reportList->test->lists[10] = 'Bug summary|report|bugsummary';
|
||||
$lang->reportList->test->lists[13] = 'Bug assign|report|bugassign';
|
||||
$lang->reportList->staff->lists[10] = 'Workload|report|workload';
|
||||
|
||||
@@ -34,13 +34,13 @@ $lang->report->colors[] = 'A186BE';
|
||||
$lang->report->singleColor[] = 'F6BD0F';
|
||||
|
||||
$lang->report->projectDeviation = $lang->projectcommon . '偏差报表';
|
||||
$lang->report->productInfo = $lang->productcommon . '信息统计表';
|
||||
$lang->report->productSummary = $lang->productcommon . '汇总表';
|
||||
$lang->report->bugSummary = 'Bug汇总表';
|
||||
$lang->report->bugAssign = 'Bug指派表';
|
||||
$lang->report->workload = '员工负载表';
|
||||
|
||||
$lang->reportList->project->lists[10] = $lang->projectcommon . '偏差报表|report|projectdeviation';
|
||||
$lang->reportList->product->lists[10] = $lang->productcommon . '信息统计表|report|productinfo';
|
||||
$lang->reportList->product->lists[10] = $lang->productcommon . '汇总表|report|productsummary';
|
||||
$lang->reportList->test->lists[10] = 'Bug汇总表|report|bugsummary';
|
||||
$lang->reportList->test->lists[13] = 'Bug指派表|report|bugassign';
|
||||
$lang->reportList->staff->lists[10] = '员工负载表|report|workload';
|
||||
@@ -72,6 +72,10 @@ $lang->report->validRate = "有效率";
|
||||
$lang->report->validRateTips = "方案为已解决或延期/状态为已解决或已关闭";
|
||||
$lang->report->unplanned = '未计划';
|
||||
|
||||
$lang->report->conditions = '筛选条件:';
|
||||
$lang->report->closedProduct = '关闭' . $lang->productcommon;
|
||||
$lang->report->overduePlan = '过期计划';
|
||||
|
||||
/* daily reminder. */
|
||||
$lang->report->idAB = 'ID';
|
||||
$lang->report->bugTitle = 'Bug标题';
|
||||
|
||||
+10
-4
@@ -153,11 +153,15 @@ class reportModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProducts()
|
||||
public function getProducts($conditions)
|
||||
{
|
||||
$products = $this->dao->select('id, code, name, PO')->from(TABLE_PRODUCT)->where('deleted')->eq(0)->fetchAll('id');
|
||||
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('deleted')->eq(0)->andWhere('product')->in(array_keys($products))->fetchAll('id');
|
||||
if(!$plans) return array();
|
||||
$products = $this->dao->select('id, code, name, PO')->from(TABLE_PRODUCT)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF(strpos($conditions, 'closedProduct') === false)->andWhere('status')->ne('closed')->fi()
|
||||
->fetchAll('id');
|
||||
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('deleted')->eq(0)->andWhere('product')->in(array_keys($products))
|
||||
->beginIF(strpos($conditions, 'overduePlan') === false)->andWhere('end')->gt(date('Y-m-d'))->fi()
|
||||
->fetchAll('id');
|
||||
foreach($plans as $plan) $products[$plan->product]->plans[$plan->id] = $plan;
|
||||
|
||||
$planStories = $this->dao->select('plan, id, status')->from(TABLE_STORY)->where('deleted')->eq(0)->andWhere('plan')->in(array_keys($plans))->fetchGroup('plan', 'id');
|
||||
@@ -181,6 +185,8 @@ class reportModel extends model
|
||||
$products[$product]->plans[0]->status[$story->status] = isset($products[$product]->plans[0]->status[$story->status]) ? $products[$product]->plans[0]->status[$story->status] + 1 : 1;
|
||||
}
|
||||
}
|
||||
|
||||
unset($products['']);
|
||||
return $products;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,17 @@
|
||||
</div>
|
||||
|
||||
<div class='main'>
|
||||
<div id='conditions'>
|
||||
<strong><?php echo $lang->report->conditions?></strong>
|
||||
<label for='closedProduct'>
|
||||
<input type='checkbox' value='closedProduct' name='closedProduct' id='closedProduct' <?php if(strpos($conditions, 'closedProduct') !== false) echo "checked='checked'"?>/>
|
||||
<?php echo $lang->report->closedProduct?>
|
||||
</label>
|
||||
<label for='overduePlan'>
|
||||
<input type='checkbox' value='overduePlan' name='overduePlan' id='overduePlan' <?php if(strpos($conditions, 'overduePlan') !== false) echo "checked='checked'"?>/>
|
||||
<?php echo $lang->report->overduePlan?>
|
||||
</label>
|
||||
</div>
|
||||
<table class='table table-condensed table-striped table-bordered tablesorter table-fixed active-disabled' id='product'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
@@ -121,6 +121,8 @@ class upgradeModel extends model
|
||||
$this->execSQL($this->getUpgradeFile('7.1'));
|
||||
$this->initOrder();
|
||||
case '7_2':
|
||||
case '7_2_4':
|
||||
$this->execSQL($this->getUpgradeFile('7.2.4'));
|
||||
|
||||
default: if(!$this->isError()) $this->setting->updateVersion($this->config->version);
|
||||
}
|
||||
@@ -189,6 +191,7 @@ class upgradeModel extends model
|
||||
case '7_0': $confirmContent .= file_get_contents($this->getUpgradeFile('7.0'));
|
||||
case '7_1': $confirmContent .= file_get_contents($this->getUpgradeFile('7.1'));
|
||||
case '7_2':
|
||||
case '7_2_4': $confirmContent .= file_get_contents($this->getUpgradeFile('7.2.4'));
|
||||
}
|
||||
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user