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

Incorrect message code in Order Validator

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Non-Essential
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.1.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      There is an incorrect message code used in the error message on this line:
      https://github.com/openmrs/openmrs-core/blob/2.0.0-beta/api/src/main/java/org/openmrs/validator/OrderValidator.java#L128

      (The code checks if encounterDatetime is after dateActivated, but if so the message code says the reverse of that: Order.error.dateActivatedAfterEncounterDatetime.)

      The user-displayed message string is correct (i.e. it matches the intent of the code):
      Order.error.dateActivatedAfterEncounterDatetime=Date activated cannot be before that of the associated encounter

      To Do:

      • Change Order.error.dateActivatedAfterEncounterDatetime in OrderValidator.java to Order.error.encounterDatetimeAfterDateActivated
      • Make the same change in all the messages*.properties files in openmrs-core

      (This has no user-visible effect, so we won't backport this from the master branch of code.)

        Attachments

          Activity

            People

            Assignee:
            rahulruikar Rahul Ruikar
            Reporter:
            darius Darius Jazayeri [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: