#115 — Einkaufsliste — Barcode-Scan nutzt Open Food Facts wie der Vorratsschrank #118
Labels
No labels
priority/could
priority/must
priority/should
priority/wont
status/blocked
status/claimed
status/done-migrated
type/bug
type/feature
type/infra
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
robert/todo#118
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Story: Einkaufsliste — Barcode-Scan nutzt Open Food Facts wie der Vorratsschrank
As a Nutzer der Einkaufsliste,
I want to dass ein unbekannter Barcode automatisch einen Produktnamen vorschlägt (wie im
Vorratsschrank), statt ihn komplett manuell eintippen zu müssen,
so that das Scannen für beide Listentypen gleich zuverlässig funktioniert.
Background
Entdeckt beim manuellen Testen von
#113(Kamera-Scan für die Einkaufsliste): ein bekanntermaßenbei Open Food Facts gelistetes Produkt (
8715035150300, Kikkoman Tamari) wurde beim Scannen inder Einkaufsliste nicht erkannt — kein Bug in
#113selbst, sondern eine seit#90offen gelasseneLücke.
ScanShoppingProductBarcodeCommandHandlerprüft nur, ob der Barcode bereits einem Produktauf der eigenen Liste zugeordnet ist; anders als
ScanPantryProductBarcodeCommandHandler(#94)fragt er nie die externe Open-Food-Facts-Datenbank ab. Der ursprüngliche
#90-Kommentar hatte dasbereits so benannt: "this story doesn't look barcodes up in an external database; that's
#94'sOpen Food Facts lookup, shared here once it exists via the same field" — das Nachziehen wurde nie
umgesetzt.
AC
IOpenFoodFactsClientausCqsTodo/Features/Pantry/OpenFoodFactsClient.csin einegemeinsame Stelle extrahiert (
CqsTodo/OpenFoodFacts/), nutzbar von Pantry und Shopping.ScanShoppingProductBarcodeCommandfragt bei unbekanntem Barcode ohneFallbackNameOpenFood Facts ab und liefert einen
SuggestedNamezurück (analogScanPantryProductBarcodeResultDto).ShoppingBarcodeScanDialogbefüllt das Namensfeld mit dem Vorschlag vor, bleibt abereditierbar/leerbar, bevor der Nutzer bestätigt (identisch zu
PantryBarcodeScanner).ShoppingProductName-Validierung wie jeder manuell eingegebene Name.Out of scope
übernommen aus
#94).#113s/#96sAufgabe, nicht diese hier.