-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 2.4.0, 3.0.0-SNAPSHOT
-
Component/s: Selectivity
Steps to reproduce:
1) Define a document type and configure a field of type Document and choose to store the document path
<xs:element name="reference"> <xs:simpleType> <xs:restriction base="xs:string" ref:resolver="documentResolver" ref:store="path"/> </xs:simpleType> </xs:element>
2) Write the code to set the Document field from a Suggestion element
<nuxeo-document-suggestion role="widget" value="{{document.properties.mydocument:reference}}" label="Reference"></nuxeo-document-suggestion>
3) Deploy the project
4) Create a document of this new type
5) In the Suggestion field, type "work" and choose an item among the results
6) Submit the form
7) Observe that the creation fails
The HTTP response contains the reason for the error : a constraint violation
{ "entity-type": "validation_report", "has_error": true, "number": 1, "violations": [ { "message": "\"9a00c571-d78c-4...\" is not a valid document path.", "invalid_value": "9a00c571-d78c-4943-b036-a12eb110eb74", "constraint": { "entity-type": "validation_constraint", "name": "documentResolver", "parameters": { "store": "path", "validation": "true" } }, "path": [ { "field_name": "mydocument:reference", "is_list_item": false } ] } ] }
Expected result: the document should be created without error and the document path (not the document id) should be stored in this metadata
- is related to
-
ELEMENTS-690 Web UI: allow bare document reference (without repository name)
- Open
-
ELEMENTS-1063 Fix hasSchema method of FiltersBehavior
- Resolved
- Is referenced in