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

   **ATLAS-5299: Atlas React UI: Create Subcategory API Fails Due to Missing 
parentCategoryId in UI Payload**
   
   **What changes were proposed in this pull request?**
   Currently in the Atlas React UI, creating a child category (subcategory) 
under an existing category fails because the API payload is missing the correct 
parentCategoryId. The UI was previously hardcoding the categoryGuid to the root 
glossaryTypeGuid rather than the specific parent category the user had selected.
   
   This patch fixes the issue by updating AddUpdateCategoryForm.tsx:
   
   It extracts the cGuid (Category GUID) from the node props.
   When the form is generating the payload for a "child" type category, it 
assigns categoryGuid to cGuid if it exists, gracefully falling back to 
glossaryTypeGuid if it does not.
   This ensures that the correct parent ID is successfully passed to the 
backend API during subcategory creation.
   
   **How was this patch tested?**
   Manual testing in the UI:
   
   Navigated to the Glossary page in the Atlas React UI.
   Selected an existing Glossary category and clicked to add a child Category.
   Filled out the Category creation form and submitted.
   Verified via browser network tools that the POST request payload now 
correctly contains the parentCategory: { categoryGuid: "<correct-parent-guid>" 
}.
   Confirmed that the API returns a success status and the subcategory 
successfully renders in the Glossary tree UI without crashing.


-- 
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