ATLAS-5299: Atlas React UI: Create Subcategory API Fails Due to Missi…#649
Open
Brijesh619 wants to merge 1 commit into
Open
ATLAS-5299: Atlas React UI: Create Subcategory API Fails Due to Missi…#649Brijesh619 wants to merge 1 commit into
Brijesh619 wants to merge 1 commit into
Conversation
…ng parentCategoryId in UI Payload
Contributor
Author
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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: "" }.
Confirmed that the API returns a success status and the subcategory successfully renders in the Glossary tree UI without crashing.