stable

Clone or download

Read-only

fix: request #24240 Wrong error message when typo in artlink type

When you want to update the artifact 37109 to add new artifact links and you make a typo for a given type (e.g `fixed_id` instead of `fixed_in`) ``` curl -X 'PUT' \ 'https://tuleap-web.tuleap-aio-dev.docker/api/artifacts/37109' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "values": [ { "field_id": 41990, "type": "art_link", "links": [ { "id": 37108 }, { "id": 37110, "type": "fixed_id" }, { "id": 37111, "type": "depends_on" } ] } ] }' ``` You get the following error message: `Internal Server Error: Type is missing for artifact #37109.` This is disturbing because we are currently updating the artifact 37109… The expected error message should be `Internal Server Error: Type is missing for artifact #37110.` Change-Id: Ie1105153c5a9fdcd6d2a8a8f74b3a94b0a7d4b18

Modified Files

Name
M plugins/tracker/include/Tracker/FormElement/ArtifactLinkValidator.php +1 −1 Go to diff View file