/** * Perform any setup needed on each returned object. * @param PROJECT_ENTRY $obj * @access private */ protected function _prepare_object($obj) { parent::_prepare_object($obj); $branch_info = $obj->main_branch_info(); $branch_info->release_id = $this->db->f('release_id'); switch ($obj->type) { case 'job': $branch_info->status = $this->db->f('status'); $branch_info->priority = $this->db->f('priority'); $branch_info->time_closed->set_from_iso($this->db->f('time_closed')); $branch_info->closer_id = $this->db->f('closer_id'); $branch_info->time_status_changed->set_from_iso($this->db->f('time_status_changed')); break; case 'change': $branch_info->applier_id = $this->db->f('applier_id'); $branch_info->time_applied->set_from_iso($this->db->f('time_applied')); break; } }
/** * Apply default restrictions and tables. */ public function apply_defaults() { parent::apply_defaults(); $this->set_day_field('entry.date'); $this->order_by_recent(); }