Exemplo n.º 1
0
 public function fetchArtifactValueReadOnly(Tracker_Artifact $artifact, Tracker_Artifact_ChangesetValue $value = null)
 {
     if (empty($value) || !$value->getTimestamp()) {
         return $this->field->getNoValueLabel();
     }
     $value_timestamp = $value->getTimestamp();
     $formatted_value = $value_timestamp ? $this->formatDateForDisplay($value_timestamp) : '';
     return $formatted_value;
 }
 /**
  * Check if there are changes between old and new value for this field
  *
  * @param Tracker_Artifact_ChangesetValue $old_value The data stored in the db
  * @param mixed                           $new_value May be string or array
  *
  * @return bool true if there are differences
  */
 public function hasChanges(Tracker_Artifact_ChangesetValue $old_value, $new_value)
 {
     return strtotime($this->formatDate($old_value->getTimestamp())) != strtotime($new_value);
 }