Skip to content

Add deduplication logic for selected items in CompareFilter component#3253

Open
AlejandroPerezMartin wants to merge 4 commits intodevelopfrom
fix/GOOWOO-314-comparison-filter-duplicates
Open

Add deduplication logic for selected items in CompareFilter component#3253
AlejandroPerezMartin wants to merge 4 commits intodevelopfrom
fix/GOOWOO-314-comparison-filter-duplicates

Conversation

@AlejandroPerezMartin
Copy link
Collaborator

Changes proposed in this Pull Request:

The Programs Comparison filter allows duplicate program selections, leading to console errors when trying to compare as well as duplicates in the selected filters. This PR filters the response from the Woocommerce Search component and removes duplicated items.

Closes https://linear.app/a8c/issue/GOOWOO-314/duplicate-programs-can-be-selected-in-the-comparison-filter-causing

Replace this with a good description of your changes & reasoning.

Screenshots:

image

Detailed test instructions:

  1. Navigate to the Reports → Programs tab.
  2. Click on the Programs filter and choose the Comparison filter.
  3. Use the search input to select a campaign.
  4. Search again and select the same campaign (duplicate)
  5. Ensure no duplicate filters are added to the list below
  6. Click the Compare button.
  7. Observe there's no error in the browser console

Additional details:

Changelog entry

Fix duplicated values in the report comparison filters

@AlejandroPerezMartin AlejandroPerezMartin self-assigned this Feb 11, 2026
@github-actions github-actions bot added type: bug The issue is a confirmed bug. changelog: fix Took care of something that wasn't working. labels Feb 11, 2026
@AlejandroPerezMartin AlejandroPerezMartin removed the request for review from asvinb February 11, 2026 09:53
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.7%. Comparing base (dd249e1) to head (488e302).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             develop   #3253      +/-   ##
============================================
+ Coverage       66.8%   67.7%    +1.0%     
============================================
  Files            867     360     -507     
  Lines          26180    5866   -20314     
  Branches        1466    1466              
============================================
- Hits           17479    3973   -13506     
+ Misses          8528    1720    -6808     
  Partials         173     173              
Flag Coverage Δ
js-unit-tests 67.7% <ø> (ø)
php-unit-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 507 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asvinb
Copy link
Collaborator

asvinb commented Feb 11, 2026

Thanks @AlejandroPerezMartin . Changes LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants