"Include calendars in selected group's sub-groups" only includes one level of navigation

When using the Event Calendar - Calendar or Event Calendar - Event List widgets, you have the option to select specific calendar(s) or to pull from a group. This works well within a specific group, but our site has multiple nested sub-groups going a few layers down. I'm trying to set up a calendar of ALL events that have happened around the site, but selecting the top-level group as my "Pull from a group" option and then the "Include calendars in selected group's sub-groups" checkbox, anything beyond the second layer is omitted.

To work around this, I manually selected all of the calendars that I could think of:

So, if our structure is:

  1. Top-level
    1. Sub 1
      1. sub-sub 1
        1. sub-sub-sub 1
      2. sub-sub 2
    2. Sub 2

Only "Top-Level," "Sub 1," and "Sub 2"s events show on the widgets. 

I believe I've seen similar behavior on other widgets. 

I could see this being a bug (the checkbox is misleading in that "sub-groups" is not inclusive) or a feature/idea (checkbox should be inclusive). Does anyone have any alternate workarounds or thoughts about if this is working as designed?

Thanks!

  • we modified the SetQuery.vm code in Event Calendar - Calendar widget  to pull all the events from the Group and its subgroups Calenders . The below code will pull all the events under a specific Group . Here the case is 5 

    #set($beginDate = $core_v2_utility.ParseDate($core_v2_page.GetQueryStringValue('w_year'), $core_v2_page.GetQueryStringValue('w_month'), '1'))
    #set($totalDays =  $calendar_v1_UI.DaysInMonth($beginDate.Year.ToString(),$beginDate.Month.ToString()))
    #set($startDay =  $calendar_v1_UI.GetStartDayOfWeek($beginDate))
    #set($endDay = $beginDate.AddMonths(1).AddDays(-1).Day)
    #set($groupId = $core_v2_utility.ParseInt($core_v2_page.GetQueryStringValue('w_groupId')))
    #set($calendarIds = $core_v2_page.GetQueryStringValue('w_calendarIds'))
    #set($includeSubGroups = $core_v2_utility.ParseBool($core_v2_page.GetQueryStringValue('w_includeSubGroups')))
    #set($calendarId = $core_v2_utility.ParseInt($core_v2_page.GetQueryStringValue('w_calendarId')))
    
    #set($user = $core_v2_user.Accessing )
    
    
    #set($groupVar = 5)
    
    #set($subgroupVar = $core_v2_group.List("%{ IncludeAllSubGroups = 'true',ParentGroupId = $groupVar }"))
    #set($calendarList = $core_v2_utility.MakeList())
    #set($calendars = $calendar_v1_calendars.List("%{CalendarContext='Group',CalendarReferenceId=$subgroupVar.Id}"))
    #set($calendarCount = $calendars.TotalCount)
    #set($pageSize = 100)
    #set($pageIndex = $calendarCount/$pageSize)
    
    #set ($query = "%{ PageSize = 999, PageIndex = 0, SortBy = 'StartDate', SortOrder='Ascending', DateRangeStart=$beginDate.AddDays(-1), DateRangeEnd=$beginDate.AddMonths(1).AddDays(2) }")
    
    #foreach ( $IPage in [0..$pageIndex] )
    
    #foreach($calendar in $calendar_v1_calendars.List("%{PageIndex = $IPage, PageSize = $pageSize, CalendarContext='Group',CalendarReferenceId=$subgroupVar.Id}"))
    
        $calendarList.Add($calendar.Id.toString())
    #end
    <br>
    #end
    #set($calendarComma = $core_v2_utility.Join(', ', $calendarList))
    ## $query.Add('IncludeSubGroups', $includeSubGroups)
    
    
    #if(!$groupId || $groupId <= 0)
        #if (!$calendarIds || $calendarIds == -1 || $calendarIds.Length <= 0)
            $query.Add('CalendarId', $calendarId)
        #end
    #end
    
        $query.Add('FilterByCalendarIdList', $calendarComma)
    ##  $query.Add('FilterByCalendarIdList', $calendarComma)
    
    #set($events = $calendar_v1_events.List($query))