stable

Clone or download

Read-only

request #10285: Can't remove all the attachements of an artifact with the REST API

Removing all the attachment of an artifact should work when passing this kind of payload: { "values": [ { "field_id": <field_id>, "value": [] } ] } Some changes has been made on the numeric and text fields, there is no reason for them to accept an array as value, it only ends up with warnings or values that does not made any sense for a user. Change-Id: Iac538bc59c43f182870728e2b4fffd320984b77f

Modified Files

Name
M plugins/tracker/include/REST/v1/ArtifactValuesRepresentation.class.php +2 −2 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactsResource.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Numeric.class.php +8 −6 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_String.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Text.class.php +2 −2 Go to diff View file
A plugins/tracker/tests/REST_Backend/ArtifactValuesRepresentionTest.php +91 −0 Go to diff View file
M plugins/tracker/tests/Tracker_FormElement_Field_FloatTest.php +2 −0 Go to diff View file
M plugins/tracker/tests/Tracker_FormElement_Field_IntegerTest.php +2 −0 Go to diff View file