From f2fac3ad12746f953468a3b1b3a111042ae94cc2 Mon Sep 17 00:00:00 2001 From: goutham-M Date: Wed, 24 Jul 2013 17:38:40 +0530 Subject: [PATCH 1/6] calendarId will be passed only when syn repay/disbur checkbox selected --- .../CalculateLoanScheduleQueryFromApiJsonHelper.java | 2 +- .../LoanApplicationCommandFromApiJsonHelper.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/serialization/CalculateLoanScheduleQueryFromApiJsonHelper.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/serialization/CalculateLoanScheduleQueryFromApiJsonHelper.java index 04a8239af..687207ba3 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/serialization/CalculateLoanScheduleQueryFromApiJsonHelper.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/serialization/CalculateLoanScheduleQueryFromApiJsonHelper.java @@ -194,7 +194,7 @@ public final class CalculateLoanScheduleQueryFromApiJsonHelper { final String calendarIdParameterName = "calendarId"; //if disbursement is synced then must have a meeting (calendar) - if (meetingIdRequired || fromApiJsonHelper.parameterExists(syncDisbursementParameterName, element)) { + if (meetingIdRequired || fromApiJsonHelper.parameterExists(calendarIdParameterName, element)) { final Long calendarId = fromApiJsonHelper.extractLongNamed(calendarIdParameterName, element); baseDataValidator.reset().parameter(calendarIdParameterName).value(calendarId).notNull().integerGreaterThanZero(); } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/serialization/LoanApplicationCommandFromApiJsonHelper.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/serialization/LoanApplicationCommandFromApiJsonHelper.java index e66cbc7ce..f826af108 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/serialization/LoanApplicationCommandFromApiJsonHelper.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/serialization/LoanApplicationCommandFromApiJsonHelper.java @@ -314,7 +314,7 @@ public final class LoanApplicationCommandFromApiJsonHelper { final String calendarIdParameterName = "calendarId"; //if disbursement is synced then must have a meeting (calendar) - if (meetingIdRequired || fromApiJsonHelper.parameterExists(syncDisbursementParameterName, element)) { + if (meetingIdRequired || fromApiJsonHelper.parameterExists(calendarIdParameterName, element)) { final Long calendarId = fromApiJsonHelper.extractLongNamed(calendarIdParameterName, element); baseDataValidator.reset().parameter(calendarIdParameterName).value(calendarId).notNull().integerGreaterThanZero(); } @@ -616,7 +616,7 @@ public final class LoanApplicationCommandFromApiJsonHelper { final String calendarIdParameterName = "calendarId"; //if disbursement is synced then must have a meeting (calendar) - if (meetingIdRequired || fromApiJsonHelper.parameterExists(syncDisbursementParameterName, element)) { + if (meetingIdRequired || fromApiJsonHelper.parameterExists(calendarIdParameterName, element)) { final Long calendarId = fromApiJsonHelper.extractLongNamed(calendarIdParameterName, element); baseDataValidator.reset().parameter(calendarIdParameterName).value(calendarId).notNull().integerGreaterThanZero(); } From 3e43f398952a328a4ee474d997f7bed7d28a2e66 Mon Sep 17 00:00:00 2001 From: goutham-M Date: Thu, 25 Jul 2013 13:13:36 +0530 Subject: [PATCH 2/6] data table not able to create when column/roz size is large --- .../dataqueries/service/ReadWriteNonCoreDataServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java index 01f908e12..76500365f 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java @@ -442,6 +442,10 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ baseDataValidator.reset().parameter("name").failWithCode("duplicate.column.name"); } else if (realCause.getMessage().contains("Table") && realCause.getMessage().contains("already exists")) { baseDataValidator.reset().parameter("datatableName").value(datatableName).failWithCode("datatable.already.exists"); + } else if (realCause.getMessage().contains("Column") && realCause.getMessage().contains("big")) { + baseDataValidator.reset().parameter("column").failWithCode("length.too.big"); + } else if (realCause.getMessage().contains("Row") && realCause.getMessage().contains("large")) { + baseDataValidator.reset().parameter("row").failWithCode("size.too.large"); } throwExceptionIfValidationWarningsExist(dataValidationErrors); From 0943830da5c8ca97c9691c3c066ee7d4d363eb52 Mon Sep 17 00:00:00 2001 From: goutham-M Date: Fri, 26 Jul 2013 17:14:04 +0530 Subject: [PATCH 3/6] validation on submit date --- .../portfolio/loanaccount/domain/Loan.java | 2 +- ...onWritePlatformServiceJpaRepositoryImpl.java | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/domain/Loan.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/domain/Loan.java index f2699c4b5..366baf401 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/domain/Loan.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/domain/Loan.java @@ -2020,7 +2020,7 @@ public class Loan extends AbstractPersistable { return this.submittedOnDate == null ? false : (new LocalDate(submittedOnDate)).isAfter(compareDate); } - private LocalDate getSubmittedOnDate() { + public LocalDate getSubmittedOnDate() { return (LocalDate) ObjectUtils.defaultIfNull(new LocalDate(this.submittedOnDate), null); } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java index 55ce8db3d..2a9024112 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java @@ -151,14 +151,14 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa final LoanProduct loanProduct = this.loanProductRepository.findOne(productId); if (loanProduct == null) { throw new LoanProductNotFoundException(productId); } - validateSubmittedOnDate(command, loanProduct); - this.loanProductCommandFromApiJsonDeserializer.validateMinMaxConstraints(command.parsedJson(), baseDataValidator, loanProduct); if (!dataValidationErrors.isEmpty()) { throw new PlatformApiDataValidationException(dataValidationErrors); } final Loan newLoanApplication = loanAssembler.assembleFrom(command, currentUser); + validateSubmittedOnDate(newLoanApplication); + final LoanProductRelatedDetail productRelatedDetail = newLoanApplication.repaymentScheduleDetail(); this.fromApiJsonDeserializer.validateLoanTermAndRepaidEveryValues(newLoanApplication.getTermFrequency(), newLoanApplication.getTermPeriodFrequencyType(), productRelatedDetail.getNumberOfRepayments(), productRelatedDetail.getRepayEvery(), @@ -214,8 +214,6 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa final Loan existingLoanApplication = retrieveLoanBy(loanId); - validateSubmittedOnDate(command, existingLoanApplication.loanProduct()); - if (!existingLoanApplication.isSubmittedAndPendingApproval()) { throw new LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified( loanId); } @@ -245,7 +243,8 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa existingLoanApplication.updateInterestRateFrequencyType(); } } - + + validateSubmittedOnDate(existingLoanApplication); // validate min and maximum constraints this.fromApiJsonDeserializer.validateForModify(command.json()); final LoanProductRelatedDetail productRelatedDetail = existingLoanApplication.repaymentScheduleDetail(); @@ -545,10 +544,10 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa return loan; } - private void validateSubmittedOnDate(final JsonCommand command, final LoanProduct loanProduct) { - final LocalDate startDate = loanProduct.getStartDate(); - final LocalDate closeDate = loanProduct.getCloseDate(); - final LocalDate submittedOnDate = command.localDateValueOfParameterNamed("submittedOnDate"); + private void validateSubmittedOnDate(final Loan loan) { + final LocalDate startDate = loan.loanProduct().getStartDate(); + final LocalDate closeDate = loan.loanProduct().getCloseDate(); + final LocalDate submittedOnDate = loan.getSubmittedOnDate(); String defaultUserMessage = ""; if (startDate != null && submittedOnDate.isBefore(startDate)) { From 72de6ea83cc3cc4e6af88725fc002562a5d83ed8 Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Sun, 28 Jul 2013 21:43:16 +0530 Subject: [PATCH 4/6] Update CHANGELOG.md for 1.6.1 RELEASE --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c50275960..a6d778d55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ See VERSIONING (https://github.com/openMF/mifosx/blob/master/VERSIONING.md) for Releases =============== +1. 28 July 2013 - 1.6.1.RELEASE 1. 20 July 2013 - 1.6.0.RELEASE 1. 14 July 2013 - 1.5.0.RELEASE 1. 25 Jun 2013 - 1.4.1.RELEASE @@ -27,6 +28,19 @@ Releases 1. 05 April 2013 - 0.11.1.beta 1. 05 April 2013 - 0.11.0.beta +1.6.1.RELEASE +============= +Bug Release + +Platform & API + +Bug + - [MIFOSX-485] - In Groups -> Group loan under "Submitted and pending approval" state -> "Change loan application" page,not able to edit/update "Sync repayments with meeting" and "Loan term" fields. + - [MIFOSX-564] - Create data table does not work for attached request + +Reference App + - [MIFOSX-560] - In "Modify Application page" if Product is changed, it not getting updated in Loan account overview list + 1.6.0.RELEASE ============= Feature (and Bug) Release From d28d8df6f67728864310f8cbaa0af44abd860c4c Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Sun, 28 Jul 2013 21:45:01 +0530 Subject: [PATCH 5/6] moving up to 1.6.1 release --- mifosng-provider/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mifosng-provider/gradle.properties b/mifosng-provider/gradle.properties index e4da25330..c235f2495 100644 --- a/mifosng-provider/gradle.properties +++ b/mifosng-provider/gradle.properties @@ -1 +1 @@ -releaseVersion=1.6.0.RELEASE +releaseVersion=1.6.1.RELEASE From 9b5c63e244ded7065a20415aecfcfeaea71d04e4 Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Sun, 28 Jul 2013 21:55:09 +0530 Subject: [PATCH 6/6] updating to 1.6.1 release --- api-docs/apiLive.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index 023673913..6ec3319a3 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -90,7 +90,7 @@
- +

Overview