Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3569

When a patient identifier fails regex validation, it should display the pretty formatDescription if available

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: OpenMRS 1.9.0
    • Fix Version/s: Platform 2.0.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      If I set a "format" (i.e. regex) and a "formatDescription" (i.e. the user-friendly description of the regex) on a PatientIdentifierType, and try to save an invalid patient identifier, the error message shows the format rather than the formatDescription.

      For example:

      Identifier [foo] does not match required format: \d{3,8}
      

      Instead it should show something like:

      "Identifier should match \"${ idType.formatDescription ?: idType.format }\": ${ invalidIdentifier }"
      

        Attachments

        1. trunk-3569.patch
          8 kB
        2. trunk-3569 fix.png
          trunk-3569 fix.png
          109 kB

          Activity

            People

            Assignee:
            kristopherschmidt Kristopher Schmidt
            Reporter:
            darius Darius Jazayeri
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h