Admissions: added new options for how houses are automatically assigned when a student application is accepted#2121
Open
Open
Conversation
…on siblings or parents
SKuipers
requested changes
Jun 22, 2026
SKuipers
left a comment
Member
There was a problem hiding this comment.
Hi @ali-ichk, thanks for making these improvements. I notice that there are 5 or more separate database queries for this action (depending on the number of family adults), which adds a fair bit of nested logic. I wonder if the same result could be achieved with a single new query in the HouseGateway called selectExistingHouseByFamilyID, and in that query it could get the house data for a given family, ordered by staff parents first, and siblings second.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improved the logic to automatically assign a house based on siblings or parents.
When a new student is accepted, the system checks if their parents are staff member and assigns the same house as them. If not, the system checks if they have siblings and assigns the student to the same house as their siblings. If not, the system automatically assigns them to a house based on old logic.