Cancel shifttemplate - #773
Conversation
crosspolar
commented
Apr 18, 2026
- Cancels all shifts after specified date
- Doesn't create new shifts after specified date
# Conflicts: # tapir/shifts/views/views.py # tapir/translations/locale/de/LC_MESSAGES/django.po
Theophile-Madet
left a comment
There was a problem hiding this comment.
I don't think we can use ShiftCancellationService.cancel as is: that would give many shift points to users that were registered as ABCD. Maybe add a parameter to cancel, something like abcd_attendances_get_points, that we would set to false?
# Conflicts: # tapir/translations/locale/de/LC_MESSAGES/django.po
Just a thought, but maybe |
Theophile-Madet
left a comment
There was a problem hiding this comment.
Just a thought, but maybe ShiftCancellationService.cancel should only grant shift point for the next shift in ABCD in general
What other cases are you thinking about?
When cancelling a single shift, we should give a point even if the cancelled shift is in 3 months, no?
| # should be created | ||
| ShiftGenerator.create_shifts_for_group( | ||
| at_date=datetime.date(2025, 11, 10), group=group_a | ||
| ) | ||
|
|
||
| # should not be created | ||
| ShiftGenerator.create_shifts_for_group( | ||
| at_date=datetime.date(2025, 11, 24), group=group_a | ||
| ) | ||
|
|
There was a problem hiding this comment.
We should make 2 test cases for this, or at least assert between the creations.
| if self.start_time and self.end_time: | ||
| if self.start_time >= self.end_time: |
There was a problem hiding this comment.
We can merge the two ifs.