Repository navigation
FINERACT-2974: Apply the name and active flag when updating a hook - #6702
Open
Aarti-panchal01 wants to merge 1 commit into
Open
Aarti-panchal01 wants to merge 1 commit into
Aarti-panchal01 wants to merge 1 commit into
Conversation
HookWritePlatformServiceImpl.updateHook listed displayName and isActive
in the response changes but never set them on the hook, so renaming or
deactivating a hook through PUT /hooks/{hookId} returned 200 and did
nothing. Set them when the request provides them, and leave them alone
when it does not.
Assisted-By: Claude Opus 5.5
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.
Description
PUT /hooks/{hookId}with a newdisplayNameorisActivereturns 200 and lists them underchanges, but the hook keeps its old name and active flag (checked inm_hook).HookWritePlatformServiceImpl.updateHookadds both to the changes map but never sets them on theHookentity, unlike events and config. It also reported both as changed (and saved) when the request left them out, because it compared null with the stored value.The hook now gets the new name and active flag when the request provides them, and they are left alone when it does not.
Added
HookWritePlatformServiceImplTest: one test renames and deactivates a hook, one sends neither field. Both fail on develop and pass with this change.Found while building the Manage Hooks pages of the Mifos X React web app (MXWAR-235).
JIRA: https://issues.apache.org/jira/browse/FINERACT-2974
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!