[NAE-2452] Pre-release bugfixes#458
Conversation
Refactor `MenuItemService` to streamline parent ID handling and optimize destination folder assignment logic.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
Walkthrough
ChangesmoveItem Operation Order Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@application-engine/src/main/java/com/netgrif/application/engine/menu/services/MenuItemService.java`:
- Around line 271-273: Guard the move logic in MenuItemService so a no-op move
to the same parent does not reuse a stale `newParent` from
getOrCreateFolderItem(destUri). Check whether destUri matches the current parent
before calling removeChildItemFromParent() and appendChildCaseIdInMemory(), and
skip the append/update path when the source and destination parent are the same
to avoid duplicating the child ID on the parent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: c4d9e372-3d84-467b-be11-3a8bc1635e7c
📒 Files selected for processing (1)
application-engine/src/main/java/com/netgrif/application/engine/menu/services/MenuItemService.java
Refactor `MenuItemService` to improve parent ID comparison and optimize parent-child relationship updates.
|



Description
Fixes NAE-2452
Dependencies
No new dependencies were introduced.
Third party dependencies
No new dependencies were introduced.
Blocking Pull requests
There are no dependencies on other PR.
How Has Been This Tested?
This was tested manually and with unit tests.
Test Configuration
Checklist:
Summary by CodeRabbit