The Payment and Charges pages for Loans, Savings, Group charges, and Client
charges all eat keystrokes when the use rapidly enters a numeric amount in the
For example, if I rapidly type "1234" in the Apply Payment page's Amount field,
the value "14" shows up on the page.
1. log in to test server
2. search for loan account 000100000000466 .
3. select apply payment.
4. enter "1234" rapidly for payment amount.
"1234" shows up
"14" shows up
Other pages noticed:
loan - apply payment
loan - apply charge
savings - deposit
client - apply charge
group - apply charge
Platform: All, OS: All
Some investigation info from Sam:
I also found it on the "amount" and "interest rate" fields of the loan creation
page. I tracked it down to MifosDecimalInput.java, a custom jsp tag used for
decimal text inputs. This file includes conversion.js and injects the jsp with
<input type="text" name="chargeAmount" value="" onkeydown="saveText
(this);this.focus();" onkeyup="return chekDecimal(7.2,this, event); "
onkeypress="return keyPress(7.2,this,event);" onblur="if( false ==
I looked at conversion.js but couldn't make much sense of it. I noticed that by
pasting in an invalid number, like the string "hello", I can get around this
validation because it relies on keys being pressed. (That also explains why
normal selenium scripts do not encounter this, because when it uses the type
command it does not generate keystroke events.) When I put "hello" into the
numeric field I got a stacktrace NumberFormatException on the result page.
leave in Backlog, not a showstopper, add Volunteer keyword
Fixed NumberFormatException at invalid input "hello". The page will not show stack
trace, it will show the appropriate error.