/**
  * Will create and save to the database a new IssueFieldOption for this IssueField
  * @param string $strName
  * @return IssueFieldOption
  */
 public function CreateNewIssueFieldOption($strName)
 {
     $objIssueFieldOption = new IssueFieldOption();
     $objIssueFieldOption->IssueField = $this;
     $objIssueFieldOption->Name = trim($strName);
     $objIssueFieldOption->SetToken();
     $objIssueFieldOption->OrderNumber = $this->CountIssueFieldOptions() + 1;
     $objIssueFieldOption->ActiveFlag = true;
     $objIssueFieldOption->Save();
     return $objIssueFieldOption;
 }
function GenerateOptionsForField($strFieldName, $strOptionNameArray)
{
    $objIssueField = IssueField::QuerySingle(QQ::Equal(QQN::IssueField()->Name, $strFieldName));
    $intOrderNumber = 0;
    foreach ($strOptionNameArray as $strOptionName) {
        $intOrderNumber++;
        $objOption = new IssueFieldOption();
        $objOption->IssueField = $objIssueField;
        $objOption->Name = $strOptionName;
        $objOption->SetToken();
        $objOption->OrderNumber = $intOrderNumber;
        $objOption->ActiveFlag = true;
        $objOption->Save();
    }
}