codebar / codebar/planner

Attendees can sign up on the waiting list more than once

Open
#1,915 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
104
Forks
205
Avg merge
1d 5h
Merged PRs (30d)
63

Description

Description of the issue 📄

We have a coach who is on the waiting list for our next workshop 10 times. This has happened before where the student was on 3 times.

Screenshots 📷

Screenshot 2023-09-11 at 10 28 38 pm

Steps to fix 🛠

Check in the rsvp method in workshops_controller to see if the user is already waitlisted. I can see there is this code but it doesn't seem to always be working:

      if user_attending_or_waitlisted?(@workshop, current_user)
        return redirect_back fallback_location: root_path, notice: t('workshops.already_wish_to_attend')
      end

It is within an if/else statement so maybe it isn't hitting this part, or the user is clicking on rsvp too quickly before the previous waiting list addition has been complete.

To do 📋

  • Claim this issue (comment below, or assign yourself if you are part of the codebar org)
  • Fork and clone the repository
  • Update the relevant files. Follow the steps to fix section in this issue.
  • Commit your changes as one commit. Use the title of this issue as your commit message
  • Submit a pull request
  • Mention this issue in the PR description by including it's number
  • Have your pull request reviewed & merged by a codebar team member

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the workshops_controller rsvp method and inspect the user_attending_or_waitlisted? check and its surrounding if/else flow. Reproduce or trace repeated waiting-list submissions, including rapid clicks, then ensure one attendee cannot be added to the same workshop waiting list more than once.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.