public function setFieldAvailableForIssuetype(Issuetype $issuetype, $key, $details = array()) { tables\IssueFields::getTable()->addFieldAndDetailsBySchemeIDandIssuetypeID($this->getID(), $issuetype->getID(), $key, $details); }
/** * Move issues from one step to another for a given issue type and conversions * @param \thebuggenie\core\entities\Project $project * @param \thebuggenie\core\entities\Issuetype $type * @param array $conversions * * $conversions should be an array containing arrays: * array ( * array(oldstep, newstep) * ... * ) */ public function convertIssueStepByIssuetype(\thebuggenie\core\entities\Project $project, \thebuggenie\core\entities\Issuetype $type, array $conversions) { foreach ($conversions as $conversion) { $crit = $this->getCriteria(); $crit->addWhere(self::PROJECT_ID, $project->getID()); $crit->addWhere(self::ISSUE_TYPE, $type->getID()); $crit->addWhere(self::WORKFLOW_STEP_ID, $conversion[0]); $crit->addUpdate(self::WORKFLOW_STEP_ID, $conversion[1]); $this->doUpdate($crit); } }
/** * Get the workflow associated with this issue type * * @return Workflow The associated workflow for this issue type */ public function getWorkflowForIssuetype(\thebuggenie\core\entities\Issuetype $issuetype) { $this->_populateAssociatedWorkflows(); if (array_key_exists($issuetype->getID(), $this->_issuetype_workflows)) { return $this->_issuetype_workflows[$issuetype->getID()]; } else { return \thebuggenie\core\framework\Settings::getCoreWorkflow(); } }