Send Group Attendance Reminder Job (v15) fails when there's more than one group leader #5462
Closed
1 task done
Labels
Fixed in v15.2
Fixed in v16.0
Status: Confirmed
It's clear what the subject of the issue is about, and what the resolution should be.
Type: Bug
Confirmed bugs or reports that are very likely to be bugs.
Please go through all the tasks below
Please provide a brief description of the problem. Please do not forget to attach the relevant screenshots from your side.
When a group type is configured to send attendance reminders using the new Send Group Attendance Reminder job available in v15 AND the group has more than one leader, the job fails with an exception. The exception is as follows:
Looking at the code behind that job, it appears like the code in the job that creates + inserts the attendance occurrence runs for each group leader, not just for each group. The exception is:
Cannot insert duplicate key row in object 'dbo.AttendanceOccurrence' with unique index 'IX_GroupId_LocationID_ScheduleID_Date'. The duplicate key value is (112, <NULL>, 16, 2023-06-01). The statement has been terminated.
Expected Behavior
I would expect that the new
Send Group Attendance Reminder
job would be able to handle sending reminders to groups with more than one leader.Actual Behavior
If a group has more than one group leader, the job will throw an exception because it's trying to create the occurrence again.
Steps to Reproduce
Small Group
Send Attendance Reminder
Attendance Reminder Communication Template
Attendance Reminder Start Offset Minutes
This next step is required, otherwise the job will throw an error that there's no email transport configured
Go to People > Group Viewer
Expand Section A and click on
Alisha Marble’s Group
Edit the group and adjust the meeting date/time to be within the offset configured above when you run the service job
Save the group
Go to Admin Tools > System Settings, and click on Jobs Administration
Manually run the Send Group Attendance Reminders job
Notice the exception
Rock Version
Rock McKinley 15.0 (1.15.0.16)
Client Culture Setting
en-US
The text was updated successfully, but these errors were encountered: