question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Best before is set to the day it was buyed when best before disabled -> API problem

See original GitHub issue

Hi, 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:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
berrndcommented, Apr 22, 2020

Fixed by #767.

1reaction
berrndcommented, Apr 18, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found