Skip to content

Commit

Permalink
+ (Group Scheduling) Fixed issue where inactive Group Members were ab…
Browse files Browse the repository at this point in the history
…le to be scheduled. (Fixes #4106)
  • Loading branch information
Jason Hendee committed Feb 14, 2020
1 parent 9389975 commit 5fd610a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Rock/Model/AttendanceService.Partial.cs
Expand Up @@ -807,7 +807,8 @@ private IQueryable<PersonScheduleExclusion> GetPersonScheduleExclusionQueryForOc
}

/// <summary>
/// Gets a list of available the scheduler resources (people) based on the options specified in schedulerResourceParameters
/// Gets a list of available resources (people) based on the options specified in schedulerResourceParameters
/// <para>If the source of resources is a group, only active group members will be included</para>
/// </summary>
/// <param name="schedulerResourceParameters">The scheduler resource parameters.</param>
/// <returns></returns>
Expand Down Expand Up @@ -855,7 +856,9 @@ public IEnumerable<SchedulerResource> GetSchedulerResources( SchedulerResourcePa

if ( schedulerResourceParameters.ResourceGroupId.HasValue )
{
groupMemberQry = groupMemberService.Queryable().Where( a => a.GroupId == schedulerResourceParameters.ResourceGroupId.Value );
groupMemberQry = groupMemberService.Queryable()
.Where( a => a.GroupId == schedulerResourceParameters.ResourceGroupId.Value )
.Where( a => a.GroupMemberStatus == GroupMemberStatus.Active );

var resourceGroup = groupService.GetNoTracking( schedulerResourceParameters.ResourceGroupId.Value );
if ( resourceGroup?.SchedulingMustMeetRequirements == true )
Expand Down

0 comments on commit 5fd610a

Please sign in to comment.