diff --git a/tests-qa/acceptance/030_Geokrety/010_GeokretyCreation/070_EditGeoKretBirth.robot b/tests-qa/acceptance/030_Geokrety/010_GeokretyCreation/070_EditGeoKretBirth.robot index a51c40036f..3a4ec30b7c 100644 --- a/tests-qa/acceptance/030_Geokrety/010_GeokretyCreation/070_EditGeoKretBirth.robot +++ b/tests-qa/acceptance/030_Geokrety/010_GeokretyCreation/070_EditGeoKretBirth.robot @@ -195,8 +195,8 @@ Shown In Export Should Be Equal ${root.tag} gkxml ${first_gk} = Get Element ${root} geokret - ${datecreated} = Get Element ${first_gk} datecreated - XML.Element Text Should Be ${datecreated} ${expected} + ${birthdate} = Get Element ${first_gk} birthdate + XML.Element Text Should Be ${birthdate} ${expected} Shown In Export2 @@ -225,8 +225,8 @@ Shown In Export2Details ${first_gk} = Get Element ${root} geokrety/geokret - ${datecreated} = Get Element ${first_gk} datecreated - XML.Element Text Should Be ${datecreated} ${expected} + ${birthdate} = Get Element ${first_gk} birthdate + XML.Element Text Should Be ${birthdate} ${expected} *** Keywords *** diff --git a/website/app/GeoKrety/Service/Xml/GeokretyExport.php b/website/app/GeoKrety/Service/Xml/GeokretyExport.php index 3cf4c58635..d15229a8e7 100644 --- a/website/app/GeoKrety/Service/Xml/GeokretyExport.php +++ b/website/app/GeoKrety/Service/Xml/GeokretyExport.php @@ -40,8 +40,11 @@ public function addGeokret(Geokret &$geokret) { $xml->endElement(); // owner } - $xml->writeElement('datecreated', $geokret->born_on_datetime->format('Y-m-d H:i:s')); - $xml->writeElement('datecreated_Iso8601', $geokret->born_on_datetime->format(\DateTime::ATOM)); + $xml->writeElement('birthdate', $geokret->born_on_datetime->format('Y-m-d H:i:s')); + $xml->writeElement('birthdate_Iso8601', $geokret->born_on_datetime->format(\DateTime::ATOM)); + + $xml->writeElement('datecreated', $geokret->created_on_datetime->format('Y-m-d H:i:s')); + $xml->writeElement('datecreated_Iso8601', $geokret->created_on_datetime->format(\DateTime::ATOM)); $xml->writeElement('distancetravelled', $geokret->distance); $xml->writeAttribute('note', 'legacy bug compatibility'); diff --git a/website/app/GeoKrety/Service/Xml/GeokretyExport2Details.php b/website/app/GeoKrety/Service/Xml/GeokretyExport2Details.php index 94daf532aa..79892476b0 100644 --- a/website/app/GeoKrety/Service/Xml/GeokretyExport2Details.php +++ b/website/app/GeoKrety/Service/Xml/GeokretyExport2Details.php @@ -34,13 +34,21 @@ public function addGeokret(Geokret &$geokret) { } $xml->startElement('datecreated'); - $xml->writeCData($geokret->born_on_datetime->format('Y-m-d H:i:s')); + $xml->writeCData($geokret->created_on_datetime->format('Y-m-d H:i:s')); $xml->endElement(); // datecreated $xml->startElement('datecreated_Iso8601'); $xml->writeCData($geokret->created_on_datetime->format(\DateTimeInterface::ATOM)); $xml->endElement(); // datecreated_Iso8601 + $xml->startElement('birthdate'); + $xml->writeCData($geokret->born_on_datetime->format('Y-m-d H:i:s')); + $xml->endElement(); // birthdate + + $xml->startElement('birthdate_Iso8601'); + $xml->writeCData($geokret->born_on_datetime->format(\DateTimeInterface::ATOM)); + $xml->endElement(); // birthdate_Iso8601 + $xml->startElement('dateupdated'); $xml->writeCData($geokret->updated_on_datetime->format('Y-m-d H:i:s')); $xml->endElement(); // dateupdated