stable

Clone or download

Read-only

fix: Unused obsolescence date metadata must not be cleared at metadata edition

This closes request #29282 Item metadatas cleared at update when metadata is not used Given a document item (either a folder or any other file type) that has an obsolescence date set with the obsolescence date metadata, if a project administrator disables the usage of this metadata and then any other metadata for this item is updated, then the obsolescence date is reset to null, which is wrong. The obsolescence date must not be cleared when the obsolescence date metadata is no more used. How to test ----------- * Go to a document service that has the obsolescence date metadata enabled * Edit the metadata of any item and set an obsolescence date * Disable the usage of the obsolescence date metadata in the document administration * Edit any other metadata of the previous item => The obsolescence date metadata value must not be reset to null (this can be checked by either querying the database or enabling the obsolescence date metadata and opening the edit metadata modal of the item). Change-Id: I744cd58aed00d7acdff6dc00e8168c925ab8a3ba

Modified Files

Name
M plugins/docman/include/REST/v1/Metadata/MetadataUpdator.php +10 −1 Go to diff View file
M plugins/docman/tests/unit/REST/v1/Metadata/MetadataUpdatorTest.php +74 −13 Go to diff View file