-
-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fully remove SKU on product level #11973
Comments
Thanks Konrad! I don't see uses cases for option C. |
I would definitely go for Option A - people have distinct SKUs on variants |
apologies for initial misread! |
@openfoodfoundation/core-devs is option A a papercut? |
With a quick search of the codebase, it appears that Konrad has already identified all usages. Note that there's currently two But if we're removing the product SKU, I think we should also consider:
But if we're happy to start with simply:
Then I'd say it's a papercut. |
I would like to work on this. |
Sure, thank you, @bouaik! Let's go for option A. And please check David's comment above for some helpful information. Thanks again! |
Hello @bouaik ! I hope this message finds you well. Are you still planning to work on this issue? Let us know if you need more info! |
Is anyone working on it? If not I could try to take a look and get more familiar. I do not want to be a only Rubocops person :D |
Yes you are welcome to @zanetagebka 👍 This is part of the feature #9069 , take a look for more background. |
Thanks Zaneta, I've updated the "possible fix" section in the description above to clarify what's expected. |
I need to get familiar with it and currently do not have too much spare time, but Im looking at the related ticket. |
- remove SKU from JavaScript update
I opened draft PR here. As far as I understood there is currently only need to "hide" this field. I found there is products_v3 as well, do we want to remove it from there as well? |
Hi @zanetagebka yes we are in the process of putting product_v3 as the default dev environment (see #12627). So if you have the time it would be worth doing it on product_v3 as well. |
- remove SKU from JavaScript update
HI @zanetagebka I've closed your PR because we are now using v3 as our default page. If you wish to work on it again ping me. In the meantime I'm unassigning you. |
@RachL I'm interested in picking this up. Is product_v3 fully used in production or are we supporting both new and old pages for now? Also is the product SKU safe to remove from the database after removing from the UI? |
@murjax yes product_v3 is fully in production and we are not supporting the old page anymore. The product SKU can be removed from the database, but a migration might be needed if there are data on the product SKU level. @openfoodfoundation/core-devs do you confirm? |
Thanks for picking this up. |
Description
It is currently possible to set the SKU on product level (on page
/products
) as well as on variant level (on pages/products
and/products/<Product_ID>/variants/<Variant_ID>/edit
. However it is unclear which one is used where.This could be related to #10939 where master variants have been removed - not sure.
Assumption 1: Since it is not possible to edit the product's SKU on page
/products/<Product_ID>/edit
, removing it from/products
page could have been overlooked. In this case always the variant's SKU should be used everywhere - but in some reports the product's SKU is still being used.Assumption 2: It was intentional to keep the SKU field on product level. Then it should be clear where it is used insead of the variant's SKU.Expected Behavior
☑️ Option A: Fully remove SKU on product level
/products
.Orders and Distributors
report).🆇
Option B: Fully keep SKU on product level/products/<Product_ID>/edit
.🆇
Option C: Keep the input field on product level but always use variant's SKUOrders and Distributors
report).Actual Behaviour
SKU can be set for product and variant:
Product's SKU can't be set on the
/products/<Product_ID>/edit
page:Variant's SKU can be set on the
/products/<Product_ID>/variants/<Variant_ID>/edit
page:Variant's SKU is used in order confirmation email:
Variant's SKU is used in order cycle report email:
Product's SKU is used in Orders and Distributors report:
Variant's SKU is used in Order Cycle Supplier Totals report:
Other reports have not yet been checked.
Steps to Reproduce
Animated Gif/Screenshot
See above.
Workaround
Severity
bug-s3: a feature is broken but there is a workaround
OR
bug-s5: we can live with it, only a few users impacted
Your Environment
Possible Fix (for option A)
Step 1:
/admin/products
)/admin/products
with feature toggleadmin_style_v3
; seeapp/views/admin/products_v3
) andignored_columns
Step 2: Then once that change has been released and bedded down, we can perform a full cleanup and delete the database column in a separate PR.
The text was updated successfully, but these errors were encountered: