diff --git a/module/product/config.php b/module/product/config.php
index da591a9343..2982a63191 100644
--- a/module/product/config.php
+++ b/module/product/config.php
@@ -157,7 +157,7 @@ $config->product->report->planLabels[] = '';
$config->product->statisticFields = array();
$config->product->statisticFields['requirements'] = array('draftRequirements', 'activeRequirements', 'changingRequirements', 'reviewingRequirements', 'closedRequirements');
-$config->product->statisticFields['stories'] = array('draftStories', 'activeStories', 'changingStories', 'reviewingStories', 'closedStories');
+$config->product->statisticFields['stories'] = array('draftStories', 'activeStories', 'changingStories', 'reviewingStories', 'closedStories', 'finishClosedStories', 'unclosedStories');
$config->product->statisticFields['bugs'] = array('unResolvedBugs', 'closedBugs', 'fixedBugs');
$config->product->statisticFields['plans'] = array('plans');
$config->product->statisticFields['releases'] = array('releases');
diff --git a/module/product/model.php b/module/product/model.php
index 0d7f7650bf..ffffb80b3b 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -1868,6 +1868,17 @@ class productModel extends model
if($storyType == 'requirement') $stories = $requirements;
+ $finishClosedStory = $this->dao->select('product, count(1) as finish')->from(TABLE_STORY)
+ ->where('deleted')->eq(0)
+ ->andWhere('status')->eq('closed')
+ ->andWhere('closedReason')->eq('done')
+ ->fetchPairs('product', 'finish');
+
+ $unclosedStory = $this->dao->select('product, count(1) as unclosed')->from(TABLE_STORY)
+ ->where('deleted')->eq(0)
+ ->andWhere('status')->ne('closed')
+ ->fetchPairs('product', 'unclosed');
+
$plans = $this->dao->select('product, count(*) AS count')
->from(TABLE_PRODUCTPLAN)
->where('deleted')->eq(0)
@@ -1893,6 +1904,7 @@ class productModel extends model
$unResolved = $this->dao->select('product,count(*) AS count')
->from(TABLE_BUG)
->where('status')->eq('active')
+ ->orWhere('resolution')->eq('postponed')
->andWhere('product')->in($productKeys)
->andWhere('deleted')->eq(0)
->groupBy('product')
@@ -1951,7 +1963,10 @@ class productModel extends model
$stats = array();
foreach($products as $key => $product)
{
- $product->stories = $stories[$product->id];
+ $product->stories = $stories[$product->id];
+ $product->stories['finishClosed'] = isset($finishClosedStory[$product->id]) ? $finishClosedStory[$product->id] : 0;
+ $product->stories['unclosed'] = isset($unclosedStory[$product->id]) ? $unclosedStory[$product->id] : 0;
+
$product->requirements = $requirements[$product->id];
$product->plans = isset($plans[$product->id]) ? $plans[$product->id] : 0;
$product->releases = isset($releases[$product->id]) ? $releases[$product->id] : 0;
diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php
index 84557fe3c4..a3df9318b4 100644
--- a/module/product/view/all.html.php
+++ b/module/product/view/all.html.php
@@ -128,7 +128,8 @@
|
|
|
- % |
+
+ % |
|
% |
|
@@ -168,7 +169,8 @@
|
|
|
- % |
+
+ % |
|
% |
|
@@ -182,7 +184,7 @@
$product):?>
stories['active'] + $product->stories['closed'] + $product->stories['draft'] + $product->stories['changing'] + $product->stories['reviewing'];
+ $totalStories = $product->stories['finishClosed'] + $product->stories['unclosed'];
$trClass = '';
if($product->line and $this->config->systemMode == 'ALM')
@@ -231,7 +233,7 @@
stories['active'];?> |
stories['changing'];?> |
stories['reviewing'];?> |
- stories['closed'] / $totalStories, 3) * 100;?>% |
+ stories['finishClosed'] / $totalStories, 3) * 100;?>% |
unResolved;?> |
unResolved + $product->fixedBugs) == 0 ? 0 : round($product->fixedBugs / ($product->unResolved + $product->fixedBugs), 3) * 100;?>% |
plans;?> |
diff --git a/module/program/view/product.html.php b/module/program/view/product.html.php
index 81f240f1ec..7ef0ef45cf 100644
--- a/module/program/view/product.html.php
+++ b/module/program/view/product.html.php
@@ -70,7 +70,7 @@
- stories['active'] + $product->stories['closed'] + $product->stories['draft'] + $product->stories['changing'] + $product->stories['reviewing'];?>
+ stories['finishClosed'] + $product->stories['unclosed'];?>
|
@@ -95,7 +95,7 @@
| stories['active'];?> |
stories['changing'];?> |
stories['reviewing'];?> |
- stories['closed'] / $totalStories, 3) * 100;?>% |
+ stories['finishClosed'] / $totalStories, 3) * 100;?>% |
unResolved;?> |
unResolved + $product->fixedBugs) == 0 ? 0 : round($product->fixedBugs / ($product->unResolved + $product->fixedBugs), 3) * 100;?>% |
plans;?> |
diff --git a/module/screen/css/burn.css b/module/screen/css/burn.css
index f1be9ddee0..d7e5f4ded7 100644
--- a/module/screen/css/burn.css
+++ b/module/screen/css/burn.css
@@ -3,7 +3,7 @@
.title {padding-top:39px; padding-left:525px; white-space:nowrap; color:#B2D5E5; font-family: "Helvetica Neue",Helvetica,Tahoma,Arial,'PingFang SC','Source Han Sans CN','Source Han Sans','Source Han Serif','Hiragino Sans GB','WenQuanYi Micro Hei','Microsoft YaHei',sans-serif; letter-spacing:5px;}
.time {position:absolute; right:10px; top:30px; color:#eee}
+body {background:rgb(0,16,40);}
.content {display:flex; justify-content:center; margin-top: 20px;}
.burn {width: 1300px; display: flex; flex-wrap: wrap; justify-content: space-around; padding: 10px 0;}
-body {background:rgb(0,16,40);}
-.burn > .container {flex: 0 0 33%; margin-top: 40px; height: 370px; width: 370px;}
+.burn > .container {flex: 0 0 33%; margin-top: 40px; height: 370px; width: 370px; background-image:url("/static/images/burn_bg.png"); background-repeat:no-repeat; background-size: 100% 100%}
diff --git a/module/screen/view/burn.html.php b/module/screen/view/burn.html.php
index 75dcf390c4..4507e38f6b 100644
--- a/module/screen/view/burn.html.php
+++ b/module/screen/view/burn.html.php
@@ -79,7 +79,7 @@ function initBurnChar()
width: 2,
type: 'solid'
}
- }
+ },
},
series: [
{
diff --git a/www/static/images/burn_bg.png b/www/static/images/burn_bg.png
new file mode 100644
index 0000000000..087bc50c14
Binary files /dev/null and b/www/static/images/burn_bg.png differ