Skip to content

Conversation

@AndrewKvalheim
Copy link
Member

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the upstream master branch.
  • The tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate).

Short description of what this resolves

When dragging an unscheduled event onto a time slot, the event fails to be scheduled. Rails throws:

ActionController::RoutingError: No route matches [PUT] "/admin/conferences/…/event_schedules"

Details

To schedule an event, the editor must make a different kind of request depending on whether the event is already scheduled. This information is encoded in event_schedule_id as:

Type
Scheduled non-empty string
Nonscheduled "" (empty string) or undefined

In disagreement with this encoding, the editor currently tests for inequality to null, a condition that always evaluates to true, so events are always determined to be already scheduled, resulting in the incorrect kind of request being made when scheduling nonscheduled events.

Changes proposed in this pull request

Since the encoding used correlates with truthiness, test for that instead.

Concerns

I have low confidence in my understanding of this. This bug appears to prevent the scheduling of events, a critical feature of OSEM, yet I don’t see any prior reports about it. How have conferences been scheduling events?


require 'spec_helper'

def expect_scheduled(event, time)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgryphon
Copy link

This bug appears to prevent the scheduling of events, a critical feature of OSEM, yet I don’t see any prior reports about it. How have conferences been scheduling events?

I just found OSEM and have been trying to use it, and came across this bug, i.e. inability to schedule.

And your fix is > 10 months, and not merged.

Suggestion: Sometimes when I fix a bug in an open source project, the first thing I do is raise a bug report, then reference it in the fix. That way others can find the issue and the fix. (Of course, after 10 months you may have moved on).

@sgryphon sgryphon mentioned this pull request Apr 25, 2024
1 task
@hennevogel hennevogel force-pushed the test-schedule-editor branch 3 times, most recently from cc2d108 to ed7b937 Compare January 30, 2025 13:39
@hennevogel hennevogel changed the title Resolve inability to schedule events Test drag-and-drop schedule editor Jan 30, 2025
@hennevogel
Copy link
Member

I've split the fix from the new test so we can work on this...

#3558

@hennevogel hennevogel force-pushed the test-schedule-editor branch from ed7b937 to 163b12a Compare August 14, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants