Brijesh619 opened a new pull request, #692:
URL: https://github.com/apache/atlas/pull/692

   ## What changes were proposed in this pull request?
   
   This PR fixes an issue where clearing a Classification search filter 
triggered a 400 Bad Request error.
   
   *Root Cause:*
   When navigating to classification searches from the Dashboard (e.g., 
Overview Card, Classification Types in Use), `dashboardSearchUtils.ts` was 
explicitly appending an empty `type=""` parameter to the search URL. When a 
user subsequently cleared the classification filter via the "X" button, 
`FilterQuery.tsx` incorrectly detected the dangling `type=` parameter as a 
"meaningful" filter. This caused the UI to fire an empty search request to the 
backend instead of safely resetting the search state.
   
   *Fix:*
   Removed the explicit injection of `params.set("type", "");` in 
`src/utils/dashboardSearchUtils.ts` when building classification URLs. By 
preventing the empty `type` parameter from being added, `FilterQuery` now 
correctly identifies when zero meaningful filters remain, safely navigating the 
user back to the default `/search` page without throwing a 400 error.
   
   ## How was this patch tested?
   
   *Manual testing performed:*
   1. Navigated to the Dashboard / Overview page.
   2. Clicked on the `Classifications` count link inside the Overview card.
   3. On the resulting Search Results page, clicked the "X" to clear the 
Classification filter.
   4. Verified that the UI safely routed back to the default `/search` page 
without throwing a `400 Bad Request` backend error.
   5. Repeated the above steps for the "Classification Types In Use" links to 
ensure coverage.
   6. Verified that `npm run build` completes successfully with no regressions.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to