Repository navigation
Conversation
… has happened The table, the calendar and the day-wise view each compared dates with today on their own, and only turned a day after today with nothing on it into Upcoming. One helper, day_has_happened, now decides it everywhere, and a day still to come is Upcoming whatever is on it so far (leave, holidays and week offs dated ahead keep their colour), with no overtime badge or conflict and nothing counted. Today has happened, so nothing changes; a deployment that waits for a day to close before judging it can say so in one place. With tests.
This branch has not been deployed
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.
Problem
The Monthly Attendance Summary's table, calendar and day-wise view each compare dates with today on their own (
d > today,d <= datetime.date.today(), …), and a day after today becomes Upcoming only when nothing is on it (Absent). Whatever else a day still to come has so far is drawn and counted as if the day were over.Change
day_has_happened(day), decides it everywhere.Tests
attendance/tests/test_day_has_happened.py(3 tests): today and before have happened; a past day shows what was worked; a day still to come (the helper patched) is Upcoming in the calendar and the day-wise view, counted as upcoming in the calendar and the table, and not as present.Checklist
dev/v2.0, not2.0.Related issues
None.