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

        Gliffy Diagrams

          Attachments

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  preethi.s Preethi S
                  Reporter:
                  preethi.s Preethi S
                  Watchers:
                  Daniel Kayiwa, Darius Jazayeri, Preethi S, Wyclif Luyima
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: