stable
Clone or download
This is a part of story #12638 Add always there metadata date in new/update item modal How to test : - Make sure to enable the oobsolescence date and status metadata - Try to create an empty document with a well formatted day => It should return 201 and the date should be also in the DB - Try to create an empty document with a good status => It should return 201 and the status should be in the DB - Try to create empty document with a bad formatted date => It should return 400 - Try To create an empty doucment without an obsolescence date => it should return 403 - Try to create an empty document with obsolescnece date = null => It should return 403 - The tests case for the status are similar - Make to sure to disable the status metadata and obsolescence date metadata - Try to create an empty document without metadata => it should return 201 -Try to create an empty document with metadata => it should return 403 Change-Id: Ieb5fe8c58e52ff67beeb9de97ed532b0cf62da13
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/docman/include/Docman_ItemFactory.class.php | +13 | −11 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanFoldersResource.php | +31 | −7 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanItemCreator.php | +107 | −6 | Go to diff View file |
M | plugins/docman/include/REST/v1/Folders/DocmanEmptyPOSTRepresentation.php | +11 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/Folders/DocmanFolderPOSTRepresentation.php | +1 | −1 | Go to diff View file |
M | plugins/docman/include/REST/v1/Folders/DocmanItemCreatorBuilder.php | +20 | −8 | Go to diff View file |
M | plugins/docman/include/REST/v1/ItemRepresentation.php | +1 | −0 | Go to diff View file |
A | plugins/docman/include/REST/v1/Metadata/HardcodedMetadataObsolescenceDateRetriever.php | +62 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/Metadata/HardcodedMetadataUsageChecker.php | +6 | −2 | Go to diff View file |
A | plugins/docman/include/REST/v1/Metadata/HardcodedMetdataObsolescenceDateChecker.php | +85 | −0 | Go to diff View file |
A | plugins/docman/include/REST/v1/Metadata/InvalidDateComparisonException.php | +29 | −0 | Go to diff View file |
A | plugins/docman/include/REST/v1/Metadata/InvalidDateTimeFormatException.php | +29 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/Metadata/ItemStatusMapper.php | +1 | −1 | Go to diff View file |
A | plugins/docman/include/REST/v1/Metadata/ObsoloscenceDateUsageMismatchException.php | +29 | −0 | Go to diff View file |
A | plugins/docman/phpunit/Metadata/HardcodedMetadataObsolescenceDateRetrieverTest.php | +89 | −0 | Go to diff View file |
M | plugins/docman/phpunit/Metadata/HardcodedMetadataUsageCheckerTest.php | +14 | −0 | Go to diff View file |
A | plugins/docman/phpunit/Metadata/HardcodedMetdataObsolescenceDateCheckerTest.php | +185 | −0 | Go to diff View file |
M | plugins/docman/phpunit/REST/v1/DocmanItemCreatorTest.php | +207 | −27 | Go to diff View file |
M | plugins/docman/tests/rest/Docman/DocmanItemsTestFoldersTest.php | +47 | −0 | Go to diff View file |
M | plugins/docman/tests/rest/DocmanWithMetadataActivatedDataBuilder.php | +1 | −0 | Go to diff View file |
M | plugins/docman/tests/rest/docmanWithActivatedMetadata/DocmanHardcodedMetadataTest.php | +76 | −0 | Go to diff View file |