Skip to content

Rock Cleanup Job Breaks When There Are Multiple Group Member Records Associated with the Same Person for a Sign-Up Group #6661

@AlejandroGuerro

Description

@AlejandroGuerro

Description

When signup groups have multiple group memberships with the same role for the same person, the rock clean up jobs breaks and throws an error when trying to process group memberships.

The issue is having duplicate group member records with the same role. The sign-up creates multiple Member Role Group Member records for the same person. If you create duplicate group members manually, you get a rock error saying that I cannot add a group member record for a person with the same role. However, the Signups process does this without checking whether an existing group member record exists.

The exception is thrown because the RockCleanup job hasn't been updated to handle references to the GroupMember table in the relatively new GroupMemberAssignment table. These residual references result in a foreign key constraint that prevents the removal of the duplicate record.

This could be resolved by updating the RockCleanup job to patch the GroupMemberAssignment records to the surviving GroupMember (which would address other paths we've seen that result in duplicate group members that also trigger this failure in the RockCleanup job). Or by fixing Sign-Ups to not create duplicate members in the same role (which seems to be the standard Rock convention, but is not enforced systematically).

Actual Behavior

Image Image

Expected Behavior

The Rock Cleanup job should remove the duplicate group member records and complete without warning or exception.

Steps to Reproduce

  1. Navigate to prealpha.rocksolidchurchdemo.com.
  2. Create a sign-up group and an opportunity to register for it if there is not already one.
  3. Register for that sign-up group with at least two registrants with the same information (First, Last Names, and Email and Phone)
  4. You should now have two group members with the same role and associated with the same person record in the same group.
  5. Activate the Rock Cleanup job. It will throw an error for the group memberships portion.

Issue Confirmation

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

Rock Version

19.0.4

Client Culture Setting

en-US

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions