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

Obs validator validates for empty value in parent obs which is to be voided

    Details

    • Complexity:
      Low

      Description

      Parent obs (with datatype as text) contains groupmembers.
      Obs1 (DT: Text)

      • Obs2 (obs1 is the parent)

      When we try to void the entire tree by setting voided flag as true and call saveObs(), the validation fails while saving parent obs with the reason ''Obs #1 failed to validate with reason: error.noValue, valueText: error.null ".
      The reason being, obs2 is already voided and saved, and while saving obs1, since it has non-voided groupmembers, it expects valuetext to be not null in parent obs.

      Code link: https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/validator/ObsValidator.java#L134

        Attachments

          Activity

            People

            • Assignee:
              preethi.s Preethi S [X] (Inactive)
              Reporter:
              preethi.s Preethi S [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: