/**
  * Verifies the consistency of the imported Tracker
  * 
  * @return true if Tracler is ok 
  */
 public function testImport()
 {
     if (parent::testImport()) {
         if (!($this->default_properties['maxchars'] && $this->default_properties['size'])) {
             var_dump($this, 'Properties must be "maxchars" and "size"');
             return false;
         }
     }
     return true;
 }
 /**
  * Save the value and return the id
  * 
  * @param Tracker_Artifact                $artifact                The artifact
  * @param int                             $changeset_value_id      The id of the changeset_value 
  * @param mixed                           $value                   The value submitted by the user
  * @param Tracker_Artifact_ChangesetValue $previous_changesetvalue The data previously stored in the db
  *
  * @return int or array of int
  */
 protected function saveValue($artifact, $changeset_value_id, $value, Tracker_Artifact_ChangesetValue $previous_changesetvalue = null)
 {
     parent::saveValue($artifact, $changeset_value_id, $value, $previous_changesetvalue);
     ReferenceManager::instance()->extractCrossRef($value, $artifact->getId(), Tracker_Artifact::REFERENCE_NATURE, $this->getTracker()->getGroupID(), UserManager::instance()->getCurrentUser()->getId(), $this->getTracker()->getItemName());
 }
 /**
  * Verifies the consistency of the imported Tracker
  *
  * @return true if Tracler is ok
  */
 public function testImport()
 {
     if (parent::testImport()) {
         if (get_class($this) == 'Tracker_FormElement_Field_Text') {
             if (!(isset($this->default_properties['rows']) && isset($this->default_properties['cols']))) {
                 var_dump($this, 'Properties must be "rows" and "cols"');
                 return false;
             }
         } elseif (get_class($this) == 'Tracker_FormElement_Field_String') {
             if (!(isset($this->default_properties['maxchars']) && isset($this->default_properties['size']))) {
                 var_dump($this, 'Properties must be "maxchars" and "size"');
                 return false;
             }
         }
     }
     return true;
 }
 /**
  * Transform REST representation of field into something that artifact createArtifact or updateArtifact can proceed
  *
  * @return mixed
  */
 public function getFieldDataFromRESTValueByField(array $value, Tracker_Artifact $artifact = null)
 {
     if ($this->doesValueUseTheByFieldOutput($value)) {
         $text_value = $this->formatValueWithTheByFieldOutput($value);
         return $this->getRestFieldData($text_value);
     }
     return parent::getFieldDataFromRESTValueByField($value, $artifact);
 }