Skip to content

FINERACT-2556: Prevent no-op updates for approved amount modification#5696

Open
devi-pathak2263 wants to merge 1 commit intoapache:developfrom
devi-pathak2263:pr-5638
Open

FINERACT-2556: Prevent no-op updates for approved amount modification#5696
devi-pathak2263 wants to merge 1 commit intoapache:developfrom
devi-pathak2263:pr-5638

Conversation

@devi-pathak2263
Copy link
Contributor

@devi-pathak2263 devi-pathak2263 commented Mar 26, 2026

Description

This PR implements FINERACT-2556.

Currently, updating the approved amount with the same value still triggers unnecessary history entries and business events.

Such no-op updates:

  • create unnecessary history entries
  • trigger business events
  • cause redundant database writes

This change adds validation to ensure that the approved amount is different from the current value, preventing no-op updates.

Also includes integration test coverage for this scenario.

This can be considered a small improvement to ensure only meaningful updates are processed.

JIRA: https://issues.apache.org/jira/browse/FINERACT-2556

@adamsaghy
Copy link
Contributor

@devi-pathak2263 This PR seems not much to do with FINERACT-2541....

@adamsaghy
Copy link
Contributor

@devi-pathak2263 Please follow PR and commit title naming conventions:
FINERACT-XXXX: Short description of the PR

@devi-pathak2263 devi-pathak2263 changed the title Prevent no-op updates for approved amount modification (FINERACT-2541) FINERACT-2541: Prevent no-op updates for approved amount modification Mar 26, 2026
@devi-pathak2263
Copy link
Contributor Author

@devi-pathak2263 This PR seems not much to do with FINERACT-2541....

Thanks for the feedback!

This is a small follow-up improvement related to FINERACT-2541. While reviewing the existing implementation, I noticed that updating the approved amount with the same value still triggers history creation and events.

This PR adds validation to prevent such no-op updates and includes test coverage for it.

Please let me know if you’d prefer this to be linked to a separate issue instead.

@adamsaghy
Copy link
Contributor

@devi-pathak2263 This PR seems not much to do with FINERACT-2541....

Thanks for the feedback!

This is a small follow-up improvement related to FINERACT-2541. While reviewing the existing implementation, I noticed that updating the approved amount with the same value still triggers history creation and events.

This PR adds validation to prevent such no-op updates and includes test coverage for it.

Please let me know if you’d prefer this to be linked to a separate issue instead.

FINERACT-2541 is for external investor related changes...

This PR is for loan approval... it's defo not relevant to FINERACT-2541 :)

@devi-pathak2263
Copy link
Contributor Author

@devi-pathak2263 This PR seems not much to do with FINERACT-2541....

Thanks for the feedback!
This is a small follow-up improvement related to FINERACT-2541. While reviewing the existing implementation, I noticed that updating the approved amount with the same value still triggers history creation and events.
This PR adds validation to prevent such no-op updates and includes test coverage for it.
Please let me know if you’d prefer this to be linked to a separate issue instead.

FINERACT-2541 is for external investor related changes...

This PR is for loan approval... it's defo not relevant to FINERACT-2541 :)

Thanks for the clarification, and apologies for the confusion!

I understand now that this is not related to FINERACT-2541. I came across this while reviewing the implementation and thought it might fit as a follow-up, but I see the distinction now.

I’ll create a separate JIRA issue for this improvement and update the PR accordingly.

Thanks again for the guidance!

@devi-pathak2263 devi-pathak2263 changed the title FINERACT-2541: Prevent no-op updates for approved amount modification FINERACT-2556: Prevent no-op updates for approved amount modification Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants