SAP / open-ux-odata

Enable community collaboration to jointly promote and facilitate best in class framework and tooling capabilities when working with OData services.
Apache License 2.0
51 stars 13 forks source link

BUG - $filter in $expand does not work #742

Closed swayongshen closed 10 months ago

swayongshen commented 1 year ago

Description

The $filter query param does not seem to work when its nested within a $filter query param. For the following truncated request, the mock server does not return filtered ncResults with operatorResult='NONCONFORMANT'

GET InspectionResults(e3440132-4efd-42c0-8866-1fa4ae7eb70f)?...$expand=ncResults($orderby=...;$filter=operatorResult%20eq%20'NONCONFORMANT';$select=...) HTTP/1.1

Expected results

Filters the ncResults sub-entity by operatorResult for the InspectionResult

Actual results

Returns all ncResults for the InspectionResult

Screenshots

If applicable, add screenshots to help explain the problem.

Version/Components/Environment

Add any other context about the problem here OS:

Root Cause Analysis

Problem

{describe the problem}

Fix

{describe the fix}

Why was it missed

{Some explanation why this issue might have been missed during normal development/testing cycle}

How can we avoid this

{if we don’t want to see this type of issues anymore what we should do to prevent}

nlunets commented 12 months ago

Yes we do not support expand + filter inside currently. How are you generating such requests ? Is that done manually or through standard fiori elements application ? @drktfl FYI

swayongshen commented 11 months ago

@nlunets It is auto generated by SAP UI5 in an object detail page where there is a table of a sub-entity of the object and this table has some filters.

drktfl commented 10 months ago

support added as of @sap-ux/fe-mockserver-core@1.2.16 / @sap-ux/ui5-middleware-fe-mockserver@2.2.16