Uploaded image for project: 'Reference Application'
  1. Reference Application
  2. RA-543

Patient name should not allow leading or trailing spaces

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for Test
    • Priority: TBD
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Complexity:
      Undetermined

      Description

      This bug allows us to add spaces after name and this reason because we have very BIG troubles in the search section. Our patient become unsearchable and it's unclear that name has spaces after. The name with space-sign and the one without are actually not the same. We can prove it by simple program: http://pastebin.com/huJ8UHgt

      Can be reproduced here: http://devtest02.openmrs.org:8080/openmrs/coreapps/findpatient/findPatient.page?app=coreapps.findPatient

      Steps to reproduce:
      1) Create a patient with space-sign after his name
      2) Go to the http://devtest02.openmrs.org:8080/openmrs/coreapps/findpatient/findPatient.page?app=coreapps.findPatient
      3) Try to find your patient

      Possible solution: We have to add cut-function which will be check if there are spaces after name and if so - delete them.

      Dev Notes

      This should be fixed in openmrs-core, in the PersonNameValidator class. Then ensure that the behavior is correct in the reference application based on making this fix and upgrading the reference application to use a newer version of openmrs-core.

      Unit Tests

      Added unit tests to reproduce the bug In PersonNameValidatorTest.java,
      Currently, these unit tests are annotated with @Ignore("Unignore after investigating and fixing - RA-543") .
      The corresponding pull request for the tests is https://github.com/openmrs/openmrs-core/pull/1780

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              samuel34 Samuel Male
              Reporter:
              cwclasses Imran Tatriev
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated: