Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Shopping list items of the same type are not consolidated #3417

Open
6 tasks done
Yuni1988 opened this issue Apr 3, 2024 · 5 comments · May be fixed by #5054
Open
6 tasks done

[BUG] - Shopping list items of the same type are not consolidated #3417

Yuni1988 opened this issue Apr 3, 2024 · 5 comments · May be fixed by #5054
Labels
bug: confirmed bug Something isn't working

Comments

@Yuni1988
Copy link

Yuni1988 commented Apr 3, 2024

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

I created a meal plan with breakfast, lunch and dinner recipes selected. When I add the items to the shopping list via the meal planner feature, the items on the shoppinglist are not consolidated. For example, I have several entries for eggs and several entries for salt.

Steps to Reproduce

I'm attaching images that show the workflow.
1.) Fill a day in mealplanner with recipes
2.) Create a shopping list or empty an existing one
3.) Add items from the mealplanner to the shopping list
CreateShoppingList
IngredientList
ItemsBefore

If I them select and de-select items on the shopping list, they will get summed together. So it looks like this step is skipped when adding items via the mealplanner.
ItemsAfter

Please provide relevant logs

The log is empty when I perform these actions.

Mealie Version

v1.4.0, f709d11
Also reproducible on the demo platform.

Deployment

Docker (Linux)

Additional Deployment Details

No response

@Yuni1988 Yuni1988 added bug Something isn't working triage labels Apr 3, 2024
@michael-genson
Copy link
Collaborator

Looks like this is specific to adding from the mealplanner; adding a single recipe is fine, even when it has multiple repeated ingredients (e.g. 1 clove garlic, 2 cloves garlic).

My guess is that it's a race condition due to sending multiple "add recipe" requests at once, and they don't see each other. Solution would be to either send one request at a time (slow) or add a new backend API to accept multiple recipes in one request

@boc-the-git
Copy link
Collaborator

Marking confirmed based on Michael's comment

@padawarmik
Copy link

Hi,
I have the same problem with version 2.1.0.
Is there any update regarding this bug?

@boc-the-git
Copy link
Collaborator

@padawarmik are you able to share your exact replication steps?
This is definitely an edge case bug, so I'm keen to have as much documentation about the scenarios as possible.

@padawarmik
Copy link

padawarmik commented Nov 3, 2024

@boc-the-git
Sure, to reproduce you can make a plan for a day in a meal planner and then try to add an entire day to the shopping list.

image

and here is a part of this shopping list:

image

It happens every time I do the shopping list from the meal planner. I was unable to proceed without replicating the issue.
If I can do something more, let me know. I would be glad to help.

@michael-genson michael-genson linked a pull request Feb 12, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants