Add conflict rules for scheduling #214
Closed
Comments
For what it is worth, I made a view in a separate DB that reveals speakers conflicts (a workaround until we have a proper conflict manager tool): USE pretalx_custom_views;
CREATE VIEW conf_with_speaker_and_timeslots
AS
SELECT st.start, st.end, pu.id as user_id, pu.name as username, ss.id as conf_id, ss.title as conf_title
FROM pretalx.schedule_talkslot st JOIN pretalx.submission_submission_speakers ssp ON st.submission_id=ssp.submission_id
JOIN pretalx.person_user pu ON ssp.user_id=pu.id
JOIN pretalx.submission_submission ss ON ss.id=st.submission_id
WHERE st.schedule_id=(select distinct MAX(schedule_id) FROM pretalx.schedule_talkslot);
CREATE VIEW speakers_conflicts
AS
SELECT l.username, l.start as left_start, l.end as left_end, l.conf_title as left_conf_title, r.start as right_start, r.end as right_end, r.conf_title as right_conf_title
FROM pretalx_custom_views.conf_with_speaker_and_timeslots l JOIN pretalx_custom_views.conf_with_speaker_and_timeslots r ON r.user_id=l.user_id
WHERE r.conf_id<>l.conf_id AND ((r.start > l.start AND r.start < l.end) OR (r.end > l.start AND r.end < l.end)); In order to view conflicts in MySQL: select * from pretalx_custom_views.speakers_conflicts; Hope it can help. Reviews welcome. Cheers, |
I'm not convinced any longer that arbitrary conflict rules would be a good idea, to be honest. I can't imagine a case where the result would make up for the complexity and UX problems. I'd be up for adding a plugin API to add warnings from plugins, and/or different severities, once/if the need arises. (If it does for you, please get in touch so we can talk about requirements and a clean API design!) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to check schedules for conflicts, and there are different kinds of conflicts that may have different impacts. Once the rule system exists, users may want to change the importance of conflict rules as fits their event.
Features
Impact levels
BLOCK SCHEDULING
: check and forbid while scheduling. This should be very rarely used, as forbidding a scheduling move instead of just flagging it is jarring for the user.BLOCK RELEASE
: check whenever appropriate, but block a release.WARN
: check whenever appropriate, show warnings, but permit a release.IGNORE
: don't check at all.Checking styles
All checks except for blocking checks should run asynchronously to avoid delaying scheduling moves.
Known conflict rules
Future conflict rules
We may want to include attendance requests, room size/interest rate, scheduled breaks, and maybe even user defined features in our conflict rule system, which is one of the reasons it needs to be generic.
Implementation
As long as we only talk about named rules we know about, we may store them by name. We could have a (later on configurable) conflict ruleset as a JSON field in our event's settings:
The text was updated successfully, but these errors were encountered: