5
11
Fork
You've already forked tomato
1

Prevent volunteers from being assigned during an absence #159

Merged
edwardloveall merged 1 commit from el-volunteer-absence-pickup into main 2026年05月20日 16:03:22 +02:00

When volunteers add an absence, it removes them from their existing shifts. But,
it doesn't stop them from picking up new shifts during that absent period.

Now, when a volunteer tries to do this, they will be stopped and shown an error.
If they try to pick up a recurring shift that starts before and continues after
their absence, they will be added to the occurrences, but removed from the dates
when they are absent.

Notably this does not stop an admin from adding a volunteer to a shift when they
are absent. I did this because I wanted the admin to have the ultimate say over
who is on the shift. For example if the volunteer decided to cancel their
absence and do the shift anyway, it may be too late for them to pick up the past
shift. The admin can add them in case they need to add logs. This is admittedly
unlikely, but I wanted admins to have that flexibility.

When volunteers add an absence, it removes them from their existing shifts. But, it doesn't stop them from picking up new shifts during that absent period. Now, when a volunteer tries to do this, they will be stopped and shown an error. If they try to pick up a recurring shift that starts before and continues after their absence, they will be added to the occurrences, but removed from the dates when they are absent. Notably this does not stop an admin from adding a volunteer to a shift when they are absent. I did this because I wanted the admin to have the ultimate say over who is on the shift. For example if the volunteer decided to cancel their absence and do the shift anyway, it may be too late for them to pick up the past shift. The admin can add them in case they need to add logs. This is admittedly unlikely, but I wanted admins to have that flexibility.
edwardloveall force-pushed el-volunteer-absence-pickup from 757e46e699
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
to ef3dbb94d5
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
2026年05月19日 15:39:44 +02:00
Compare
edwardloveall force-pushed el-volunteer-absence-pickup from ef3dbb94d5
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
to b6dde96fe0
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
2026年05月19日 16:30:31 +02:00
Compare
thetizzo left a comment
Copy link

Looks good!

Looks good!
@ -65,1 +65,4 @@
site:Site
api:
pickup:
pickup:
First-time contributor
Copy link

Does this need both levels of pickup?

Does this need both levels of `pickup`?
Author
Owner
Copy link

Sadly, yes. At least not without a refactor. It's the pickup action of the pickups controller in the api namespace. I think I should rename it to create at some point, but it didn't need to happen here.

Sadly, yes. At least not without a refactor. It's the `pickup` action of the `pickup`s controller in the `api` namespace. I think I should rename it to `create` at some point, but it didn't need to happen here.
Author
Owner
Copy link

Actually, it looks like it isn't needed, my bad. But if I don't have it there, then the i18n-tasks missing or unused complains. They're annoying to wrangle, but I think worth it, especially since we have translation coming up. I also think I do like how it matches all the other controller keys in the file.

Actually, it looks like it isn't needed, my bad. But if I don't have it there, then the `i18n-tasks missing` or `unused` complains. They're annoying to wrangle, but I think worth it, especially since we have translation coming up. I also think I do like how it matches all the other controller keys in the file.
edwardloveall force-pushed el-volunteer-absence-pickup from b6dde96fe0
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
to 98320baaac
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
2026年05月20日 15:51:25 +02:00
Compare
edwardloveall deleted branch el-volunteer-absence-pickup 2026年05月20日 16:03:32 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rootable/tomato!159
Reference in a new issue
rootable/tomato
No description provided.
Delete branch "el-volunteer-absence-pickup"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?