openmrs/openmrs-core — pull request #446 by NilsEckelt (2013-11-09 16:50:06+00:00)
Title: TRUNK-2779 Clean up patient birthdate error

Found a source of an issue:

getRelationshipsMap(@ModelAttribute("patientModel") ShortPatientModel patientModel, WebRequest request)

method didn't have a parameter of type BindingResult which meant that when 'patientModel' parameter was bound BindingException was always thrown which in turn stopped all processing and saveShortPatient() method was never called. This in turn caused exception to be propagated down the stack and resulted in error page being shown. When BindingResult parameter is added, errors are stored within it and no exception is thrown which causes correct error message to be shown when patient's birthdate is incorrect.