* @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 count_of_tested_story extends baseCalc { public $dataset = ''; public $fieldList = array(); public $result = 0; public function calculate($row) { if(strpos(',tested,verified,rejected,delivering,delivered,released,', ",$row->stage,") !== false || $row->closedReason == 'done') $this->result ++; } public function getResult($options = array()) { $records = array(array('value' => $this->result)); return $this->filterByOptions($records, $options); } }