stable

Clone or download

Read-only

story #8170: export/import attachments

The project export and import process is now able to export/import artifact attachments. Please note that attachments are not historized. We export attachments that are linked to the artifact in its last changeset. This change has no impact on artifact copy and on tv3 to tv5 migration. Be careful, we have to run this script as `codendiadm` in order to have to good access rigths in the imported attachments. Change-Id: I9252c97ebac5624089406e332ba679ada4aec897

Modified Files

Name
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact.class.php +21 −4 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLExport.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImport/ArtifactFieldsDataBuilder.class.php +1 −1 Go to diff View file
R plugins/tracker/include/Tracker/Artifact/XMLImport/Exception/NoAttachementsException.class.php Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImport/XMLImportFieldStrategyAttachment.class.php +21 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImport/XMLImportZipArchive.class.php +9 −31 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElementFactory.class.php +8 −0 Go to diff View file
M plugins/tracker/include/Tracker/Tracker.class.php +10 −3 Go to diff View file
A plugins/tracker/include/Tracker/XML/Exporter/ArtifactAttachmentExporter.php +62 −0 Go to diff View file
M plugins/tracker/include/Tracker/XML/Exporter/ArtifactXMLExporterBuilder.php +2 −1 Go to diff View file
M plugins/tracker/include/Tracker/XML/Exporter/ChangesetValue/ChangesetValueFileXMLExporter.class.php +35 −0 Go to diff View file
A plugins/tracker/include/Tracker/XML/Exporter/InArchiveFilePathXMLExporter.php +34 −0 Go to diff View file
M plugins/tracker/include/TrackerXmlExport.class.php +2 −2 Go to diff View file
M plugins/tracker/include/TrackerXmlImport.class.php +22 −10 Go to diff View file
M plugins/tracker/include/autoload.php +5 −3 Go to diff View file
M plugins/tracker/include/trackerPlugin.class.php +6 −2 Go to diff View file
M plugins/tracker/tests/Artifact/XMLExportTest.php +15 −4 Go to diff View file
R plugins/tracker/tests/Artifact/XMLImport/XMLImportZipArchiveTestPHP53.php Go to diff View file
A plugins/tracker/tests/Tracker/XML/Exporter/ArtifactAttachmentExporterTest.php +94 −0 Go to diff View file
M plugins/tracker/tests/Tracker/XML/Exporter/ChangesetValue/ChangesetValueFileXMLExporterTest.php +45 −3 Go to diff View file
A plugins/tracker/tests/Tracker/XML/Exporter/_fixtures/file01.txt +1 −0 Go to diff View file
M plugins/tracker/tests/TrackerXmlExportTest.php +3 −1 Go to diff View file
M plugins/tracker/tests/TrackerXmlImportTest.php +19 −12 Go to diff View file
M plugins/tracker/tests/Tracker_ArtifactTest.php +16 −5 Go to diff View file
M plugins/tracker/www/resources/artifact-definition.rnc +1 −1 Go to diff View file
M plugins/tracker/www/resources/artifact-definition.rng +5 −3 Go to diff View file
M src/common/autoload.php +5 −3 Go to diff View file
M src/common/event/Event.class.php +2 −0 Go to diff View file
M src/common/project/ProjectXMLExporter.class.php +11 −4 Go to diff View file
M src/common/project/ProjectXMLImporter.class.php +27 −12 Go to diff View file
A src/common/project/ProjectXMLImporterZipArchive.php +52 −0 Go to diff View file
A src/common/xml/XMLImportZipArchive.php +68 −0 Go to diff View file
M src/utils/export_project_xml.php +1 −1 Go to diff View file
M tests/simpletest/common/project/ProjectXMLExporterTest.php +3 −1 Go to diff View file
M tests/simpletest/common/project/ProjectXMLImporterTest.php +4 −1 Go to diff View file
A tests/simpletest/common/project/XMLImportZipArchiveTest.php +100 −0 Go to diff View file
A tests/simpletest/common/project/_fixtures/archive.zip Binary file Go to diff View file
A tests/simpletest/common/project/_fixtures/data/Artifact69 +1 −0 Go to diff View file
A tests/simpletest/common/project/_fixtures/project.xml +1336 −0 Go to diff View file