FINERACT-2690: Fix undo account transfer to resolve and scope by tran… - #6136
Samer-Melhem-FOO wants to merge 2 commits into
Conversation
b920603 to
3c0a655
Compare
|
@Samer-Melhem-FOO Please rebase this PR. |
3c0a655 to
3ed0064
Compare
|
Rebased onto latest develop. Also had to renumber the new changelog part from 0242 to 0244 to avoid colliding with 0242/0243 that landed on develop in the meantime. |
|
hey @Samer-Melhem-FOO please resolve conflicts and rebase, thanks! |
3ed0064 to
00f650e
Compare
|
Rebased onto latest develop and resolved the conflict in changelog-tenant.xml (renumbered the new changelog part to 0245 to avoid colliding with 0244_add_payment_detail_to_account_transfer_transaction.xml). Ready for another look. |
|
hey @adamsaghy please review this when you get a chance, thanks! |
|
Hey @Samer-Melhem-FOO please rebase to latest upstream andd resolve changelog conflicts. |
00f650e to
9f3b524
Compare
|
Rebased onto latest |
|
@Samer-Melhem-FOO Can you please review the failing checks? |
|
@Samer-Melhem-FOO Please rebase and fix the failing checks |
|
@Samer-Melhem-FOO Are you planning to finish this PR? |
9f3b524 to
3e93ba9
Compare
|
@adamsaghy Rebased onto latest |
|
@Samer-Melhem-FOO please check the failing logs |
1 similar comment
|
@Samer-Melhem-FOO please check the failing logs |
|
@Samer-Melhem-FOO Please rebase and check failing checks. |
…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.
…erdraft integration test
3e93ba9 to
eb0211e
Compare
|
@adamsaghy Rebased onto the latest I also pushed a second commit that was missing: On the two failing checks in the previous run: both looked like CI infrastructure rather than this PR.
All 85 other checks were green, including every MariaDB integration shard. Locally on the rebased branch, |
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.