Closed jmtaber129 closed 2 years ago
Lookin good!
Thoughts:
meetingType
? I suppose we could just add it in a migration later, too.cancelledAt
and PG called is cancelled_at
processRecurrence
should guarantee this.let's assume all meetings end 24 hours after they start for the MVP
there could be dragons here, so we should explore & have a plan so the time between MVP & GA is as small as possible. Like you say, we've got a couple options:
scheduledEndTime
Set the scheduledEndTime of any open meetings to null Set the meeting's scheduledEndTime to 24 hours from now (or when the recurrence rule says this meeting should end, or when the next meeting should begin, or something else that makes sense)
IMO this behavior is unexpected. I'd expect a meeting series to start new meeting, but not modify existing ones. If they're already created, users should be able to let the meeting expire at its current scheduledEndTime, or they can end it manually.
Pause vs. Cancel
EXDATE
rrule. If they want to cancel, we turn the 1-way flag cancelledAt
. That way there's a distinction between pause & cancel, which we can track for analytics.@mattkrick
Updated the spec to address most of these, with the exception of a few:
IMO a series should have 0 or 1 meetings open at any given time, more than 1 & you'll get users asking themselves "do I log my stuff in this meeting or that one?" processRecurrence should guarantee this.
I'm not sure we want that. For example, if a team wants their standups open for e.g. 36 hours so people can add their response for the previous day, while also having today's open. I think the meeting title (which will include the date) should make it clear which meeting is which.
IMO this behavior is unexpected. I'd expect a meeting series to start new meeting, but not modify existing ones. If they're already created, users should be able to let the meeting expire at its current scheduledEndTime, or they can end it manually.
I don't think this is an accurate assessment w.r.t how this would happen in the UI. I.e. if I'm enabling recurrence from within a meeting, I'd expect the current meeting to become part of a meeting series (including being scheduled an end time), and if I'm canceling/pausing recurrence from within a meeting, I'd expect the current meeting to no longer have any recurrence artifacts (including no longer having a scheduled end time). In fact, I think it would be unexpected if I canceled recurrence for a meeting, and the meeting still ended automatically, with no way to prevent it from ending.
Re: Pause vs. cancel The main thinking is that someone may cancel recurrence for a meeting, realize they didn't want to do that, and then re-enable recurrence, which should be part of the same meeting series. Keep in mind that the concept of a "meeting series" is somewhat hidden from the user - they just see a meeting that is or isn't recurring - so forcing users to create a new meeting just to restart recurrence isn't a great experience. Additionally, I think it makes sense to keep each meeting associated with only one meeting series over its lifetime, since allowing meetings to jump from one series to another seems error-prone once we start adding more complex features (e.g. navigating to other meetings within a meeting's series).
Specifically as for pausing vs. canceling, I think this is a distinction that's outside the scope of the MVP.
@jmtaber129 I'm closing this as we're likely star a new discussion when moving forward with recurrence
See https://github.com/ParabolInc/parabol/issues/6852 for other discussion and some alternatives considered.
High-level overview
We store state about recurring meetings/activities in a new postgres table,
MeetingSeries
, which contains metadata about its collection of meetings, and how these meetings recur. We introduce a new mutation,processRecurrence
, which uses the recurrence information inMeetingSeries
to idempotently open and close meetings accordingly. We then run this new mutation on a 5-minute interval to keep actual meeting state in-sync with what the meeting series' recurrence specifies.Spec
Data model
MeetingSeries
postgres tableid
(non null)meetingType
- the type of the meeting. Should just beteamPrompt
for now.title
- optional title of recurrence series. Any newly created meetings should be prefixed with this title. Should just beAsync Standup
until we enable changing this in the UI.recurrenceRule
- the rule that defines how this meeting series recurs. This should simply be the result of serialization from the rrule library (see "recurrence format")duration
- the duration (in minutes)cancelledAt
- When recurrence for this series was cancelled. Null if series is active. Can be reset to null if reactivated.NewMeeting
rethink tableNew field:
meetingSeriesId
- The ID of the meeting series if this meeting is associated with onescheduledEndTime
- when the meeting is scheduled to endRecurrence format
We should use the RFC-2445 iCal spec, though we won't use all of its features. The rrule library supports this spec, and supports date generation and parsing+serialization.
For MVP, we should hard-code the recurrence to use the following rule when creating meeting series:
freq
- weeklydtstart
- 9am at user's time zone or 12a ESTbyweekday
- Monday, Tuesday, Wednesday, Thursday, FridayNote that this does not include enough information to determine duration - let's assume all meetings end 24 hours after they start for the MVP, then we can add duration (including the duration column) as a follow-up.
processRecurrence
mutationThis mutation does two things in the MVP:
Closing meetings is simple - find any open meetings where
now
is after theirscheduledEndTime
, and close them.Creating new meetings is a bit more complicated:
scheduledEndTime
is afternow
), start the meeting, and set it'sscheduledEndTime
accordingly.Important note: this mutation is idempotent - if this mutation is run twice consecutively, the second execution should have no effect. This should increase robustness, and make debugging, etc. a bit easier.
Starting/ending recurrence
(note: editing recurrence rules is out-of-scope for MVP) How recurring/non-recurring meetings are represented:
meetingSeriesId
will simply be nullmeetingSeriesId
should be non-null, and the meeting series should be activemeetingSeriesId
should be non-null, and point to an inactive meeting seriesSetting a meeting to be recurring for the first time:
scheduledEndTime
to 24 hours from now (or when the recurrence rule says this meeting should end, or when the next meeting should begin)Cancelling recurrence:
cancelled_at
tonow
scheduledEndTime
of any open meetings to nullRestarting recurrence:
cancelled_at
to nullscheduledEndTime
to 24 hours from now (or when the recurrence rule says this meeting should end, or when the next meeting should begin, or something else that makes sense)