Details
-
Bug
-
Status: Closed
-
Could
-
Resolution: Fixed
-
OpenMRS 1.8.2, OpenMRS 1.8.3, OpenMRS 1.8.4, OpenMRS 1.9.0, OpenMRS 1.9.1
-
None
-
Low
Description
I'm not sure how this happened, but the user got an error when trying to create a new Person or a new Patient.
The simple fix for this ticket should be to catch the error on AddPersonController:151 (in 1.8.x branch) or AddPersonController:153 in trunk and give the user a more helpful error message.
The more complex fix is to parse the given birthdate correctly with the date format returned by Context.getDateFormat() instead of the hacky substring(6) call a few lines up.
Version: 1.8.2 Build 21762
Implementation ID:
User ID: admin
Started Modules: serialization.xstream v0.2.5, logic v0.5, reporting v0.6.1, htmlformentry v1.7.3, xforms v4.0.4, reportingcompatibility v1.5.4.1, formentry v4.5.9.2, htmlwidgets v1.5.6.2
Summary:
java.lang.NumberFormatException: For input string:
Description:
Stack trace:
java.lang.NumberFormatException.forInputString(Unknown Source)
java.lang.Integer.parseInt(Unknown Source)
java.lang.Integer.valueOf(Unknown Source)
org.openmrs.web.controller.person.AddPersonController.formBackingObject(AddPersonController.java:151)
org.openmrs.web.controller.person.AddPersonController.formBackingObject(AddPersonController.java:39)
at [ignored] ...
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
<snip>