Uploaded image for project: 'Appointment Module'
  1. Appointment Module
  2. AM-186

error on delete location

    XMLWordPrintable

Details

    • Low

    Description

      Scenario:
      1) Create a new location from the page http://qa-refapp.openmrs.org/openmrs/admin/locations/location.list. Type only the name, no tags or other info.
      2) Go to http://qa-refapp.openmrs.org/openmrs/appointmentschedulingui/scheduleProviders.page
      3) Create an appointment with location at point 1
      4) Delete the appointment
      5) Go to the page http://qa-refapp.openmrs.org/openmrs/admin/locations/location.list
      6) Delete the location It should be possible because there are no appointments.

      Unfortunately the test fails at step 6. The error at database level is

      ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (openmrs.appointmentscheduling_appointment_block, CONSTRAINT appointment_block_location_id FOREIGN KEY (location_id) REFERENCES location (`ocation_id))

      My guess is when we delete an appointment, the appointmentscheduling_block_type_map is not updated accordingly, thus we have a sort of "dangling tuple".

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                domenico Domenico Di Leo
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: