Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve inability to schedule events #3244

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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?

@AndrewKvalheim AndrewKvalheim mentioned this pull request Sep 6, 2023
2 tasks
Resolves inability to schedule a nonscheduled event:

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

`event_schedule_id` represents the absence of a schedule as either an
empty string or undefined, not as null.

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
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