stable

Clone or download

Read-only

request #12144 Create database source_artifact_id

This database will be use to match between artifact id and source_artifact_id. If a match exists between an existing artifact and XML artifact and the source platform (In XML and database), so all changesets are imported in the existings artifacts How to test : Create database and store informations. Each artifact_id is unique. Update with an existing tracker and existings artifacts: If source_id and source_platform are in database, so the changesets will be insert in the existing artifact. If not source_id and source_platform in database, a new artifact will be created, and insert the new source_if and source_platform in database (if they are in XML). Command : tuleap import-project-xml --automap no-email,create:A -u admin -i Project.zip -s import100 tuleap import-project-xml --automap no-email,create:A -u admin -i Project.zip -p import100 --update (You could use the archive in request #12144) Change-Id: Ie49e1e0aba07da185e217b5b33300eafc1757fd5

Modified Files

Name
M plugins/tracker/db/install.sql +9 −0 Go to diff View file
A plugins/tracker/db/mysql/updates/2018/201808171523_add_table_source_artifact_id.php +53 −0 Go to diff View file
M plugins/tracker/db/uninstall.sql +1 −0 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/ExistingArtifactSourceIdFromTrackerExtractor.php +66 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLArtifactSourcePlatformExtractor.php +13 −4 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImport.class.php +64 −6 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImportBuilder.class.php +7 −1 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/dao/TrackerArtifactSourceIdDao.php +49 −0 Go to diff View file
M plugins/tracker/include/Tracker/Migration/MigrationManager.php +9 −3 Go to diff View file
M plugins/tracker/include/Tracker/Tracker.class.php +7 −1 Go to diff View file
A plugins/tracker/phpunit/Tracker/Artifact/ExistingArtifactSourceIdFromTrackerExtractorTest.php +122 −0 Go to diff View file
M plugins/tracker/phpunit/Tracker/Artifact/XMLArtifactSourcePlatformExtractorTest.php +3 −3 Go to diff View file
M plugins/tracker/phpunit/Tracker/Artifact/XmlImportTest.php +139 −27 Go to diff View file
M plugins/tracker/tests/Artifact/XMLImportTest.php +9 −3 Go to diff View file