alfresco-ng2-components icon indicating copy to clipboard operation
alfresco-ng2-components copied to clipboard

adf-form in APS context issue for autocomplete field with REST retrieved options

Open JunHog opened this issue 3 years ago • 0 comments

Type of issue: (check with "[x]")

  • [ ] New feature request
  • [x] Bug
  • [ ] Support request
  • [ ] Documentation

Current behaviour: adf-form in APS context sends an object with the values of restIdProperty and restLabelProperty as properties when using an autocomplete field with REST retrieved options different than id/name and the endpoint is not accepting it.

Expected behavior: The form should still send a request with "id"/"name" properties in the object or the endpoint should accept the mapping set via APS.

Steps to reproduce the issue: I am using an adf-form to display an APS task with a form including an Autocomplete required field with options from a custom API and a different format than "id"/"name". The property ID and the property label in APS are set to "nodeId" and "nom" so the adf-form is sending in the request an object with these properties, making the endpoint responding an HTTP400 and saying the required field isn't completed. This was working in ADF4.4.0 and the request was made using "id"/"name" properties for the object. In the case the field is not required it looks like the value is not getting received by the endpoint either, but no error is catched.

Component name and version: adf-form in v4.11.0

Browser and version: [all]

Node version (for build issues):
14.15.5

JunHog avatar Aug 16 '22 16:08 JunHog