Skip to content

Conversation

devogs
Copy link
Owner

@devogs devogs commented Sep 8, 2025

Description:

This pull request fixes a bug that allowed clubs to book more than 12 places per competition, which violates a key functional requirement of the application. The original purchasePlaces function did not check if the requested number of places exceeded the 12-place limit for a single club. This fix implements the necessary validation to enforce this rule.

Changes Made:

Validation Logic: A conditional check has been added to the purchasePlaces function to verify that the placesRequired variable does not exceed 12.

User Feedback: If a user attempts to book more than 12 places, an error message is displayed to them.

No Deductions: Points and competition places are only deducted if the requested number of places is within the allowed limit.

Verification:

Manual Test: I manually tested the booking process with a request for 13 places. The application now correctly displays an error message and prevents the booking.

Automated Test: An automated test has been created to cover this scenario, ensuring that the bug is fixed and that future changes don't reintroduce it.

@devogs devogs merged commit 3892926 into master Sep 8, 2025
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.

1 participant