Always show signed up shifts on the schedule - #2379
Open
1Cazarez wants to merge 7 commits into
Open
Conversation
Contributor
|
That's intentional behaviour as the same view is used by the volunteer team to audit where shifts are open, and to show other people, and in that case showing the user's own shifts isn't hugely useful. I'd consider a patch which instead hides that filter from users who aren't volunteer admins since it does seem that functionality is less useful outside the context of a volunteer admin. |
Author
|
Thanks for the context! I've updated the PR to instead hide the 'Show my shifts' filter from non-admin users, following the same {% if is_admin %} pattern already used in that template. Let me know if this looks like the right approach. |
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.
Fixes #1944
Problem: The show_signed_up_only filter ("Show my shifts") is displayed to all users on the volunteer schedule page, including volunteer admins who use the view to audit shift coverage.
Expected Behavior: Regular volunteers should not see the "Show my shifts" filter since it adds little value outside the context of a volunteer admin auditing shift coverage. Admins should retain the filter for auditing purposes.
Current Behavior: The filter is shown to all users. For regular volunteers this causes confusion — shifts can vanish when other filters are active and the "Show my shifts" filter isn't on.
Fix: Wrapped the show_signed_up_only checkbox in {% if not is_admin %} in templates/volunteer/_schedule_filters.html, following the existing {% if is_admin %} pattern already used in the same template for other admin-only controls.
Testing: Added two unit tests in tests/volunteer/test_schedule_filters.py verifying the checkbox renders for non-admins and is hidden for admins. Full test suite passes (./run_tests — 151 passed, 17 skipped).