rymghosn opened a new pull request, #6235:
URL: https://github.com/apache/fineract/pull/6235

   Fixes two issues in the Standing Instruction (SI) feature:
   
   1. **Standing Instruction not created during loan disbursement**
   
      * Fixed the lookup logic in `StandingInstructionReadPlatformServiceImpl` 
to correctly identify the loan account based on the transfer type.
      * For `LOAN_REPAYMENT` transfers, the loan account is stored in 
`to_loan_account_id` rather than `from_loan_account_id`.
      * Added a defensive fallback to check both columns when the transfer type 
is unknown, ensuring the standing instruction is found and persisted correctly.
   
   2. **Standing Instruction batch job failure on PostgreSQL**
   
      * Fixed PostgreSQL-incompatible boolean comparisons by replacing integer 
comparisons (`<> 1`) with proper boolean predicates (`IS FALSE` / `= false`).
      * This resolves the batch job failure while maintaining compatibility 
with PostgreSQL.
   
   Additionally, added a Liquibase changeset to remove duplicate `m_permission` 
entries for `CREATE_STANDINGINSTRUCTION`, `UPDATE_STANDINGINSTRUCTION`, and 
`DELETE_STANDINGINSTRUCTION` that differ only by a trailing space in their 
permission code. The changeset is PostgreSQL-only, idempotent, and safely 
executes only when duplicates exist.
   
   PR:(https://issues.apache.org/jira/browse/FINERACT-2743)
   
   ### Testing
   
   * `./gradlew :fineract-provider:compileJava` — Passed
   * `./gradlew :fineract-core:compileTestJava 
:fineract-provider:compileTestJava` — Passed
   * Verified existing tests (`StandingInstructionDataSerializationTest` and 
`ExecuteOverdueAndCurrentStandingInstructionsTest`) all pass.
   * Manually verified that enabling **Create Standing Instructions at 
Disbursement**, activating, and disbursing a loan correctly creates and 
persists the standing instruction, and that the SI batch job executes 
successfully on PostgreSQL.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to