saleor-dashboard icon indicating copy to clipboard operation
saleor-dashboard copied to clipboard

Can't filter Products by a numeric attribute - part 2

Open simon-online opened this issue 2 years ago • 0 comments

You can't filter by a numeric attribute on the Products screen.

Here's an example on the demo dashboard https://demo.saleor.io/dashboard/products/?asc=true&sort=name&attributes%5Brelease-year%5D%5B0%5D=2010

This attempts to filter products by the Release Year numeric attribute on the demo store dashboard.

When you try to do this on the demo dashboard it just ends up returning a "Something went wrong" error.

When I inspect the failed graphql query in Chrome Dev tools I can see the attribute filter is using a date/time range which isn't correct:

filter: {
  attributes: [{slug: "release-year", dateTime: {gte: "2010", lte: "2010"}}]
}

It should be using an integer valuesRange to filter by a numeric value:

filter: {
  attributes: [{slug: "release-year", valuesRange: {gte: "2010", lte: "2010"}}]
}

This is the second issue that I have submitted regarding non-functional numeric attribute filtering of products. Here is the original issue.

It doesn't look like there is actually any testing being done on approved pull requests. This makes for a frustrating developer experience as it means I have to keep spending time submitting detailed bug report issues instead of working on building a site with Saleor.

System information

Dashboard version: v3.7.3

Core version: v3.7.11

Operating system: MacOS

Browser: Chrome

simon-online avatar Sep 21 '22 07:09 simon-online