-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: different schedules in consecutive weeks #1170
fix: different schedules in consecutive weeks #1170
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #1170 +/- ##
=======================================
+ Coverage 15% 16% +1%
=======================================
Files 228 230 +2
Lines 6907 7003 +96
=======================================
+ Hits 1027 1086 +59
- Misses 5880 5917 +37 |
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.
Excellent work overall, but it was a difficult bug fix overall (dates are really difficult to work with properly) 🚀 🚀 just have some concerns below.
Disabled auto-merge because I still need to test these latest changes |
1ab0694
to
c8fa63c
Compare
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.
Great work 🚀 🚀
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.
Great work. Below you can find some nitpicky comments.
This PR fixes an issue where schedules of consecutive weeks were merged and displayed all on the same weekday.
This happens because when we fetch the lectures from the API, we send (in today's case) pv_semana_ini=20240228 and pv_semana_fim=20240305. This is the equivalent of a week starting today. The problem arises because, for those parameters, the API returns the lectures between 25-02-2024 and 09-03-2024, since those are the 2 blocks that intercept the range of dates we asked for.
To fix this, we now issue 1 request per week (the smallest block possible) to be able to determine the full date of each class (the API only returns the weekday).
This also required changes to the widgets to support these new functionalities.
PR-specific Tasks
Review checklist
whatsnew/whatsnew-pt-PT
changelog.md
with the change