When setting the value of element nuxeo-document-suggestion's attribute id-property to a filed name other than ecm:uuid and the attribute multiple is set to true, the element can display more than 1 document for a single value stored in the property associated to the element.
This can happen when a page provider's NXQL query with very strict criteria is used to retrieve the suggested documents (e.g. excluding documents in deleted state). The element uses automation operation Document.FetchByProperty to resolve documents for the value(s) that are stored in the associated property, this operation uses more relaxed criteria (i.e. filtering on a single criterion, without the possibility to exclude e.g. documents in deleted state).
How can this be improved?
- automation operation Document.FetchByProperty has a query parameter, which allows to provide additional criteria to the NXQL query build by the operation Document.FetchByProperty, the element could have an additional attribute to provide this additional criteria
- the element could have an additonal attribute in order to provide the name of an automation chain that would be used instead of Document.FetchByProperty
- the page provider used for the suggested documents could also be used to resolve documents for the value(s) that are stored in the associated property
Let me know if you need a reproduction scenario, the linked support ticket should give you the information you need.
- depends on
-
ELEMENTS-925 Expose query parameter in nuxeo-document-suggestion
- Resolved