* Fix release date in metric.
This commit is contained in:
@@ -22,15 +22,15 @@ class count_of_annual_created_release_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = 'getProductReleases';
|
||||
|
||||
public $fieldList = array('t1.id', 't1.product', 't1.createdDate');
|
||||
public $fieldList = array('t1.id', 't1.product', 't1.date');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if(empty($row->createdDate)) return null;
|
||||
if(empty($row->date)) return null;
|
||||
|
||||
$year = substr($row->createdDate, 0, 4);
|
||||
$year = substr($row->date, 0, 4);
|
||||
if($year == '0000') return null;
|
||||
|
||||
if(!isset($this->result[$year])) $this->result[$year] = array();
|
||||
|
||||
@@ -22,14 +22,14 @@ class count_of_monthly_created_release_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = 'getProductReleases';
|
||||
|
||||
public $fieldList = array('t1.id', 't1.product', 't1.createdDate');
|
||||
public $fieldList = array('t1.id', 't1.product', 't1.date');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$product = $row->product;
|
||||
$createdDate = $row->createdDate;
|
||||
$createdDate = $row->date;
|
||||
|
||||
if(empty($createdDate)) return false;
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ class count_of_weekly_created_release extends baseCalc
|
||||
{
|
||||
public $dataset = 'getReleases';
|
||||
|
||||
public $fieldList = array('t1.createdDate');
|
||||
public $fieldList = array('t1.date');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$year = $this->getYear($row->createdDate);
|
||||
$week = $this->getWeek($row->createdDate);
|
||||
$year = $this->getYear($row->date);
|
||||
$week = $this->getWeek($row->date);
|
||||
|
||||
if(!$year) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user