Page with Stack trace appears after entering amount with big number into 'Recommended amount for deposit' field and trying to create new Savings account

Description

During the Savings account creation flow, after entering amount with big number into 'Recommended amount for deposit' field and then after clicking Submit button, page with stack trace appears.

Repro:
1. Login to Mifos.
2. Click on 'Create new Savings account' link.
3. Select any client and savings product.
4. On 'Enter Savings account information' page, fill all necessary fields and enter amount into 'Recommended amount for deposit' field: "10000000000000000000000000000000000"
5. Click on Continue button.
6. Click Preview button.
7. Click Submit button.

Expected result:
There should be validation for the number of digits before decimal.

Actual result:
Page with stack trace appears. See attached file.

Environment

None

Activity

Show:
Lukasz Chudy
October 4, 2011, 1:25 PM

Validation should only allows as many digits before decimal as it is configured in custom properties file.

Now, if AccountingRules.DigitsBeforeDecimal=14, Mifos allows to enter numbers with 17 digits before decimal which is wrong.

Moreover, validation message in this case should be: "The Recommended amount for deposit is invalid because the number of digits before the decimal separator exceeds the allowed number 14" instead of "The mandatory deposit amount is invalid because the value cannot be greater than 99999999999999999.99.".

Mifos Hudson Jira Plugin User
October 7, 2011, 3:22 PM

Integrated in

head-g-release-secondary #166
MIFOS-5077: Reworked the validation message for the recommended deposit amount. Added a service facade to allow access to mifos configuration.

Rafal Lewandowski :
Files :

  • serviceInterfaces/src/main/java/org/mifos/config/servicefacade/dto/AccountingConfigurationDto.java

  • userInterface/src/main/resources/org/mifos/ui/localizedProperties/savings_messages.properties

  • application/src/test/java/org/mifos/ui/webflow/CreateSavingsAccountTest.java

  • userInterface/src/main/java/org/mifos/ui/core/controller/CreateSavingsAccountFormBean.java

  • userInterface/src/test/java/org/mifos/ui/core/controller/CreateSavingsAccountFormBeanTest.java

  • appdomain/src/main/java/org/mifos/config/servicefacade/ConfigurationServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/config/service/impl/AccountingConfigurationServiceImpl.java

  • appdomain/src/main/resources/org/mifos/config/resources/services.xml

  • serviceInterfaces/src/main/java/org/mifos/config/servicefacade/ConfigurationServiceFacade.java

  • appdomain/src/main/java/org/mifos/config/service/AccountingConfigurationService.java

Rafal Lewandowski
October 7, 2011, 4:11 PM

Fixed the validation message. A new service facade had to be added in order to get access to mifos configuration - the allowed numbers of digits before and after the decimal separator.

Mifos Hudson Jira Plugin User
October 10, 2011, 1:03 PM

Integrated in

head-master-secondary #516
MIFOS-5077: Reworked the validation message for the recommended deposit amount. Added a service facade to allow access to mifos configuration.

Rafal Lewandowski :
Files :

  • userInterface/src/main/java/org/mifos/ui/core/controller/CreateSavingsAccountFormBean.java

  • appdomain/src/main/java/org/mifos/config/service/impl/AccountingConfigurationServiceImpl.java

  • serviceInterfaces/src/main/java/org/mifos/config/servicefacade/dto/AccountingConfigurationDto.java

  • userInterface/src/test/java/org/mifos/ui/core/controller/CreateSavingsAccountFormBeanTest.java

  • userInterface/src/main/resources/org/mifos/ui/localizedProperties/savings_messages.properties

  • appdomain/src/main/resources/org/mifos/config/resources/services.xml

  • appdomain/src/main/java/org/mifos/config/service/AccountingConfigurationService.java

  • appdomain/src/main/java/org/mifos/config/servicefacade/ConfigurationServiceFacadeWebTier.java

  • application/src/test/java/org/mifos/ui/webflow/CreateSavingsAccountTest.java

  • serviceInterfaces/src/main/java/org/mifos/config/servicefacade/ConfigurationServiceFacade.java

Lukasz Chudy
October 11, 2011, 7:05 AM

Verified on 11.10.2011
Bug has been fixed properly.

Assignee

Rafal Lewandowski

Reporter

Lukasz Chudy

Labels

None

URL

None

Story Points

None

Team

Core

Scheduled For

None

Epic

None

Notify

None

productboard URL

None

Man Day Estimate

None

Components

Fix versions

Affects versions

Priority

Minor
Configure