stable

Clone or download

Read-only

Support the ${ID} variable

Part of story #24166 apply a naming pattern on files to enforce a convention Note: This contribution concerns both UI Note: The minimal pattern restriction is not taken in account in this contribution. How to test: - In your db, add a pattern, e.g: ${TITLE}-tuleap#${ID}-${VERSION_NAME}-${STATUS} for a project in the table `plugin_docman_project_settings` - Go to the document and docman UI and create a new file document with a title (e.g: zouzou), and status (e.g draft), the item id is equal 13. - Downlad the document. => The filename should be zouzou-tuleap#13--draft - Create a new document version from the previously created file with a version name/title (e.g HUHU My version 2) - Download the file from the new version => The filename should be zouzou-tuleap#13-HUHU My version 2-draft Change-Id: Ib5f21308928054b7c090e7e8ed2953dd89adf10d

Modified Files

Name
M plugins/docman/include/Docman_Actions.class.php +2 −1 Go to diff View file
M plugins/docman/include/FilenamePattern/FilenameBuilder.php +15 −5 Go to diff View file
M plugins/docman/include/REST/v1/DocmanItemCreator.php +1 −11 Go to diff View file
M plugins/docman/include/REST/v1/Files/DocmanFileVersionCreator.php +2 −1 Go to diff View file
M plugins/docman/include/REST/v1/Folders/DocmanItemCreatorBuilder.php +3 −3 Go to diff View file
M plugins/docman/include/Upload/Document/DocumentOngoingUploadDAO.php +24 −11 Go to diff View file
M plugins/docman/include/Upload/Document/DocumentToUploadCreator.php +26 −39 Go to diff View file
M plugins/docman/tests/unit/FilenamePattern/FilenameBuilderTest.php +63 −11 Go to diff View file
M plugins/docman/tests/unit/REST/v1/DocmanItemCreatorTest.php +0 −3 Go to diff View file
M plugins/docman/tests/unit/Upload/Document/DocumentToUploadCreatorTest.php +23 −8 Go to diff View file