public function exportFullHistory(SimpleXMLElement $artifact_xml, Tracker_Artifact_Changeset $changeset) { $changeset_xml = $artifact_xml->addChild('changeset'); $this->user_xml_exporter->exportUserByUserId($changeset->getSubmittedBy(), $changeset_xml, 'submitted_by'); $submitted_on = $changeset_xml->addChild('submitted_on', date('c', $changeset->getSubmittedOn())); $submitted_on->addAttribute('format', 'ISO8601'); $comments_node = $changeset_xml->addChild('comments'); if ($changeset->getComment()) { $changeset->getComment()->exportToXML($comments_node); } $this->values_exporter->exportChangedFields($artifact_xml, $changeset_xml, $changeset->getArtifact(), $changeset->getValues()); }
public function format(Tracker_Artifact_Changeset $changeset) { return array('id' => $changeset->getId(), 'submitted_by' => $changeset->getSubmittedBy(), 'submitted_on' => date('c', $changeset->getSubmittedOn()), 'email' => $changeset->getEmail(), 'html' => $this->getChangeContentForJson($changeset)); }
/** * Get the value of this field * * @param Tracker_Artifact_Changeset $changeset The changeset (needed in only few cases like 'lud' field) * @param int $value_id The id of the value * @param boolean $has_changed If the changeset value has changed from the rpevious one * * @return Tracker_Artifact_ChangesetValue or null if not found */ public function getChangesetValue($changeset, $value_id, $has_changed) { $changeset_value = new Tracker_Artifact_ChangesetValue_Date($value_id, $this, $has_changed, $changeset->getSubmittedOn()); return $changeset_value; }
public function time() { return DateHelper::timeAgoInWords($this->changeset->getSubmittedOn()); }
public function getFullRESTValue(PFUser $user, Tracker_Artifact_Changeset $changeset) { $classname_with_namespace = 'Tuleap\\Tracker\\REST\\Artifact\\ArtifactFieldValueFullRepresentation'; $artifact_field_value_full_representation = new $classname_with_namespace(); $artifact_field_value_full_representation->build($this->getId(), Tracker_FormElementFactory::instance()->getType($this), $this->getLabel(), date('c', $changeset->getSubmittedOn())); return $artifact_field_value_full_representation; }