/** * @param SQL_STORAGE $storage Store values to this object. * @access private */ public function store_to($storage) { parent::store_to($storage); $tname = $this->secondary_table_name(); $storage->add($tname, 'branch_status', Field_type_integer, $this->status); $storage->add($tname, 'branch_priority', Field_type_integer, $this->priority); $storage->add($tname, 'branch_closer_id', Field_type_integer, $this->closer_id); if ($this->closer_id) { $storage->add($tname, 'branch_time_closed', Field_type_date_time, $this->time_closed); } $storage->add($tname, 'branch_time_status_changed', Field_type_date_time, $this->time_status_changed); }
/** * Record differences for two branches. * @param PROJECT_ENTRY_BRANCH_INFO $orig_branch * @param PROJECT_ENTRY_BRANCH_INFO $new_branch * @access private */ protected function _record_branch_differences($orig_branch, $new_branch) { if ($orig_branch->release_id != $new_branch->release_id) { $branch_title = $orig_branch->title_as_plain_text(); $this->_record_object_difference("Release for branch [{$branch_title}]", $orig_branch->release(), $new_branch->release(), 'Current'); } }
/** * Draw the "path" to the entry. * Takes the visibility properties into account to determine whether to show * the component/project/release/branch. * @param PROJECT_ENTRY $obj * @param PROJECT_ENTRY_BRANCH_INFO $branch_info */ protected function _draw_context_in_project_for($obj, $branch_info) { if ($this->show_folder || $this->show_branch || $this->show_release || $this->show_component) { $menu = $this->context->make_menu(); $menu->renderer->separator_class = $this->app->display_options->object_class; if ($this->show_folder) { $folder = $obj->parent_folder(); $menu->append($folder->title_as_link()); } if ($this->show_component && $obj->component_id) { $comp = $obj->component(); $menu->append($comp->title_as_link()); } if ($this->show_branch) { $branch = $obj->main_branch(); $menu->append($branch->title_as_link()); } if ($this->show_release) { $rel = $branch_info->release(); if (isset($rel)) { $menu->append($rel->title_as_link()); } } $menu->display(); } }
/** * @param SQL_STORAGE $storage Store values to this object. * @access private */ public function store_to($storage) { parent::store_to($storage); $tname = $this->secondary_table_name(); $storage->add($tname, 'branch_applier_id', Field_type_integer, $this->applier_id); $storage->add($tname, 'branch_time_applied', Field_type_date_time, $this->time_applied); }
/** * Load the branch information into the form. * This is called once for each branch that is enabled on a loaded object. * @param PROJECT_ENTRY_BRANCH_INFO $branch_info * @access private */ protected function _load_from_branch_info($branch_info) { $id = $branch_info->branch_id; $show_branch = true; if ($this->cloning()) { $branch = $branch_info->branch(); $show_branch = !$branch->locked(); if (!$show_branch && $this->value_for('main_branch_id') == $id) { $this->set_value('main_branch_id', 0); } if ($show_branch && !$this->value_for('main_branch_id')) { $this->set_value('main_branch_id', $id); } } $this->set_value("branch_{$id}_enabled", $show_branch); $this->set_enabled("branch_{$id}_release_id", true); $this->set_value("branch_{$id}_release_id", $branch_info->release_id); }