Rock icon indicating copy to clipboard operation
Rock copied to clipboard

Removing Campus with Event Registrations Attached Deletes Registration

Open DTS-Mike opened this issue 1 year ago • 1 comments

Description

Tell us what you see! If you have a registration that is tied to a campus, and you delete the campus from the Rock Campus UI, the event registration will be deleted from the database.

Actual Behavior

Actual Behavior Removal of a campus has a FK ([FK_dbo.Registration_dbo.Campus_CampusId]) that will cascade delete the Registration.

Image

Expected Behavior

Expected Behavior Rock UI will alert you that the campus is tied to an Event Registration.

Steps to Reproduce

  1. Add an additional campus to Rock (Example: Second Campus) Image

  2. Assign Second Campus to a person Image

  3. Sign up for an event Image

  4. Remove the campus from the person. The Registration will still say second campus as that is the campus they had when they signed up.

  5. Navigate to Admin Tools => General Settings => Campus

  6. Then hit the X on the Second Campus row and it will allow you to delete the campus.
    Image

  7. Look at the RegistrationInstance and the Registration will be removed from the DB like it never existed.
    Image

Most of the time this is not an issue as there are People, Groups, Attendance, and Financials attached to a campus. The church cleaned up all the records so they can remove the incorrect campus. This removed about 200 Registrations, some with payment for a missions trip.

Issue Confirmation

  • [x] Perform a search on the Github Issues to see if your bug is already reported.
  • [x] Reproduced the problem on a fresh install or on the demo site.

Rock Version

17.5,18.0

Client Culture Setting

en-US

DTS-Mike avatar Nov 07 '25 14:11 DTS-Mike

We will look into this and address. That said we would highly recommend that organizations not delete campuses but instead inactivate them.

jonedmiston avatar Nov 07 '25 17:11 jonedmiston