Closed mkllnk closed 1 month ago
Hello @mkllnk , @filipefurtad0 , @sigmundpetersen , @RachL
May I work on this issue ? (Sorry for the multiple ping, but I guess some of you might enjoy well deserved holidays and I do not know which account I should ping).
@cyrillefr FYI you can use groups @openfoodfoundation/core-devs for devs and @openfoodfoundation/train-drivers-product-owners for PO in doubt ;)
Yes please go ahead I will assign you, many thanks!
@cyrillefr this one is tricky I think. Let me know if you need some help.
Hello @rioug ,
Thanks for your help. I have just uploaded some code and indeed I would need your feedback.(I will made another comment on PR).
Description
When looking at a shop, customer have the ability to filter products by product category, supplier property or product property using the the "tag" under "filter by" on the left hand side of the page.
In the specific scenario where a supplier as set a custom sorting by category, filtering by supplier property doesn't work. When clicking on a supplier property, the "tag" will be selected, but the filtering won't happen and the loading products spinner never disappear. The bug can be reproduced here : https://staging.openfoodnetwork.org.au/noname-hub/shop when filtering by "Free Range"
This was introduced by the Product refactor
Expected Behavior
Only product inheriting "Free Range" supplier property should be displayed
Actual Behaviour
All product are shown, no filtering is happening and Loading products spinner doesn't disappear. There is a request returning a 422 error (see bugsnag below)
Steps to Reproduce
As a enterprise manager
As a customer
Error in Coopcircuits
ActiveRecord::StatementInvalid in api/v0/order_cycles#products PG::UndefinedColumn: ERROR: column first_variant.supplier_id does not exist LINE 4: ...t.product_id JOIN enterprises ON enterprises.id = first_vari... ^
View on Bugsnag
Another one on AU prod: https://app.bugsnag.com/yaycode/openfoodnetwork-aus/errors/668cc120963f0b000858abbf?event_id=668dd06e00efe4c55a620000&i=sk&m=nw
Stacktrace
View full stacktrace
Created by Coopcircuits Admin via Bugsnag
Workaround
Can still browse product it just less convenient to not be able to filter.
Severity
bug-s3: a feature is broken but there is a workaround