No validation for Amount field on 'Apply charges' page after selecting fees of type: '% Loan Amount+Interest' and '% Interest'

Description

There is no validation for Amount field on Apply charges page after selecting fees of type: '% Loan Amount+Interest' and '% Interest'.

REPRO:
1. Login to Mifos.
2. Go to 'Clients & Accounts' tab.
3. Search for any client with Loan account.
4. On 'Loan details' page, click on 'Apply charges' link.
5. Select fee of type: '% Loan Amount+Interest' or '% Interest'.
6. Leave Amount field empty and click Submit button.

Expected result:
Validation message appears.

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

Environment

None

Activity

Show:
Rafal Lewandowski
October 3, 2011, 2:48 PM

Added empty value and incorrect input validation for the Amount field on Apply charges page. Added tests for the new validations.

Lukasz Chudy
October 4, 2011, 2:57 PM

Rafał,

After fix, three validation messages appear for one Fee amount field. In this case only one message is needed: "Please specify amount".

Rafal Lewandowski
October 5, 2011, 3:11 PM

Error message has been corrected.

Lukasz Chudy
October 6, 2011, 11:23 AM

Verified on 06.10.2011
Error message has been corrected properly.

Mifos Hudson Jira Plugin User
October 6, 2011, 5:34 PM

Integrated in

head-master-secondary #512
MIFOS-5074: Added validation for the Amount field on Apply charges page, added tests for the new validation.
MIFOS-5074: Fixed incorrect error messages, adjusted tests.

Rafal Lewandowski :
Files :

  • application/src/main/java/org/mifos/accounts/struts/actionforms/ApplyChargeActionForm.java

  • appdomain/src/main/java/org/mifos/accounts/util/helpers/AccountConstants.java

  • application/src/test/java/org/mifos/accounts/struts/actionforms/ApplyChargeActionFormTest.java

Rafal Lewandowski :
Files :

  • application/src/test/java/org/mifos/accounts/struts/actionforms/ApplyChargeActionFormTest.java

  • application/src/main/java/org/mifos/accounts/struts/actionforms/ApplyChargeActionForm.java

Assignee

Rafal Lewandowski

Reporter

Lukasz Chudy

Labels

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