Github user rajuan commented on a diff in the pull request:
https://github.com/apache/incubator-fineract/pull/38#discussion_r56934144
--- Diff:
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
---
@@ -888,20 +888,23 @@ public CommandProcessingResult
adjustLoanTransaction(final Long loanId, final Lo
}
final String noteText =
command.stringValueOfParameterNamed("note");
- if (StringUtils.isNotBlank(noteText)) {
- changes.put("note", noteText);
- Note note = null;
- /**
- * If a new transaction is not created, associate note with the
- * transaction to be adjusted
- **/
- if
(newTransactionDetail.isGreaterThanZero(loan.getPrincpal().getCurrency())) {
- note = Note.loanTransactionNote(loan,
newTransactionDetail, noteText);
- } else {
- note = Note.loanTransactionNote(loan, transactionToAdjust,
noteText);
- }
- this.noteRepository.save(note);
- }
+ changes.put("note", noteText);
+ Note note = null;
+ /**
+ * If a new transaction is not created, associate note with the
+ * transaction to be adjusted
+ **/
+ if
(newTransactionDetail.isGreaterThanZero(loan.getPrincpal().getCurrency())) {
+ note = Note.loanTransactionNote(loan, newTransactionDetail,
noteText);
+ } else {
+ note =
this.noteRepository.findByLoanTransactionId(transactionId);
--- End diff --
This API cannot return a single note object... so premise of this solution
becomes invalid.... What is the expectation of this PR? can you please explain
or point us to relevant JIRA issue?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---