stable
Clone or download
This is a part of story #12453 Update document modal for existing items This contribution is back end part. How to test: - Go to the API explorer - Try to patch a file which contains an existing approval table ( fill all the fields ) => It should be OK - Try to patch a file which contains an existing approval table without the 'approval_table_action' field => It should return 400 - Try to patch a file which NOT contains an existing approval table without the 'approval_table_action' field => It should be OK - Try to patch a file Which NOT contains an existing approval table ( fill all the fields ) => It should return 400. [OPT] Want to test with the front anyway ? - In rest-querier.js add the field : 'approval_table_action' and fill it with whatever you want to test ( copy, reset or empty) - Update a file => Go the 'Approval table' menu of the old docman via the dropdown menu of your item. You shoud see the approval table corresponding of the approval action chosen ... => NOTICE : keep in mind that errors cases are not handled in the front part !! Change-Id: I8d90fe93995cfaa4d038524eac39883360a17cbc
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/docman/db/install.sql | +1 | −0 | Go to diff View file |
A | plugins/docman/db/mysql/updates/2019/201903121003_add_upload_version_table_approval_column.php | +47 | −0 | Go to diff View file |
M | plugins/docman/include/ApprovalTable/ApprovalTableRetriever.php | +15 | −1 | Go to diff View file |
A | plugins/docman/include/ApprovalTable/ApprovalTableUpdateActionChecker.php | +72 | −0 | Go to diff View file |
A | plugins/docman/include/ApprovalTable/ApprovalTableUpdater.php | +56 | −0 | Go to diff View file |
R | plugins/docman/include/REST/v1/ExceptionDocumentHasApprovalTable.php | Go to diff View file | ||
A | plugins/docman/include/ApprovalTable/Exceptions/ItemHasNoApprovalTableButHasApprovalActionException.php | +28 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanFilesPATCHRepresentation.php | +5 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanFilesResource.php | +31 | −11 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanItemUpdator.php | +3 | −8 | Go to diff View file |
M | plugins/docman/include/REST/v1/ItemApprovalTableRepresentation.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/Upload/Version/DocumentOnGoingVersionToUploadDAO.php | +11 | −9 | Go to diff View file |
M | plugins/docman/include/Upload/Version/VersionToUploadCreator.php | +6 | −3 | Go to diff View file |
M | plugins/docman/include/Upload/Version/VersionUploadFinisher.php | +31 | −1 | Go to diff View file |
M | plugins/docman/include/docmanPlugin.class.php | +7 | −1 | Go to diff View file |
M | plugins/docman/phpunit/ApprovalTable/ApprovalTableRetrieverTest.php | +40 | −0 | Go to diff View file |
A | plugins/docman/phpunit/ApprovalTable/ApprovalTableUpdateActionCheckerTest.php | +105 | −0 | Go to diff View file |
A | plugins/docman/phpunit/ApprovalTable/ApprovalTableUpdaterTest.php | +101 | −0 | Go to diff View file |
M | plugins/docman/phpunit/REST/v1/DocmanItemUpdatorTest.php | +3 | −18 | Go to diff View file |
M | plugins/docman/phpunit/REST/v1/ItemRepresentationBuilderTest.php | +2 | −0 | Go to diff View file |
M | plugins/docman/phpunit/Upload/Version/VersionToUploadCreatorTest.php | +10 | −5 | Go to diff View file |
M | plugins/docman/phpunit/Upload/Version/VersionUploadFinisherTest.php | +254 | −22 | Go to diff View file |
M | plugins/docman/site-content/fr_FR/LC_MESSAGES/tuleap-docman.po | +14 | −5 | Go to diff View file |
M | plugins/docman/tests/rest/Docman/DocmanItemsTest.php | +6 | −6 | Go to diff View file |
M | plugins/docman/tests/rest/Docman/DocmanItemsTestFilesTest.php | +278 | −17 | Go to diff View file |
M | plugins/docman/tests/rest/DocmanDataBuilder.php | +141 | −42 | Go to diff View file |