Comments (6)
Hi @filipefurtad0 , the error in the screenshot for the Price field.
I tried replicating on master, and interestingly got a slightly different problem:
- Enable feature toggle admin_style_v3
- On the /products page, choose 'New variant'; set it to have an On demand value. (do not change any other values)
- Hit Save changes.
- Notice changes are not saved, the Unit field has an error ("can't be blank"), and the On hand field has reverted to 0 (not 'on demand').
Can you provide any more details how you had the error on the price field?
I was aware of this problem with the unit field: the unit field is blank by default (1), but when you open the popout (2), it contains a 1
. It's not until you change that value that the change is registered and saved.
from openfoodnetwork.
So in summary (from what I can see so far), it appears to be three problems with creating new variants:
- Unit field is out of sync with the popout
- Price field validation error? (I thought it always defaulted to
0.00
) - 'On demand' selection is lost when error on saving new variant
from openfoodnetwork.
I've removed the good-first-issue
label while we investigate, but FYI that price field error was the one I had in #11633
=> the error appeared on a product I was NOT editing. So perhaps @filipefurtad0 edited a on-hand value, saved and got the price error on another product, hence this issue.
Now how to reproduce this... 💩
from openfoodnetwork.
I can't reproduce this either now @RachL, sorry. I'm not sure what changed, or whether I just bumped on what you describe @dacook, i.e., in the case that something is left blank, the choice regarding stock is not kept:
Notice changes are not saved, the Unit field has an error ("can't be blank"), and the On hand field has reverted to 0 (not 'on demand').
Therefore, I agree with your summary:
- Unit field is out of sync with the popout -> indeed. For a 1 kg product, the default value appearing on the dropdown is 0.001, with an empty Display as field:
-
Price field validation error? (I thought it always defaulted to 0.00) -> I think price is mandatory, and can never be left blank. I think it is ok to get an error, when left blank.
-
'On demand' selection is lost when error on saving new variant -> fully agree, this is reproducible
from openfoodnetwork.
To avoid confusion, maybe it is best to close this issue, and open two issues for points 1) and 3) above? And also for point 2) as well of course, if you feel this is inconsistent behavior (to have Price as a mandatory field).
Looking at #11633 it does seem similar... Although I was not editing a variant, but rather creating a new one. Maybe there is a combination here I'm missing...
from openfoodnetwork.
Ok, created the two issues (mentioned above). I think we can close here.
from openfoodnetwork.
Related Issues (20)
- [BUU] Pagination info is incorrect after cloning/deleting products
- [BUU] No explanation why cloning failed
- [BUU] Activate admin_style_v3 for dev, test and new servers HOT 6
- Allow forgery protection in tests
- Voucher code field at checkout only allows one character HOT 1
- [BUU] Columns broken after cloning HOT 1
- Release v4.5.0 Pommes Frittes HOT 2
- As a shopper, I can access a specific product thanks to a direct link
- [inventory] Producer column is empty in review page HOT 2
- [Flaky] spec/system/consumer/checkout/tax_not_incl_spec.rb
- Release v4.5.1 HOT 6
- [BUU] Activate admin_style_v3 for all super admins HOT 1
- Filtering product by supplier property breaks when enterprise has custom sorting by category set
- [BUU] Activate admin_style_v3 for 25% of users
- Get SiB team (Louis to start with) added to this project HOT 3
- Creating a new variant is selecting the first producer and first category of the dropdown
- [Inventory] Products duplicated and not sorted alphabetically
- Release
- Error in /orders/*: frame window is not ready (Stripe) HOT 16
- [Inventory] Products missing from Inventory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openfoodnetwork.