stable

Clone or download

Read-only

Introduce filename pattern in Docman

Part of story #24166 apply a naming pattern on files to enforce a convention Note: this contribution does not take in account any predefined variable. Note: this contribution only concerns the docman part (not document) How to test: - make dev-forgeupgrade - 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 docman UI and create a new file document. - Downlad the document. => The filename should be litterally ${TITLE}-tuleap#${ID}-${VERSION_NAME}-${STATUS} Change-Id: Ibf6d51b0679aabbfb7f510eaabbce825cbba59cb

Modified Files

Name
M plugins/docman/composer.json +2 −1 Go to diff View file
M plugins/docman/db/install.sql +1 −0 Go to diff View file
A plugins/docman/db/mysql/updates/2022/202202141115_add_filename_pattern.php +44 −0 Go to diff View file
M plugins/docman/include/Docman_Actions.class.php +10 −2 Go to diff View file
M plugins/docman/include/Docman_FileStorage.class.php +2 −2 Go to diff View file
A plugins/docman/include/FilenamePattern/FilenameBuilder.php +40 −0 Go to diff View file
A plugins/docman/include/FilenamePattern/FilenamePatternRetriever.php +38 −0 Go to diff View file
A plugins/docman/include/FilenamePattern/RetrieveFilenamePattern.php +29 −0 Go to diff View file
A plugins/docman/include/Settings/SettingsDAO.php +34 −0 Go to diff View file
A plugins/docman/tests/unit/FilenamePattern/FilenameBuilderTest.php +63 −0 Go to diff View file
A plugins/docman/tests/unit/Stubs/FilenamePatternRetrieverStub.php +48 −0 Go to diff View file