* [perf story #69212] Adjust metric.
This commit is contained in:
@@ -24,11 +24,11 @@ class consume_of_devel_task_in_execution extends baseCalc
|
||||
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.execution', 't1.consumed', 't1.parent', 't1.type');
|
||||
public $fieldList = array('t1.execution', 't1.consumed', 't1.parent', 't1.type', 't1.isParent');
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if($row->parent == '-1' || $row->type != 'devel') return;
|
||||
if($row->isParent == '1' || $row->type != 'devel') return;
|
||||
if(!isset($this->result[$row->execution])) $this->result[$row->execution] = 0;
|
||||
$this->result[$row->execution] += $row->consumed;
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ class consume_of_frombug_task_in_execution extends baseCalc
|
||||
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.execution', 't1.consumed', 't1.parent', 't1.fromBug');
|
||||
public $fieldList = array('t1.execution', 't1.consumed', 't1.parent', 't1.fromBug', 't1.isParent');
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if($row->parent == '-1') return;
|
||||
if($row->isParent == '1') return;
|
||||
if($row->parent == '0' && $row->fromBug == 0) return;
|
||||
|
||||
if(!isset($this->result[$row->execution])) $this->result[$row->execution] = 0;
|
||||
|
||||
@@ -22,14 +22,13 @@ class consume_of_task_in_execution extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.execution', 't1.consumed', 't1.parent');
|
||||
public $fieldList = array('t1.execution', 't1.consumed', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return;
|
||||
if($row->isParent == '1') return;
|
||||
|
||||
if(!isset($this->result[$row->execution])) $this->result[$row->execution] = 0;
|
||||
$this->result[$row->execution] += $row->consumed;
|
||||
|
||||
@@ -24,11 +24,11 @@ class consume_of_test_task_in_execution extends baseCalc
|
||||
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.execution', 't1.consumed', 't1.parent', 't1.type');
|
||||
public $fieldList = array('t1.execution', 't1.consumed', 't1.parent', 't1.type', 't1.isParent');
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if($row->parent == '-1' || $row->type != 'test') return;
|
||||
if($row->isParent == '1' || $row->type != 'test') return;
|
||||
|
||||
if(!isset($this->result[$row->execution])) $this->result[$row->execution] = 0;
|
||||
$this->result[$row->execution] += $row->consumed;
|
||||
|
||||
@@ -22,16 +22,13 @@ class estimate_of_task_in_execution extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.execution', 't1.estimate', 't1.parent', 't1.status');
|
||||
public $fieldList = array('t1.execution', 't1.estimate', 't1.parent', 't1.status', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
$status = $row->status;
|
||||
|
||||
if($parent == '-1' || $status == 'cancel') return false;
|
||||
if($row->isParent == '1' || $row->status == 'cancel') return false;
|
||||
|
||||
if(!isset($this->result[$row->execution])) $this->result[$row->execution] = 0;
|
||||
$this->result[$row->execution] += $row->estimate;
|
||||
|
||||
@@ -22,16 +22,13 @@ class left_of_task_in_execution extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.execution', 't1.left', 't1.parent', 't1.status');
|
||||
public $fieldList = array('t1.execution', 't1.left', 't1.parent', 't1.status', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
$status = $row->status;
|
||||
|
||||
if($parent == '-1' || $status == 'cancel') return false;
|
||||
if($row->isParent == '1' || $row->status == 'cancel' || $row->status == 'closed') return false;
|
||||
|
||||
if(!isset($this->result[$row->execution])) $this->result[$row->execution] = 0;
|
||||
$this->result[$row->execution] += $row->left;
|
||||
|
||||
@@ -24,11 +24,11 @@ class consume_rate_of_frombug_task_in_execution extends baseCalc
|
||||
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.execution', 't1.consumed', 't1.parent', 't1.fromBug');
|
||||
public $fieldList = array('t1.execution', 't1.consumed', 't1.parent', 't1.fromBug', 't1.isParent');
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if($row->parent == '-1') return;
|
||||
if($row->isParent == '1') return;
|
||||
|
||||
if(!isset($this->result[$row->execution])) $this->result[$row->execution] = array('fromBug' => 0, 'total' => 0);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class scale_of_story_in_execution extends baseCalc
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if($row->isParent == 1) return;
|
||||
if($row->isParent == '1') return;
|
||||
if(!isset($this->result[$row->project])) $this->result[$row->project] = 0;
|
||||
$this->result[$row->project] += $row->estimate;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class scale_of_annual_closed_story_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = 'getDevStories';
|
||||
|
||||
public $fieldList = array('t1.product', 't1.closedDate', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.product', 't1.closedDate', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
@@ -31,9 +31,8 @@ class scale_of_annual_closed_story_in_product extends baseCalc
|
||||
$product = $data->product;
|
||||
$closedDate = $data->closedDate;
|
||||
$estimate = $data->estimate;
|
||||
$parent = $data->parent;
|
||||
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
$year = $this->getYear($closedDate);
|
||||
if(!$year) return false;
|
||||
@@ -49,10 +48,7 @@ class scale_of_annual_closed_story_in_product extends baseCalc
|
||||
$records = array();
|
||||
foreach($this->result as $product => $years)
|
||||
{
|
||||
foreach($years as $year => $value)
|
||||
{
|
||||
$records[] = array('product' => $product, 'year' => $year, 'value' => $value);
|
||||
}
|
||||
foreach($years as $year => $value) $records[] = array('product' => $product, 'year' => $year, 'value' => $value);
|
||||
}
|
||||
|
||||
return $this->filterByOptions($records, $options);
|
||||
|
||||
@@ -22,7 +22,7 @@ class scale_of_annual_delivered_story_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = 'getDevStories';
|
||||
|
||||
public $fieldList = array('t1.product', 't1.stage', 't1.releasedDate', 't1.closedReason', 't1.closedDate', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.product', 't1.stage', 't1.releasedDate', 't1.closedReason', 't1.closedDate', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
@@ -34,9 +34,8 @@ class scale_of_annual_delivered_story_in_product extends baseCalc
|
||||
$closedReason = $row->closedReason;
|
||||
$closedDate = $row->closedDate;
|
||||
$estimate = $row->estimate;
|
||||
$parent = $row->parent;
|
||||
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
$year = null;
|
||||
if($stage == 'released')
|
||||
|
||||
@@ -22,7 +22,7 @@ class scale_of_annual_finished_story_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = 'getDevStories';
|
||||
|
||||
public $fieldList = array('t1.product', 't1.closedDate', 't1.closedReason', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.product', 't1.closedDate', 't1.closedReason', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
@@ -32,9 +32,8 @@ class scale_of_annual_finished_story_in_product extends baseCalc
|
||||
$closedDate = $data->closedDate;
|
||||
$closedReason = $data->closedReason;
|
||||
$estimate = $data->estimate;
|
||||
$parent = $data->parent;
|
||||
|
||||
if($parent == '-1') return false;
|
||||
if($data->isParent == '1') return false;
|
||||
|
||||
$year = $this->getYear($closedDate);
|
||||
if(!$year) return false;
|
||||
|
||||
@@ -22,7 +22,7 @@ class scale_of_monthly_finished_story_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = 'getDevStories';
|
||||
|
||||
public $fieldList = array('t1.product', 't1.closedDate', 't1.closedReason', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.product', 't1.closedDate', 't1.closedReason', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
@@ -32,10 +32,8 @@ class scale_of_monthly_finished_story_in_product extends baseCalc
|
||||
$closedDate = $data->closedDate;
|
||||
$closedReason = $data->closedReason;
|
||||
$estimate = $data->estimate;
|
||||
$parent = $data->parent;
|
||||
|
||||
if($parent == '-1') return false;
|
||||
|
||||
if($row->isParent == '1') return false;
|
||||
if($closedReason != 'done') return false;
|
||||
|
||||
$year = $this->getYear($closedDate);
|
||||
|
||||
@@ -22,7 +22,7 @@ class scale_of_story_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = 'getDevStories';
|
||||
|
||||
public $fieldList = array('t1.product', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.product', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
@@ -30,9 +30,8 @@ class scale_of_story_in_product extends baseCalc
|
||||
{
|
||||
$product = $data->product;
|
||||
$estimate = $data->estimate;
|
||||
$parent = $data->parent;
|
||||
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
if(!isset($this->result[$product])) $this->result[$product] = 0;
|
||||
|
||||
|
||||
@@ -22,14 +22,13 @@ class consume_of_task_in_project extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.consumed', 't1.project', 't1.parent');
|
||||
public $fieldList = array('t1.consumed', 't1.project', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return;
|
||||
if($row->isParent == '1') return;
|
||||
|
||||
if(!isset($this->result[$row->project])) $this->result[$row->project] = 0;
|
||||
$this->result[$row->project] += $row->consumed;
|
||||
|
||||
@@ -22,16 +22,13 @@ class estimate_of_task_in_project extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.estimate', 't1.project', 't1.parent', 't1.status');
|
||||
public $fieldList = array('t1.estimate', 't1.project', 't1.parent', 't1.status', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
$status = $row->status;
|
||||
|
||||
if($parent == '-1' || $status == 'cancel') return false;
|
||||
if($row->isParent == '1' || $row->status == 'cancel') return false;
|
||||
|
||||
if(!isset($this->result[$row->project])) $this->result[$row->project] = 0;
|
||||
$this->result[$row->project] += $row->estimate;
|
||||
|
||||
@@ -22,16 +22,13 @@ class left_of_task_in_project extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.left', 't1.project', 't1.parent', 't1.status');
|
||||
public $fieldList = array('t1.left', 't1.project', 't1.parent', 't1.status', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
$status = $row->status;
|
||||
|
||||
if($parent == '-1' || $status == 'cancel') return false;
|
||||
if($row->isParent == '1' || $row->status == 'cancel' || $row->status == 'closed') return false;
|
||||
|
||||
if(!isset($this->result[$row->project])) $this->result[$row->project] = 0;
|
||||
$this->result[$row->project] += $row->left;
|
||||
|
||||
@@ -22,7 +22,7 @@ class scale_of_annual_finished_story_in_project extends baseCalc
|
||||
{
|
||||
public $dataset = 'getDevStoriesWithProject';
|
||||
|
||||
public $fieldList = array('t3.project', 't1.closedDate', 't1.closedReason', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t3.project', 't1.closedDate', 't1.closedReason', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
@@ -30,9 +30,8 @@ class scale_of_annual_finished_story_in_project extends baseCalc
|
||||
{
|
||||
$project = $row->project;
|
||||
$closedDate = $row->closedDate;
|
||||
$parent = $row->parent;
|
||||
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
$year = $this->getYear($closedDate);
|
||||
if(!$year) return false;
|
||||
|
||||
@@ -22,15 +22,13 @@ class consume_of_task extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.consumed', 't1.parent');
|
||||
public $fieldList = array('t1.consumed', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = 0;
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
|
||||
if($row->isParent == '1') return false;
|
||||
if(empty($row->consumed)) return false;
|
||||
|
||||
$this->result += $row->consumed;
|
||||
|
||||
@@ -22,18 +22,14 @@ class estimate_of_annual_closed_project extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.estimate', 't1.parent', 't3.status', 't3.closedDate', 't1.parent', 't2.status');
|
||||
public $fieldList = array('t1.estimate', 't1.parent', 't1.status', 't1.isParent', 't3.status AS projectStatus', 't3.closedDate');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
$status = $row->status;
|
||||
|
||||
if($parent == '-1' || $status == 'cancel') return false;
|
||||
|
||||
if($row->status != 'closed' || empty($row->closedDate) || $row->parent == -1) return false;
|
||||
if($row->isParent == '1' || $row->status == 'cancel') return false;
|
||||
if($row->projectStatus != 'closed' || empty($row->closedDate)) return false;
|
||||
|
||||
$year = $this->getYear($row->closedDate);
|
||||
|
||||
|
||||
@@ -22,15 +22,13 @@ class estimate_of_task extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = 0;
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
|
||||
if($row->isParent == '1') return false;
|
||||
if(empty($row->estimate)) return false;
|
||||
|
||||
$this->result += $row->estimate;
|
||||
|
||||
@@ -22,15 +22,13 @@ class left_of_task extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.left', 't1.parent');
|
||||
public $fieldList = array('t1.left', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = 0;
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
|
||||
if($row->isParent == '1') return false;
|
||||
if(empty($row->left)) return false;
|
||||
|
||||
$this->result += $row->left;
|
||||
|
||||
@@ -22,14 +22,13 @@ class scale_of_annual_closed_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('t1.estimate', 't1.status', 't1.closedDate', 't1.parent');
|
||||
public $fieldList = array('t1.estimate', 't1.status', 't1.closedDate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
if(empty($row->closedDate) or !isset($row->estimate)) return false;
|
||||
|
||||
|
||||
@@ -22,14 +22,13 @@ class scale_of_annual_delivered_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('t1.stage', 't1.releasedDate', 't1.closedReason', 't1.closedDate', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.stage', 't1.releasedDate', 't1.closedReason', 't1.closedDate', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
$date = null;
|
||||
if($row->closedReason == 'done') $date = $row->closedDate;
|
||||
|
||||
@@ -22,14 +22,13 @@ class scale_of_annual_finished_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('t1.estimate', 't1.status', 't1.closedDate', 't1.closedReason', 't1.parent');
|
||||
public $fieldList = array('t1.estimate', 't1.status', 't1.closedDate', 't1.closedReason', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
if(empty($row->closedDate) or !isset($row->estimate)) return false;
|
||||
|
||||
|
||||
@@ -22,15 +22,13 @@ class scale_of_finished_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('t1.estimate', 't1.closedReason', 't1.parent');
|
||||
public $fieldList = array('t1.estimate', 't1.closedReason', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = 0;
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
|
||||
if($row->isParent == '1') return false;
|
||||
if(empty($row->estimate)) return null;
|
||||
|
||||
if($row->closedReason == 'done') $this->result += $row->estimate;
|
||||
|
||||
@@ -22,14 +22,13 @@ class scale_of_invalid_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('t1.estimate', 't1.closedReason', 't1.parent');
|
||||
public $fieldList = array('t1.estimate', 't1.closedReason', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = 0;
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
if(empty($row->estimate)) return null;
|
||||
|
||||
|
||||
@@ -22,15 +22,13 @@ class scale_of_monthly_closed_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('t1.status', 't1.closedDate', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.status', 't1.closedDate', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
|
||||
if($row->isParent == '1') return false;
|
||||
if(empty($row->closedDate) || $row->status != 'closed') return false;
|
||||
|
||||
$year = $this->getYear($row->closedDate);
|
||||
|
||||
@@ -22,14 +22,13 @@ class scale_of_monthly_delivered_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('t1.stage', 't1.releasedDate', 't1.closedReason', 't1.closedDate', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.stage', 't1.releasedDate', 't1.closedReason', 't1.closedDate', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
$date = null;
|
||||
if($row->closedReason == 'done') $date = $row->closedDate;
|
||||
|
||||
@@ -22,14 +22,13 @@ class scale_of_monthly_finished_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('t1.closedDate', 't1.closedReason', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.closedDate', 't1.closedReason', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
if(empty($row->closedDate) || $row->closedReason != 'done') return false;
|
||||
|
||||
|
||||
@@ -22,14 +22,13 @@ class scale_of_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('t1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = 0;
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
if(empty($row->estimate)) return null;
|
||||
|
||||
|
||||
@@ -22,15 +22,13 @@ class scale_of_valid_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('t1.estimate', 't1.closedReason', 't1.parent');
|
||||
public $fieldList = array('t1.estimate', 't1.closedReason', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = 0;
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
|
||||
if($row->isParent == '1') return false;
|
||||
if(empty($row->estimate)) return null;
|
||||
|
||||
if(!in_array($row->closedReason, array('duplicate', 'willnotdo', 'bydesign', 'cancel'))) $this->result += $row->estimate;
|
||||
|
||||
@@ -22,14 +22,13 @@ class scale_of_weekly_finished_story extends baseCalc
|
||||
{
|
||||
public $dataset = 'getStories';
|
||||
|
||||
public $fieldList = array('t1.status', 't1.closedReason', 't1.closedDate', 't1.estimate', 't1.parent');
|
||||
public $fieldList = array('t1.status', 't1.closedReason', 't1.closedDate', 't1.estimate', 't1.parent', 't1.isParent');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$parent = $row->parent;
|
||||
if($parent == '-1') return false;
|
||||
if($row->isParent == '1') return false;
|
||||
|
||||
$year = $this->getYear($row->closedDate);
|
||||
$week = $this->getWeek($row->closedDate);
|
||||
|
||||
@@ -1150,9 +1150,7 @@ class metricModel extends model
|
||||
$record->calcType = $calcType;
|
||||
$record->calculatedBy = $calcType == 'inference' ? $this->app->user->account : 'system';
|
||||
|
||||
$sql = $this->dao->insert(TABLE_METRICLIB)
|
||||
->data($record)
|
||||
->get();
|
||||
$sql = $this->dao->insert(TABLE_METRICLIB)->data($record)->get();
|
||||
|
||||
$position = strpos($sql, 'VALUES');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user