private function commit_value($field, $value)
 {
     switch ($field) {
         case 'title':
         case 'description':
             break;
             // these pass through for special handling later
         // these pass through for special handling later
         case 'project':
             $this->issue->set_project_id($value);
             break;
         case 'assignee':
             $this->issue->set_assignee_id($value);
             break;
         case 'type':
             $this->issue->set_type($value);
             break;
         case 'status':
             $this->issue->set_status($value);
             break;
         case 'resolution':
             $this->issue->set_resolution($value);
             break;
         case 'priority':
             $this->issue->set_priority($value);
             break;
         default:
             do_action('buggypress_issue_commit_value', $value, $field);
             break;
     }
 }
 private function create_issue($data, BuggyPress_Issue $issue = NULL)
 {
     if (!isset($issue)) {
         $issue = new BuggyPress_Issue(0);
     }
     // TODO - security
     $args = array('post_title' => $data[BuggyPress_Form_Element_IssueTitle::FIELD_NAME], 'post_content' => $data[BuggyPress_Form_Element_IssueDescription::FIELD_NAME], 'post_status' => 'publish');
     $issue->save_post($args);
     $issue->set_project_id((int) $data[BuggyPress_Form_Element_IssueProject::FIELD_NAME]);
     $issue->set_assignee_id((int) $data[BuggyPress_Form_Element_IssueAssignee::FIELD_NAME]);
     $issue->set_type((int) $data[BuggyPress_Form_Element_IssueType::FIELD_NAME]);
     $issue->set_status((int) $data[BuggyPress_Form_Element_IssueStatus::FIELD_NAME]);
     $issue->set_priority((int) $data[BuggyPress_Form_Element_IssuePriority::FIELD_NAME]);
     $issue->set_resolution((int) $data[BuggyPress_Form_Element_IssueResolution::FIELD_NAME]);
     return $issue;
 }