[ADVAPP-2885]: Some users have reported that in campaigns, the population group drop‑down only shows their population groups - #2782
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Campaign create/edit population group selection so that users with broader group permissions can see more than just their own (or their department’s) groups when choosing a campaign population group.
Changes:
- Broadened the
segment_id(Population Group) select options query in Campaign create/edit pages based on a group permission check. - Added/updated Pest tests to assert population group options differ depending on user permissions.
- Ensured edit page options include both the campaign’s current segment and additional available groups.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app-modules/campaign/src/Filament/Resources/Campaigns/Pages/CreateCampaign.php | Adjusts Population Group select options logic based on permissions. |
| app-modules/campaign/src/Filament/Resources/Campaigns/Pages/EditCampaign.php | Adjusts Population Group select options logic based on permissions. |
| app-modules/campaign/tests/Tenant/Filament/Resources/Campaigns/Pages/CreateCampaignTest.php | Adds tests asserting option visibility with/without group view permissions. |
| app-modules/campaign/tests/Tenant/Filament/Resources/Campaigns/Pages/EditCampaignTest.php | Adds test ensuring edit form options include additional groups and current segment. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…d of cannot(array) for group permission check
payal-canyon
requested changes
Aug 25, 2026
…paign population group selection
…hem in campaign tests
payal-canyon
requested changes
Aug 26, 2026
…erver-side, filter Population Type by license, fix draft-state wording, add missing test coverage
… per review decision
payal-canyon
requested changes
Aug 31, 2026
…deterministic ordering, align department filter and enum usage per review
payal-canyon
approved these changes
Sep 1, 2026
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.
Ticket(s) or GitHub Issue
Technical Description
Any deployment steps required?
Cleanup Tasks
Before contributing and submitting this PR, make sure you have Read, agree, and are compliant with the contributing guidelines.