-
Notifications
You must be signed in to change notification settings - Fork 12
fix: update websoc is_cancelled column to handle websoc data formatting #272
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
base: main
Are you sure you want to change the base?
Conversation
|
Waiting for addition of resolution to #168. |
…ebsoc_is_cancelled.sql
laggycomputer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Close now.
laggycomputer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you test this one last time.
sanskarm7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the merge of #260, this change will need to have it's migration number updated to 22
I had some issues with conflicting changes being lumped together locally, but hopefully everything should be correct in the committed migration (which was tested again). |
Description
The pattern matching logic for the
is_cancelledgenerated column in thewebsoc_sectiontable was fixed to correctly identify cancelled sections by parsing the section comment. Additionally, the term has been allowed to either be spelled "cancelled" or "canceled".The isCancelled boolean field has also been added to the websocSectionSchema Zod Schema with OpenAPI docs, as well as the WebsocSection GraphQL type with documentation. This provides an explicit indicator of cancelled course sections to end users, and takes precedence over the existing
statusfield in the API response.Related Issues
#266
Also resolves #168
Motivation and Context
The current logic for generating the
is_cancelledcolumn is incorrect, leading to misidentification of cancelled class sections. The WebSoc API returns section comments with HTML formatting and extra whitespace, and this did not match the expected pattern matching logic controlling the generated column. This needs to be fixed so that accurate data regarding cancelled classes–both past and future–are output when queried.We want the end user to be able to access the
isCancelledfield that indicates whether or not the corresponding class section has been cancelled. This creates a clear indicator for when a section is cancelled while retaining the original class status (e.g. open, full).How Has This Been Tested?
The Websoc scraper was ran locally to accrue Winter 2026 data.
SQL queries were then run locally.
Migration applied successfully to the local db.
API was run locally and Verified REST and GraphQL queries work on locally run API.
Screenshots (if appropriate):
REST:
GraphQL:
Types of changes
Checklist: