* @package * @uses func * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html) * @Link https://www.zentao.net */ class progress_of_task_in_execution extends baseCalc { public $dataset = 'getExecutions'; public $fieldList = array('t1.id', 't1.progress'); public $result = array(); public function calculate($row) { $execution = $row->id; $progress = $row->progress; $this->result[$execution] = (float)$progress / 100; } public function getResult($options = array()) { $records = $this->getRecords(array('execution', 'value')); return $this->filterByOptions($records, $options); } }