You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/01/12 10:34:00 UTC

[jira] [Commented] (ATLAS-5183) React UI: Business metadata attribute filters send incomplete attribute name in entityFilters API payload

    [ https://issues.apache.org/jira/browse/ATLAS-5183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18051205#comment-18051205 ] 

ASF subversion and git services commented on ATLAS-5183:
--------------------------------------------------------

Commit c0ecdf45d13102a79a5a824b2e0f56a7074bb009 in atlas's branch refs/heads/ATLAS-5183 from Prasad Pawar
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=c0ecdf45d ]

ATLAS-5183: React UI: Business metadata attribute filters send incomplete attribute name in entityFilters API payload


> React UI: Business metadata attribute filters send incomplete attribute name in entityFilters API payload
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: ATLAS-5183
>                 URL: https://issues.apache.org/jira/browse/ATLAS-5183
>             Project: Atlas
>          Issue Type: Bug
>          Components: atlas-webui
>    Affects Versions: 3.0.0
>            Reporter: Prasad P. Pawar
>            Assignee: Prasad P. Pawar
>            Priority: Major
>              Labels: atlas-react
>
>  
> When filtering by business metadata attributes in React UI basic search, the API payload's `entityFilters.criterion[].attributeName` contains only the attribute name (e.g., `attr1`) instead of the full qualified name (e.g., `test_businessMetadata.attr1`). This causes incorrect API requests and potential search failures.
> Environment
>  - React UI (dashboard/)
>  - Basic Search functionality
>  - Business Metadata attribute filters
> Steps to Reproduce
> 1. Navigate to React UI basic search
> 2. Select a business metadata attribute filter (e.g., `test_businessMetadata.attr1`)
> 3. Set a filter condition (e.g., `is_null`)
> 4. Click Search
> 5. Check the Network tab to inspect the API request payload
> Actual Behavior
> The API payload contains only the attribute name without the business metadata prefix:
> {code:java}
> {
>   "entityFilters": {
>     "condition": "AND",
>     "criterion": [
>       {
>         "attributeName": "attr1",
>         "operator": "isNull",
>         "attributeValue": ""
>       }
>     ]
>   }
> }
> {code}
> h2. Root Cause
>  # The react-querybuilder library uses the name property as the field identifier when storing selected filters in rule.field
>  # When creating business metadata filter objects in Filters.tsx, only the id property was being updated with the full qualified name (test_businessMetadata.attr1)
>  # The name property remained as just the attribute name (attr1)
>  # When generateUrl was called, it checked obj.field (which contained only attr1) before checking obj.id
> h2. Solution
>  # Updated dashboard/src/components/QueryBuilder/Filters.tsx: Modified business metadata filter creation to update both id and name properties with the full qualified name
>  # Updated dashboard/src/utils/CommonViewFunction.ts: Changed property priority in generateUrl to prioritize field (used by react-querybuilder) over id



--
This message was sent by Atlassian Jira
(v8.20.10#820010)