Repository navigation
fix(checkin): section the check-in list by the grouping mode - #299
Merged
Merged
Conversation
The check-in data still shipped every Nextcloud group when the admin chose "No grouping", so the mobile app sectioned the list by arbitrary account groups (#212). The web only used the list as a filter, which is why it looked right there. The rule deciding which groups section a list (specific: the admin's list; otherwise a restricted appointment's own groups; otherwise all or none) now lives once in ConfigService::sectionGroups() and drives the response summary, the export and the check-in data alike. Each user carries only the sections they belong to, spelled as the list spells them, so clients match them without normalising. The web hides the group filter when nothing comes back; old mobile builds fall back to a single "Others" section with the new payload. e2e: resetAdminSettings() now also resets both grouping modes, so the guests spec sends the mode explicitly like the admin UI does; the mode-switching check-in filter test lives in its own sequential-admin spec.
…mode Two "Group Select Field Behavior" tests expected the whitelist picker right after loading the page. It was only there because an earlier test had switched the row to "Specific groups" and the reset never undid it. Now that resetAdminSettings() resets the mode, the tests select the mode themselves, and the API-driven order tests send it along as the admin UI does.
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.
Summary
GET /api/appointments/{id}/checkin-datastill shipped every Nextcloud group asuserGroupsand every group of a user ingroupswhenever the whitelist was empty — the old fan-out that feat(summary): make response-summary grouping an explicit mode #222 removed from the response summary. The web view only usesuserGroupsas a filter dropdown, so it looked right there; the mobile app sections the list by it and showed arbitrary account groups.ConfigService::sectionGroups()(static, so the service tests with a mockedConfigServicestay untouched) now drives the response summary, the export and the check-in data alike: the admin's list in "specific" mode, otherwise a restricted appointment's own groups ([Bug] Restricting access disables grouping in answers #199), otherwise all groups in "all" mode and none in "none".groupscarries only the sections the user belongs to, spelled as the section list spells them (matched case-insensitively). Clients render it without intersecting again. Wire-compatible: old mobile builds already keep only groups listed inuserGroupsand fall back to a single "Others" section when the list is empty.resetAdminSettings()resets both grouping modes; the guests spec sends the mode explicitly like the admin UI does; the mode-switching check-in filter test lives in a newsequential-adminspec (41-checkin-group-filter.spec.js), andgoToCheckin()moved into the fixtures.Paired mobile PR: luflow/attendance-flutter#115 (renders a headerless list and no group filter when
userGroupsis empty).Follow-ups noted, not in this PR: the
"Others"sentinel appears inuserGroupsonly in "all" mode;ResponseSummaryService::isGroupAllowedCached()could read the shared rule too.Test plan
./scripts/check.shgreen (eslint, stylelint, php-cs-fixer, psalm, PHPUnit, vite build, l10n checks, OpenAPI spec)CheckinServiceTestcases: "none" ships a flat list without touchinggetAllGroupIds(), "all" sections by every group, "specific" by the admin's list (its spelling wins), a restricted appointment by its own groupscheckin.spec.js,41-checkin-group-filter.spec.js,5-export,6-visibility-groups,16-guests-integrationpass; the remaining suite runs in CI🤖 Generated with Claude Code