stable

Clone or download

Read-only

Use users.xml mapping while importing project

This task is part of story #8528 create nonexistant user account at import time When you import a project archive, there are two files: - one that contains data of the projects (user members, artifacts, …) - one that contains all users that are part of those data Until now, whenever you tried to import data with unknown users in your platform, those users were converted to weird users (anonymous with email = an id). This is not anymore the case. Now users are correctly mapped, both in project ugroups and trackers. This development involved the modification of many parts that rely on xml import: - tracker creation from xml structure - migration from tv3 to tv5 - copy of artifacts - and of course import of project *Note:* --force-create option is not anymore needed. Change-Id: I197fa591236a8d310978e7b91067851d67772a22

Modified Files

Name
M plugins/agiledashboard/include/AgileDashboard/AgileDashboardController.class.php +2 −3 Go to diff View file
M plugins/agiledashboard/include/Planning/PlanningController.class.php +1 −2 Go to diff View file
M plugins/tracker/bin/import_artifacts_xml.php +3 −2 Go to diff View file
M plugins/tracker/bin/import_tracker_xml_template.php +2 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImport.class.php +6 −16 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImport/ArtifactFieldsDataBuilder.class.php +3 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImport/XMLImportFieldStrategyList.class.php +5 −5 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImport/XMLImportFieldStrategyOpenList.class.php +5 −5 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImportBuilder.class.php +4 −3 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement.class.php +5 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElementFactory.class.php +7 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Container.class.php +13 −4 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Date.class.php +6 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List.class.php +7 −3 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List_BindFactory.class.php +7 −3 Go to diff View file
M plugins/tracker/include/Tracker/Migration/MigrationManager.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Tracker.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/TrackerManager.class.php +76 −74 Go to diff View file
D plugins/tracker/include/TrackerXMLImportHelper.class.php +0 −43 Go to diff View file
M plugins/tracker/include/TrackerXmlImport.class.php +21 −5 Go to diff View file
M plugins/tracker/include/autoload.php +2 −3 Go to diff View file
M plugins/tracker/include/trackerPlugin.class.php +1 −1 Go to diff View file
M plugins/tracker/tests/Artifact/XMLImportTest.php +4 −4 Go to diff View file
M plugins/tracker/tests/TrackerXmlImportTest.php +10 −5 Go to diff View file
M plugins/tracker/tests/Tracker_FormElementFactoryTest.php +7 −5 Go to diff View file
M plugins/tracker/tests/Tracker_FormElement_Container_FieldsetTest.php +3 −3 Go to diff View file
M plugins/tracker/tests/Tracker_FormElement_Field_DateTest.php +4 −4 Go to diff View file
M plugins/tracker/tests/Tracker_FormElement_Field_ListTest.php +14 −13 Go to diff View file
M plugins/tracker/tests/Tracker_FormElement_Field_List_BindFactoryTest.php +8 −8 Go to diff View file
M src/common/autoload.php +4 −2 Go to diff View file
M src/common/event/Event.class.php +4 −2 Go to diff View file
M src/common/project/ProjectXMLImporter.class.php +11 −22 Go to diff View file
M src/common/user/XML/Import/ActionToBeTakenForUser.php +19 −6 Go to diff View file
M src/common/user/XML/Import/AlreadyExistingUser.php +12 −2 Go to diff View file
M src/common/user/XML/Import/EmailDoesNotMatchUser.php +3 −2 Go to diff View file
R plugins/tracker/tests/Artifact/XMLImport/XMLImportHelperTest.php Go to diff View file
A src/common/user/XML/Import/Mapping.php +100 −0 Go to diff View file
M src/common/user/XML/Import/MappingFileOptimusPrimeTransformer.php +10 −2 Go to diff View file
M src/common/user/XML/Import/ReadyToBeImportedUser.php +4 −1 Go to diff View file
M src/common/user/XML/Import/ReadyToBeImportedUsersCollection.php +32 −7 Go to diff View file
M src/common/user/XML/Import/ToBeActivatedUser.php +3 −2 Go to diff View file
M src/common/user/XML/Import/ToBeCreatedUser.php +0 −10 Go to diff View file
M src/common/user/XML/Import/ToBeMappedUser.php +4 −3 Go to diff View file
M src/common/user/XML/Import/UsersToBeImportedCollectionBuilder.php +17 −8 Go to diff View file
M src/common/user/XML/Import/WillBeActivatedUser.php +5 −1 Go to diff View file
M src/common/user/XML/Import/WillBeCreatedUser.php +11 −1 Go to diff View file
M src/common/user/XML/Import/WillBeMappedUser.php +6 −2 Go to diff View file
M src/common/xml/XMLImportHelper.php +23 −2 Go to diff View file
M src/utils/import_project_xml.php +14 −23 Go to diff View file
M tests/lib/rest/TestDataBuilder.php +1 −2 Go to diff View file
M tests/simpletest/common/project/ProjectXMLImporterTest.php +9 −4 Go to diff View file
M tests/simpletest/common/user/XML/Import/AlreadyExistingUserTest.php +3 −1 Go to diff View file
M tests/simpletest/common/user/XML/Import/EmailDoesNotMatchUserTest.php +3 −1 Go to diff View file
M tests/simpletest/common/user/XML/Import/MappingFileOptimusPrimeTransformerTest.php +27 −15 Go to diff View file
A tests/simpletest/common/user/XML/Import/MappingTest.php +179 −0 Go to diff View file
A tests/simpletest/common/user/XML/Import/ReadyToBeImportedUsersCollectionTest.php +95 −0 Go to diff View file
M tests/simpletest/common/user/XML/Import/ToBeActivatedUserTest.php +3 −1 Go to diff View file
M tests/simpletest/common/user/XML/Import/ToBeCreatedUserTest.php +3 −1 Go to diff View file
M tests/simpletest/common/user/XML/Import/ToBeMappedUserTest.php +3 −1 Go to diff View file
M tests/simpletest/common/user/XML/Import/UsersToBeImportedCollectionBuilderTest.php +13 −9 Go to diff View file
M tests/simpletest/common/user/XML/Import/UsersToBeImportedCollectionTest.php +5 −5 Go to diff View file