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

Add a changeset to ensure order encounter, orderer and startDate are not null

    XMLWordPrintable

    Details

      Description

      There is several fields in orders table that have been made required in 1.10, we need a changeset that should be among the first ones if not the first one to run when upgrading to ensure that these fields have been set.

      Some code has been written, fetch it from this pull request https://github.com/openmrs/openmrs-core/pull/705

      TODO:

      • Add a liquibase changeset which checks that there is no order with a null encounter, orderer and startDate, the error message should be very clear to the user about why it failed and how to fix the issue.
        The changeset needs to be the very first one to be run i.e. it should come before 201401101645-TRUNK-4187

      Should be something like this:

      <changeSet>
              <preConditions onFail="HALT" onFailMessage="Add some descriptive message">
                  <sqlCheck expectedResult="0">select count(*) from orders where startDate is NULL or .....</sqlCheck>
              </preConditions>
          </changeSet>
      

        Attachments

          Activity

            People

            Assignee:
            dszafranek Damian Szafranek [X] (Inactive)
            Reporter:
            wyclif Wyclif Luyima
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 4 hours Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - 4 hours Remaining Estimate - 4 hours
                4h