Introduce "too late" as an event presence status#3564
Merged
Conversation
ivarnakken
commented
Mar 6, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3564 +/- ##
==========================================
+ Coverage 88.24% 88.27% +0.03%
==========================================
Files 677 679 +2
Lines 21385 21441 +56
==========================================
+ Hits 18871 18927 +56
Misses 2514 2514 ☔ View full report in Codecov by Sentry. |
4 tasks
norbye
reviewed
Mar 7, 2024
Similar to the "not present" status, the user will automatically recieve a penalty. I figured all previous penalties can be removed since only the newest one should matter. I would like some input as to how this will affect other penalties, e.g. given due to late payments (or other things?), as they will also be removed if the presence is changed to something worthy of a penalty. Should we consider to introduce "penalty types" stored on the record, e.g. "presence", "payment", "other"? Also, this resolves a bug, as it is currently not possible to auto delete previous penalties related to the event due to the `.delete()` not being at the end the atomic block. Not sure why it had to be atomic in the first place.
e6f4aae to
425e53c
Compare
norbye
approved these changes
Mar 14, 2024
d7117b0 to
c691405
Compare
Used to distinguish and delete the correct penalties, as penalties from the same type (and event) should in theory never stack.
c691405 to
c9acb5f
Compare
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.
Similar to the "not present" status, the user will automatically receive a penalty. I figured all previous penalties of type "presence" can be removed since they should not stack.
Also, this resolves a bug, as it is currently not possible to auto delete previous penalties related to the event due to the
.delete()not being at the end the atomic block. Not sure why it had to be atomic in the first place.