stable

Clone or download

Read-only

Add the "processed value" to the metadata information available in the REST API

The same approach than for the trackers API has been taken: the raw value and a processed one is returned. The processed value can contain additional HTML data to generate the links to other elements. A few changes has also been done to the "owner" metadata to make the whole thing more consistent. Instead of raw user ID without any context, the display name is returned. The "owner" metadata is the only one linking to a user and should probably have its own user metadata type instead of re-using the string metadata type. The thing has been kept hardcoded to the "owner" metadata for now. No change in the document UI for now. First part of request #13477: References to items are not transformed in the metadata of text type in the document plugin Change-Id: I1b9518b88adda3b075c35ed0cd95a353f2152f89

Modified Files

Name
M plugins/docman/include/Docman_FilterFactory.class.php +7 −12 Go to diff View file
M plugins/docman/include/Docman_MetadataFactory.class.php +19 −17 Go to diff View file
M plugins/docman/include/REST/v1/DocmanItemsResource.php +5 −1 Go to diff View file
M plugins/docman/include/REST/v1/Metadata/MetadataRepresentation.php +11 −14 Go to diff View file
M plugins/docman/include/REST/v1/Metadata/MetadataRepresentationBuilder.php +68 −22 Go to diff View file
M plugins/docman/include/docmanPlugin.class.php +3 −1 Go to diff View file
M plugins/docman/phpunit/REST/v1/ItemRepresentationBuilderTest.php +3 −3 Go to diff View file
M plugins/docman/phpunit/REST/v1/ItemRepresentationCollectionBuilderTest.php +4 −0 Go to diff View file
M plugins/docman/phpunit/REST/v1/MetadataRepresentationBuilderTest.php +92 −5 Go to diff View file
M plugins/docman/tests/rest/Docman/DocmanItemsTest.php +1 −0 Go to diff View file
M src/common/User/UserHelper.class.php +2 −1 Go to diff View file
M src/common/include/Codendi_HTMLPurifier.class.php +3 −0 Go to diff View file
M src/common/tracker/ArtifactField.class.php +1 −1 Go to diff View file