stable

Clone or download

Read-only

Refactor Jira import to prepare for multiple import

Conversion from Jira data structures relied on hardcoded ids. That worked well for the import of a single issueType but as soon as you want to import more than one, that no longer work. This refactoring should not change anything functionaly speaking but ensures that IDs in the tuleap XML format are unique. This also remove the dependency on `StatusValuesTransformer`, list values are passed explicitely to the FieldMapping in order to ensure the uniquness. Part of story #18859 import a whole Jira project in CLI Change-Id: I8ecb8904d7777d569988396f411054b633a85959

Modified Files

Name
M plugins/tracker/include/Tracker/Creation/JiraImporter/FromJiraTrackerCreator.php +2 −1 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Artifact/FieldChangeXMLExporter.php +32 −19 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/JiraXmlExporter.php +39 −41 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Reports/IExportJiraLikeXmlReport.php +2 −0 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Reports/XmlReportAllIssuesExporter.php +2 −0 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Reports/XmlReportCreatedRecentlyExporter.php +2 −0 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Reports/XmlReportDoneIssuesExporter.php +4 −10 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Reports/XmlReportExporter.php +7 −0 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Reports/XmlReportOpenIssuesExporter.php +4 −10 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Reports/XmlReportUpdatedRecentlyExporter.php +2 −0 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Semantic/SemanticsXMLExporter.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/ContainersXMLCollection.php +14 −0 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/ContainersXMLCollectionBuilder.php +6 −10 Go to diff View file
R plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Values/StatusValuesTransformer.php Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/FieldMapping.php +6 −55 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/FieldMappingCollection.php +14 −0 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/FieldXmlExporter.php +24 −12 Go to diff View file
A plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/IDGenerator.php +29 −0 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/JiraFieldAPIAllowedValueRepresentation.php +32 −15 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/JiraFieldAPIRepresentation.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/JiraFieldRetriever.php +3 −2 Go to diff View file
A plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/ListFieldMapping.php +116 −0 Go to diff View file
A plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Structure/ScalarFieldMapping.php +84 −0 Go to diff View file
M plugins/tracker/include/Tracker/Creation/JiraImporter/Import/Values/StatusValuesCollection.php +6 −4 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/AlwaysThereFieldsExporterTest.php +12 −5 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Artifact/ArtifactsXMLExporterTest.php +8 −13 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Artifact/Changelog/ListFieldChangeInitialValueRetrieverTest.php +10 −7 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Artifact/FieldChangeXMLExporterTest.php +86 −27 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Artifact/Snapshot/ChangelogSnapshotBuilderTest.php +30 −30 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Artifact/Snapshot/CurrentSnapshotBuilderTest.php +14 −10 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Artifact/Snapshot/InitialSnapshotBuilderTest.php +33 −28 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Artifact/Snapshot/IssueSnapshotCollectionBuilderTest.php +10 −15 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Permissions/PermissionsXMLExporterTest.php +8 −10 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Reports/XmlReportAllIssuesExporterTest.php +18 −10 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Reports/XmlReportCreatedRecentlyExporterTest.php +20 −12 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Reports/XmlReportDefaultCriteriaExporterTest.php +7 −5 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Reports/XmlReportDoneIssuesExporterTest.php +19 −20 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Reports/XmlReportOpenIssuesExporterTest.php +33 −16 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Reports/XmlReportTableExporterTest.php +3 −5 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Reports/XmlReportUpdatedRecentlyExporterTest.php +20 −12 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Semantic/SemanticsXMLExporterTest.php +15 −19 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Structure/ContainersXMLCollectionBuilderTest.php +3 −3 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Structure/FieldXmlExporterTest.php +2 −2 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Structure/JiraFieldRetrieverTest.php +4 −2 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Structure/JiraToTuleapFieldTypeMapperTest.php +27 −55 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/Import/Values/StatusValuesCollectionTest.php +3 −1 Go to diff View file
M src/common/Project/ProjectXMLImporter.class.php +6 −2 Go to diff View file