adamsaghy commented on code in PR #3114:
URL: https://github.com/apache/fineract/pull/3114#discussion_r1164582616


##########
fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemReader.java:
##########
@@ -49,7 +49,7 @@ public void beforeStep(@NotNull StepExecution stepExecution) {
             loanIds = Collections.emptyList();
         } else {
             loanIds = 
loanRepository.findAllNonClosedLoansBehindOrNullByMinAndMaxLoanId(loanCOBParameter.getMinLoanId(),
-                    loanCOBParameter.getMaxLoanId(), 
ThreadLocalContextUtil.getBusinessDateByType(BusinessDateType.COB_DATE));
+                    loanCOBParameter.getMaxLoanId(), 
ThreadLocalContextUtil.getBusinessDateByType(BusinessDateType.COB_DATE).minusDays(1));

Review Comment:
   It is ignoring if the loan is already locked and maybe failed...maybe it 
failed on the very first execution and the closed business date is still NULL, 
but it failed 2 days ago... it is edge case, but we need to be careful 
here...(probably not cause any issues in the other hand...)



-- 
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