stable

Clone or download

Read-only

feat: import XML archive into new project

Initiate the creation of a project via REST api (from archive). With the given upload_href, upload (with tus client) the given archive. Then as site admin go to the following url, replacing <id> with the project id you've just created: https://tuleap-web.tuleap-aio-dev.docker/project/:id/admin/services The enabled services should match the one in the archive, and content is imported as well (trackers, artifacts, …). Note: the project is only accessible to site admin for now, we will deal with the its activation in a dedicated contribution. Changes in `ProjectXMLImporter.class.php` are needed to make sure that project does not have enabled services from default template (in addition to the ones of the archive). part of story #36484 create a new project from an XML template Change-Id: I71ce61541cb34f61baddad1dc6d638de9ace1f74

Modified Files

Name
M src/common/CLI/Command/ImportProjectXMLCommand.php +1 −1 Go to diff View file
A src/common/Project/ImportFromArchive.php +41 −0 Go to diff View file
M src/common/Project/ProjectXMLImporter.class.php +16 −10 Go to diff View file
M src/common/Project/REST/v1/ProjectResource.class.php +2 −2 Go to diff View file
A src/common/Project/Registration/Template/Upload/ExtractArchiveAndCreateProject.php +56 −0 Go to diff View file
A src/common/Project/Registration/Template/Upload/FinishFileUploadPostAction.php +26 −0 Go to diff View file
R src/common/Project/Registration/Template/Upload/FileOngoingUploadDao.php Go to diff View file
M src/common/Project/Registration/Template/Upload/SearchFileUpload.php +16 −17 Go to diff View file
A src/common/Project/Registration/Template/Upload/SearchFileUploadByExpirationDate.php +33 −0 Go to diff View file
M src/common/Project/Registration/Template/Upload/Tus/ProjectFileBeingUploadedInformationProvider.php +2 −2 Go to diff View file
M src/common/Project/Registration/Template/Upload/Tus/ProjectFileUploadFinisher.php +29 −3 Go to diff View file
A src/common/Project/Registration/Template/Upload/Tus/ProjectNotFoundException.php +33 −0 Go to diff View file
M src/common/Request/RouteCollector.php +13 −3 Go to diff View file
A tests/lib/Stubs/Project/ImportFromArchiveStub.php +65 −0 Go to diff View file
A tests/unit/common/Project/Registration/Template/Upload/ExtractArchiveAndCreateProjectTest.php +79 −0 Go to diff View file
A tests/unit/common/Project/Registration/Template/Upload/FinishFileUploadPostActionStub.php +55 −0 Go to diff View file
A tests/unit/common/Project/Registration/Template/Upload/SearchFileUploadByExpirationDateStub.php +50 −0 Go to diff View file
M tests/unit/common/Project/Registration/Template/Upload/SearchFileUploadStub.php +14 −19 Go to diff View file
M tests/unit/common/Project/Registration/Template/Upload/Tus/ProjectFileBeingUploadedInformationProviderTest.php +6 −6 Go to diff View file
M tests/unit/common/Project/Registration/Template/Upload/Tus/ProjectFileUploadFinisherTest.php +55 −5 Go to diff View file