stable

Clone or download

Read-only

request #14545: Artifact export is broken when an attachment is deleted

Create an artifact. Add an attachment, submit. Delete an attachment, submit. Add another attachment, submit. Export the tracker: src/utils/php-launcher.sh src/utils/export_project_xml.php \ -p <project-id> \ -u admin \ -t <tracker-id> \ -o /path/to/archive.zip => you should not get an error Import the archive in another project src/utils/php-launcher.sh src/utils/import_project_xml.php \ -p <another-project-id> \ -u admin \ -i /path/to/archive.zip \ --automap no-email,create:A => the artifact is imported. only non-deleted attachments are imported. It should not break artifact move or copy. Change-Id: Iec0b8a0a7837b2f07316e1bdabd409801c4abc07

Modified Files

Name
M plugins/tracker/include/Tracker/Artifact/XMLExport.php +3 −0 Go to diff View file
M plugins/tracker/include/Tracker/XML/Exporter/ArtifactXMLExporter.php +15 −4 Go to diff View file
M plugins/tracker/include/Tracker/XML/Exporter/ArtifactXMLExporterBuilder.php +5 −4 Go to diff View file
M plugins/tracker/include/Tracker/XML/Exporter/ChangesetValue/ChangesetValueComputedXMLExporter.php +20 −0 Go to diff View file
M plugins/tracker/include/Tracker/XML/Exporter/ChangesetValue/ChangesetValueFileXMLExporter.class.php +8 −30 Go to diff View file
M plugins/tracker/include/Tracker/XML/Exporter/ChangesetValue/ChangesetValueXMLExporter.class.php +0 −20 Go to diff View file
A plugins/tracker/include/Tracker/XML/Exporter/FileInfoXMLExporter.php +88 −0 Go to diff View file
A plugins/tracker/phpunit/Tracker/XML/Exporter/ChangesetValue/Tracker_XML_Exporter_ChangesetValue_ChangesetValueFileXMLExporterTest.php +123 −0 Go to diff View file
A plugins/tracker/phpunit/Tracker/XML/Exporter/Tracker_XML_Exporter_ArtifactXMLExporterTest.php +97 −0 Go to diff View file
A plugins/tracker/phpunit/Tracker/XML/Exporter/Tracker_XML_Exporter_ChildrenXMLExporterTest.php +174 −0 Go to diff View file
D plugins/tracker/tests/Tracker/XML/Exporter/ArtifactXMLExporterTest.php +0 −86 Go to diff View file
D plugins/tracker/tests/Tracker/XML/Exporter/ChangesetValue/ChangesetValueFileXMLExporterTest.php +0 −211 Go to diff View file
D plugins/tracker/tests/Tracker/XML/Exporter/ChildrenXMLExporterTest.php +0 −141 Go to diff View file
A tests/phpunit/common/Tracker/XML/Exporter/FileInfoXMLExporterTest.php +109 −0 Go to diff View file