I am using Drupal 8, Drupal Commerce 2 for my commerce website.
The product variation has a field 'field_stock' to indicate product stock level.

I have a view to show and filter products.
I added a grouped filter for the 'stock' number field.

Configure filter criterion: Product variation: Available Items (field_stock)
- Filter type to expose: Grouped filters
- Widget type: Select
Available options:
- Any
- Grouping 1: In stock, is greater than, 0
- Grouping 2: Out of stock. is less than or equal, 0

after saving the filter and reopening it, the values set are empty (the zeros in the grouping 1 and grouping 2)

it looks like there's a problem in persisting values for grouped filters!

Comments

Wisamx created an issue. See original summary.

Wisamx’s picture

Issue summary: View changes

Version: 8.5.6 » 8.5.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.5.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

pameeela’s picture

Status: Active » Closed (cannot reproduce)
Issue tags: +Bug Smash Initiative
StatusFileSize
new38.87 KB
new29.37 KB
new52.24 KB

Thanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.

As part of the Bug Smash Initiative, we are triaging Drupal core issues with the priority 'Major'.

I've tried to reproduce this but it is working fine on 9.0.2.

Grouped filter config:

In stock results:

Out of stock results:

Going to close based on this, may have been fixed elsewhere but I wasn't able to find an issue for it.