* [bug#60959,done,0.5h] modify logic of dataset.
This commit is contained in:
@@ -22,7 +22,7 @@ class consume_of_all_in_project extends baseCalc
|
||||
{
|
||||
public $dataset = 'getProjectEfforts';
|
||||
|
||||
public $fieldList = array('t3.id as project', 't1.consumed');
|
||||
public $fieldList = array('t2.id as project', 't1.consumed');
|
||||
|
||||
public $result = array();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class day_of_invested_in_project extends baseCalc
|
||||
{
|
||||
public $dataset = 'getProjectEfforts';
|
||||
|
||||
public $fieldList = array('t3.id as project', 't1.consumed');
|
||||
public $fieldList = array('t2.id as project', 't1.consumed');
|
||||
|
||||
public $result = array();
|
||||
|
||||
|
||||
@@ -1176,13 +1176,12 @@ class dataset
|
||||
|
||||
$stmt = $this->dao->select("$fieldList, $defaultHours as defaultHours")
|
||||
->from(TABLE_EFFORT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution=t2.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t2.project=t3.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t3.deleted')->eq('0')
|
||||
->andWhere('t3.type')->eq('project');
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->andWhere('t2.type')->eq('project');
|
||||
|
||||
return $this->defaultWhere($stmt, 't3');
|
||||
return $this->defaultWhere($stmt, 't2');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user