Description
Current eRA exit logic can incorrectly complete an ongoing eRA Core Step because attendance on the final Sunday of the evaluation window may be excluded when Attendance.StartDateTime includes a time value, such as 2026-05-31 08:15:00.000, while @SundayDateStart is by date.
eRA entry/exit attendance and giving window logic should use SundayDate for week based boundary checks instead of comparing directly against StartDateTime or TransactionDateTime.
The affected logic is in spCrm_FamilyAnalyticsEraDataset, and similar boundary logic appears in the Family Analytics attendance/giving procedures. The expected behavior is to exclude the first boundary Sunday but include the full last Sunday by using:
SundayDate > @StartBoundarySunday AND SundayDate <= @SundayDateStart
instead of date/time comparisons like:
StartDateTime <= @SundayDateStart
or lower-bound checks against TransactionDateTime.
spCrm_FamilyAnalyticsEraDataset returns the eRA entry/exit count values. CalculateFamilyAnalytics.cs maps those returned columns into EraResult objects, then uses those values to decide whether to exit eRA and complete the In Progress eRA Core Step.
Stored Procedures Impacted with this issue:
spCrm_FamilyAnalyticsEraDataset: Giving and Attendance eRA Family Analytics Attributes
spCrm_FamilyAnalyticsGiving - First/Last Gift and Number of Gifts Long/Short duration
spCrm_FamilyAnalyticsAttendance - First/Last and Times CheckedIn
Actual Behavior
The first and last SundayDateStart ranges is excluding Sunday attendance because of the time and including the first Sunday which should not be. This issue exists for both the Financial and the Attendance logic.
Expected Behavior
The expected behavior is to exclude the first boundary Sunday but include the full last Sunday by using:
SundayDate > @StartBoundarySunday AND SundayDate <= @SundayDateStart
instead of date/time comparisons like:
Attendance: StartDateTime <= @SundayDateStart or for Giving: lower-bound checks against TransactionDateTime.
eRA entry/exit attendance and giving window logic should use SundayDate for week based boundary checks instead of comparing directly against StartDateTime or TransactionDateTime.
Steps to Reproduce
The error is within the following stored procedures that generate the
ERA Attributes
- 'core_CurrentlyAnEra'
- 'core_EraStartDate',
- 'core_EraEndDate'
Giving Attributes
- First Gift
- Last Gift
- Number of Gifts (long/short durations)
Attendance Attributes
-
First CheckIn
-
Last CheckIn
-
Times CheckedIn
-
Stored Procedures Impacted with this issue:
-
spCrm_FamilyAnalyticsEraDataset: Giving and Attendance eRA Family Analytics Attributes
-
spCrm_FamilyAnalyticsGiving - First/Last Gift and Number of Gifts Long/Short duration
-
spCrm_FamilyAnalyticsAttendance - First/Last and Times CheckedIn
Issue Confirmation
Rock Version
Rock McKinley 18.2 (18.2.4)
Client Culture Setting
en-US
Description
Current eRA exit logic can incorrectly complete an ongoing eRA Core Step because attendance on the final Sunday of the evaluation window may be excluded when Attendance.StartDateTime includes a time value, such as 2026-05-31 08:15:00.000, while @SundayDateStart is by date.
eRA entry/exit attendance and giving window logic should use SundayDate for week based boundary checks instead of comparing directly against StartDateTime or TransactionDateTime.
The affected logic is in spCrm_FamilyAnalyticsEraDataset, and similar boundary logic appears in the Family Analytics attendance/giving procedures. The expected behavior is to exclude the first boundary Sunday but include the full last Sunday by using:
SundayDate > @StartBoundarySunday AND SundayDate <= @SundayDateStart
instead of date/time comparisons like:
StartDateTime <= @SundayDateStart
or lower-bound checks against TransactionDateTime.
spCrm_FamilyAnalyticsEraDataset returns the eRA entry/exit count values. CalculateFamilyAnalytics.cs maps those returned columns into EraResult objects, then uses those values to decide whether to exit eRA and complete the In Progress eRA Core Step.
Stored Procedures Impacted with this issue:
spCrm_FamilyAnalyticsEraDataset: Giving and Attendance eRA Family Analytics Attributes
spCrm_FamilyAnalyticsGiving - First/Last Gift and Number of Gifts Long/Short duration
spCrm_FamilyAnalyticsAttendance - First/Last and Times CheckedIn
Actual Behavior
The first and last SundayDateStart ranges is excluding Sunday attendance because of the time and including the first Sunday which should not be. This issue exists for both the Financial and the Attendance logic.
Expected Behavior
The expected behavior is to exclude the first boundary Sunday but include the full last Sunday by using:
SundayDate > @StartBoundarySunday AND SundayDate <= @SundayDateStart
instead of date/time comparisons like:
Attendance: StartDateTime <= @SundayDateStart or for Giving: lower-bound checks against TransactionDateTime.
eRA entry/exit attendance and giving window logic should use SundayDate for week based boundary checks instead of comparing directly against StartDateTime or TransactionDateTime.
Steps to Reproduce
The error is within the following stored procedures that generate the
ERA Attributes
Giving Attributes
Attendance Attributes
First CheckIn
Last CheckIn
Times CheckedIn
Stored Procedures Impacted with this issue:
spCrm_FamilyAnalyticsEraDataset: Giving and Attendance eRA Family Analytics Attributes
spCrm_FamilyAnalyticsGiving - First/Last Gift and Number of Gifts Long/Short duration
spCrm_FamilyAnalyticsAttendance - First/Last and Times CheckedIn
Issue Confirmation
Rock Version
Rock McKinley 18.2 (18.2.4)
Client Culture Setting
en-US