Best before is set to the day it was buyed when best before disabled -> API problem
See original GitHub issueHi,
when FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING
is set to false, it seems like grocy automatically sets the best before date to the day the item was bought.
This creates a problem with the API request /stock/volatile
(to get the out of stock items) which now always outputs the whole stock because now everything is always expired.
It’s not a big problem, because I can ignore that data, but it’s just useless traffic 😉
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Keep it or toss it? 'Best Before' labels cause confusion | AP News
As awareness grows around the world about the problem of food waste , one culprit in particular is drawing scrutiny: “best before” labels....
Read more >Food – use-by and best-before dates - Better Health Channel
Check the 'use-by' or 'best before' date when you buy food. 'Best-before' dates give you an idea of how long foods will last...
Read more >Best before, use by and sell by dates explained - Eufic
What is the difference between the best before and use by dates? The best before date is about the quality of the food,...
Read more >Best before and use-by dates - Food Standards Agency
It is important to understand best before and use-by dates on food labels to keep food safe and to help reduce food waste....
Read more >Set an expiration date for file access - Google Support
To accept the 30-day expiration date, click Send. and select the expiration date from the calendar. (Optional) To remove the expiration, click Remove...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed by #767.
Alles gut - es wird funktionieren. 😃 Die einzige Änderung wird sein, bei deaktiviertem
FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING
immer “never expires” zu setzen.Nochmal allgemein: Wenn das Flag aktiviert ist (Standard), gibt es kein Standard-MHD. Es muss immer gesetzt werden. Es wird nur vorgeschlagen anhand von “Default best before days” des Produkts, mehr passiert nicht.
Wenn das Flag deaktiviert ist, passiert mit “Default best before days” gar nichts (ist ja sogar auch ausgeblendet dann), das MHD-Eingabefeld ist in der Oberfläche ebenfalls ausgeblendet, trotzdem aber intern erforderlich, deswegen das setzen “irgendeines” Datums, weil ja prinzipiell egal (derzeit Heute, zukünftig Never expires).
An der API werde ich hierzu nix ändern.