stable

Clone or download

Read-only

Support the ${VERSION_NAME} and ${STATUS} variable

Part of story #24166 apply a naming pattern on files to enforce a convention Note: This contribution concerns both UI 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) - Downlad the document. => The filename should be zouzou-tuleap#${ID}--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#${ID}-HUHU My version 2-draft Change-Id: I52c9ef169d0fe2b08a831b82b9944405087450f4

Modified Files

Name
M plugins/docman/include/Docman_Actions.class.php +12 −2 Go to diff View file
M plugins/docman/include/FilenamePattern/FilenameBuilder.php +25 −4 Go to diff View file
M plugins/docman/include/REST/v1/DocmanEmptyDocumentsResource.php +8 −3 Go to diff View file
M plugins/docman/include/REST/v1/DocmanFilesResource.php +5 −3 Go to diff View file
M plugins/docman/include/REST/v1/DocmanItemCreator.php +3 −1 Go to diff View file
M plugins/docman/include/REST/v1/Files/DocmanFileVersionCreator.php +3 −1 Go to diff View file
M plugins/docman/include/REST/v1/Folders/DocmanItemCreatorBuilder.php +1 −1 Go to diff View file
M plugins/docman/tests/unit/FilenamePattern/FilenameBuilderTest.php +103 −8 Go to diff View file
M plugins/docman/tests/unit/REST/v1/DocmanItemCreatorTest.php +1 −1 Go to diff View file
M plugins/docman/tests/unit/REST/v1/Files/DocmanFileVersionCreatorTest.php +9 −3 Go to diff View file