fix: normalize space id in SpaceCategoryPlugin so category links apply to spaces - EXO-88506 - #5900
Merged
Jihed525 merged 1 commit intoJul 20, 2026
Conversation
…y to spaces - EXO-88506 Category links are generic metadata keyed on (objectType, objectId), but the space UI/REST reads a denormalized space.getCategoryIds() kept in sync only by CategoryLinkModifiedListener, whose SPACE branch resolves the space via spaceService.getSpaceById(object.getId()) and therefore requires the space technical id. SpaceCategoryPlugin did not override getObject(), so when a caller (e.g. the MCP tooling) passed the space identity id or its pretty name, the raw link was written/read-back under that id (false success) while the listener resolved the wrong space or null, leaving space.categoryIds untouched and the UI empty. Override CategoryPlugin.getObject() to normalize any incoming space id form (technical id, social Identity id or pretty name) to the canonical technical id String.valueOf(space.getSpaceId()). Since link()/getLinkedIds() and the listener all funnel through getObject(), the write, the read-back and the denormalization now agree regardless of which id was supplied. Unresolvable ids are returned unchanged rather than silently corrupted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 70db850)
|
ahamdi
approved these changes
Jul 20, 2026
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.



What
Backport of #5895 onto
develop.Overrides
CategoryPlugin.getObject()inSpaceCategoryPluginto normalize the technical id / identity id / pretty name to the canonicalString.valueOf(space.getSpaceId()), so space category links written via non-technical ids (e.g. MCP calls) are correctly reflected inspace.getCategoryIds(). Unresolvable ids are returned unchanged rather than silently corrupted.Note: source PR #5895 is still open upstream (not yet merged into
feature/ai-contribution); this backport is being pushed todevelopat the requester's explicit direction, in parallel with mcp-server #16 and content #838, which all address the same category-MCP-tools ticket (EXO-88506).Backport notes
Cherry-picked commit
70db850e0b411aa2261726e6de437bd5e8012769cleanly ontodevelop, no conflicts.Test
mvn -pl component/core -am -Dcheckstyle.skip=true -DskipTests install→ BUILD SUCCESSmvn -pl component/core -Dcheckstyle.skip=true -Dtest=SpaceCategoryPluginUnitTest,CategoryLinkServiceTest test→ 8 tests, 0 failures/errors🤖 Generated with Claude Code