FINERACT-2690: Fix undo account transfer to resolve and scope by tran…#6136
Open
Samer-Melhem-FOO wants to merge 1 commit into
Open
Conversation
…saction id undo() resolved the path id against m_account_transfer_details, but the transfer read/list APIs expose m_account_transfer_transaction.id instead - two independent id sequences that drift apart, so undo could 404 on a transfer a caller could clearly see. It also reversed every transaction tied to the resolved details record instead of only the one requested, over-reversing recurring transfers (e.g. standing instructions) that share one details row across many executions. Fixed for both the savings-to-loan (FINERACT-2604) and savings-to-savings (FINERACT-2613) paths. Also adds the missing UNDO_ACCOUNTTRANSFER permission (entityName= ACCOUNTTRANSFER, actionName=UNDO) referenced by the command wiring, which had no matching m_permission row and so failed permission validation.
Samer-Melhem-FOO
force-pushed
the
cherry-pick/FINERACT-2690-fix-undo-account-transfer
branch
from
July 16, 2026 08:30
b920603 to
3c0a655
Compare
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.
AccountTransfersWritePlatformServiceImpl.undo() had two related defects, discovered while testing the undo-account-transfer capability added in FINERACT-2604 and extended in FINERACT-2613:
independent, unrelated id sequences that drift apart over time, so a caller undoing a transfer they can clearly see via the list/read endpoints could get a 404.
recurring transfer (e.g. a standing instruction) sharing one details row across many runs.
This PR fixes undo() to resolve and scope by m_account_transfer_transaction id instead, for both the savings-to-loan and savings-to-savings paths, so:
It also adds the missing UNDO_ACCOUNTTRANSFER permission (entityName=ACCOUNTTRANSFER, actionName=UNDO) via a new Liquibase changelog part — the command handler was already wired to check this permission, but no matching m_permission row was ever shipped, so
the command failed permission validation before reaching the (buggy) logic above.