Skip to content

Commit

Permalink
SA-49 make sure to check start/end on recurring events, not just recu…
Browse files Browse the repository at this point in the history
…rring period

git-svn-id: https://source.jasig.org/sa/sched-assist/trunk@25906 f5dbab47-78f9-eb45-b975-e544023573eb
  • Loading branch information
nblair committed Feb 28, 2012
1 parent 1060cd2 commit ebc6dff
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,19 +217,19 @@ protected VisibleSchedule calculateVisibleScheduleNoAttendingCheck(Date startTim

// if we reach this point, this event is not skippable,
// it's going to be either BUSY, FREE with visitors, or ATTENDING
// whether event is recurring or not, check block on start/end
Date startDate = event.getStartDate().getDate();
Date endDate = event.getEndDate(true).getDate();
mutateAppropriateBlockInVisibleSchedule(visibleSchedule, event, calendarAccount, null, startDate, endDate, false);

if(eventUtils.isEventRecurring(event)) {
// expand the recurrence rules
PeriodList recurrenceList = this.eventUtils.calculateRecurrence(event, startTime, endTime);
for(Object o : recurrenceList) {
Period period = (Period) o;
mutateAppropriateBlockInVisibleSchedule(visibleSchedule, event, calendarAccount, null, period.getStart(), period.getEnd(), false);
}
} else {
// event is not recurring, just check block on start/end
Date startDate = event.getStartDate().getDate();
Date endDate = event.getEndDate(true).getDate();
mutateAppropriateBlockInVisibleSchedule(visibleSchedule, event, calendarAccount, null, startDate, endDate, false);
}
}
}

return visibleSchedule;
Expand Down

0 comments on commit ebc6dff

Please sign in to comment.