summarize items on shopping list
The same article is currently listed several times if it is required for several recipes, for example. Please add an option to summarize the same items on the shopping list.
This also happens when I just add an item manually twice.
This is especially a problem, when I add an item via button at start page, because I can't see whats already on the list.
It would be good, if grocy ask me, if I want to add this item twice.
@tiptoptom @GambaJo I just tried to solve this, but the problem is the Grocy API I think. I could simply use /stock/shoppinglist/add-product, but this always overwrites the existing item's note if it has one. Because notes can be important for shopping reasons, this would be unexpected and bad behavior. Please take a look at the browser version, it also just adds a new item without using the /stock/shoppinglist/add-product command that would also overwrite existing notes.
I experimented with checking whether the new item has a note and only then use /objects/shoppinglist/ which always creates a new item, but if it doesn't have a note, /stock/shoppinglist/add-product would take the first item from the same product and overwrites its note with an empty note. Do you agree with me that this would first have to be adressed in the API?
I think it depends on how duplicate entries are intended. My feeling is that either all entries should always be bundled together or always saved as a separate entry. Saving entries separately only if there are notes doesn't seem entirely consistent to me.
Regardless of this, I think you could display all entries bundled as one entry on the shopping list, even if there are several separate entries. Details such as notes etc. could be displayed when you click on the entry or something.
I tried to report it to the grocy app account, but I got a bollocking, so we have to swallow it, like it is. https://github.com/grocy/grocy/issues/2690
I don't understand why there's so much insistence on the adding part. There are various valid reasons why Grocy doesn't enforce a single shopping list item per product (e.g. a shopping list item doesn't need to reference a product, notes and Userfields can be different per shopping list item, there can be more than one shopping list - just to name a few people don't see when only using 0.5 % of the available features while gladly calling out the developer).
Look at it from a different perspective: A shopping list is not enforced to list the shopping list items as-is like from the corresponding database table, why not summarize that view based on whatever criteria you find useful? I would go for that way when I'd do that on the infamous server side where every single detail is done the wrong way on purpose.
@berrnd I don't know the concept behind your shoping list. I don't know the data structure. Maybe I was a little bit naive to think, that a shoping list is a very simple thing, like it used to be, when we wrote it on paper. Maybe other people do it different, but I never saw a paper shoping list with duplicate items (except by accident). And it's difficult to explain it to my wife, who ist not a tech person. For her a shoping list is a simple and overseeable list, because in a big loud store full of people it's not easy to concentrate and look, if there maybe is a duplicate.
My wife and I use grocy. Mostly via the Android app. When I notice that for example we are running out of butter, I set butter on the shoping list. It can happen, that my wife notice this too, and she also set butter on the list. And when one of us is in the store to buy our needs, it's confusing. Does the duplicate entries mean, that we need 1 or several butter, or does it mean, that each one of us set in on the list whitout kowing there is already an entry with this item.
Befor we startet to use grocy, we used a simple Android shoping list app. This app simply showed me a message in this case: Hey dude, are youre sure, this item is already on the list? Should I sum it up to the existing item, or do you want to cancel? I thought this is the standard use case in a shoping list. I didn't know, there are other scenarios.
@GambaJo in this issue, I am mainly concerned with a function in the app that consolidates articles that appear more than once. I'm not sure, but a message when adding an article might have to be discussed independently of this?