Closed Lovinity closed 5 years ago
Unable to locate the second bug at this time. Issue is on hold.
The bug was actually in createRecord in Logs.create; was trying to create logsubtype from calendar record, which does not exist. Should be creating from the event name parameter instead.
If a show begins more than 10 minutes before its scheduled show time, it is considered unauthorized / unscheduled. This is expected behavior. However, an unexpected behavior occurred. For example, Men's Basketball, which was scheduled at 7PM, began at 645PM, which was beyond the 10-minute early grace, causing the system to label it as unscheduled. As a result, when the broadcast ended, not only did the system still label Men's Basketball as not having aired, but also the logs got assigned to the previous record (Hip Hop / R&B) instead of Men's Basketball.
[x] If a show starts more than 10 minutes before start time, consider it unauthorized / unscheduled. However, if the system detects, during the every 5 minute Google Calendar polling, that the currently airing show now falls within the scheduled time, un-mark the show as unauthorized by filling in Attendance.scheduledStart, Attendance.scheduledEnd, and Attendance.unique.
[x] Fix the secondary bug; ensure when an unauthorized show starts, the logs are being created for that new attendance record and not for the record of the previous event. Ensure the attendance system also closed out the previous event properly by filling in actualStart/actualEnd, showtime, and listenerminutes.
[x] Monitor the fixes