Skip to content

[ADVAPP-2885]: Some users have reported that in campaigns, the population group drop‑down only shows their population groups - #2782

Merged
payal-canyon merged 13 commits into
mainfrom
BugFix/ADVAPP-2885
Sep 1, 2026
Merged

payal-canyon merged 13 commits into
mainfrom
BugFix/ADVAPP-2885

Conversation

@mittal-canyon

Copy link
Copy Markdown
Contributor

Ticket(s) or GitHub Issue

Technical Description

Some users have reported that in campaigns, the population group drop‑down only shows their population groups

Any deployment steps required?

NO

Cleanup Tasks

N/A


Before contributing and submitting this PR, make sure you have Read, agree, and are compliant with the contributing guidelines.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread app-modules/campaign/src/Filament/Resources/Campaigns/Pages/CreateCampaign.php Outdated
Comment thread app-modules/campaign/src/Filament/Resources/Campaigns/Pages/EditCampaign.php Outdated
mittal-canyon and others added 5 commits August 24, 2026 22:05
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
@mittal-canyon
mittal-canyon marked this pull request as ready for review August 24, 2026 18:26
@mittal-canyon
mittal-canyon requested a review from a team as a code owner August 24, 2026 18:26
Comment thread app-modules/campaign/src/Filament/Resources/Campaigns/Pages/CreateCampaign.php Outdated
Comment thread app-modules/campaign/src/Filament/Forms/Components/PopulationGroupSelector.php Outdated
Comment thread app-modules/campaign/src/Filament/Forms/Components/PopulationGroupSelector.php Outdated
Comment thread app-modules/campaign/src/Filament/Resources/Campaigns/Pages/EditCampaign.php Outdated
…erver-side, filter Population Type by license, fix draft-state wording, add missing test coverage
Comment thread app-modules/campaign/src/Filament/Forms/Components/PopulationGroupSelector.php Outdated
Comment thread app-modules/campaign/src/Filament/Forms/Components/PopulationGroupSelector.php Outdated
Comment thread app-modules/campaign/src/Filament/Forms/Components/PopulationGroupSelector.php Outdated
…deterministic ordering, align department filter and enum usage per review
@payal-canyon
payal-canyon added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit fd0d4c5 Sep 1, 2026
7 checks passed
@payal-canyon
payal-canyon deleted the BugFix/ADVAPP-2885 branch September 1, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Change Type | Bug Fix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants