-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FINERACT-2081: Enable inline COB execution for locked loans #4171
base: develop
Are you sure you want to change the base?
FINERACT-2081: Enable inline COB execution for locked loans #4171
Conversation
@@ -241,7 +241,7 @@ private boolean isLockOverrulable(LoanAccountLock loanAccountLock) { | |||
if (isBypassUser()) { | |||
return true; | |||
} else { | |||
return StringUtils.isNotBlank(loanAccountLock.getError()); | |||
return StringUtils.isBlank(loanAccountLock.getError()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think it is correct to do this. Please undo this change. We can change the lock if we are going with bypass user or there was an error stored on the lock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Change undone
@@ -75,7 +77,9 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse | |||
proceed(filterChain, request, response); | |||
} else { | |||
try { | |||
log.info("calculateRelevantLoanIds ==>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No info log please! Use debug!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Logs removed
@@ -240,7 +250,8 @@ private Long getTopLevelLoanIdFromBatchRequest(BatchRequest batchRequest) throws | |||
|
|||
private List<Long> getLoanIdsFromApi(String pathInfo) { | |||
List<Long> loanIds = getLoanIdList(pathInfo); | |||
if (isLoanHardLocked(loanIds)) { | |||
log.info("getLoanIdsFromApi {}", loanIds.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No info log please!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Logs removed
@@ -217,7 +227,7 @@ private List<Long> getLoanIdsFromBatchApi(BodyCachingHttpServletRequestWrapper r | |||
// check the body for Loan ID | |||
Long loanId = getTopLevelLoanIdFromBatchRequest(batchRequest); | |||
if (loanId != null) { | |||
if (isLoanHardLocked(loanId)) { | |||
if (isLoanHardLocked(loanId) && isLockOverrulable(loanId)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong condition. If the lock has an error stored, we should allow to run the inline cob!
@@ -240,7 +250,8 @@ private Long getTopLevelLoanIdFromBatchRequest(BatchRequest batchRequest) throws | |||
|
|||
private List<Long> getLoanIdsFromApi(String pathInfo) { | |||
List<Long> loanIds = getLoanIdList(pathInfo); | |||
if (isLoanHardLocked(loanIds)) { | |||
log.info("getLoanIdsFromApi {}", loanIds.size()); | |||
if (isLoanHardLocked(loanIds) && isLockOverrulable(loanIds)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong condition. If the lock has an error stored, we should allow to run the inline cob!
8ecb7a9
to
0d60d5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Updated
@@ -241,7 +241,7 @@ private boolean isLockOverrulable(LoanAccountLock loanAccountLock) { | |||
if (isBypassUser()) { | |||
return true; | |||
} else { | |||
return StringUtils.isNotBlank(loanAccountLock.getError()); | |||
return StringUtils.isBlank(loanAccountLock.getError()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Change undone
@@ -75,7 +77,9 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse | |||
proceed(filterChain, request, response); | |||
} else { | |||
try { | |||
log.info("calculateRelevantLoanIds ==>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Logs removed
@@ -240,7 +250,8 @@ private Long getTopLevelLoanIdFromBatchRequest(BatchRequest batchRequest) throws | |||
|
|||
private List<Long> getLoanIdsFromApi(String pathInfo) { | |||
List<Long> loanIds = getLoanIdList(pathInfo); | |||
if (isLoanHardLocked(loanIds)) { | |||
log.info("getLoanIdsFromApi {}", loanIds.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Logs removed
c0b4bd0
to
c44654e
Compare
c44654e
to
f800f81
Compare
Description
If the loan is locked, but there is any error attached to the lock, it means the prior execution of COB / Inline COB failed.
For user experience it would be better if we let the inline COB to be triggered again in these situations hence noone is processing the loan at the moment, it just indicates there was some problem during the last processing.
FINERACT-2081
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Write the commit message as per https://github.com/apache/fineract/#pull-requests
Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
Create/update unit or integration tests for verifying the changes made.
Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.