TandoorRecipes / recipes

Application for managing recipes, planning meals, building shopping lists and much much more!
https://docs.tandoor.dev
Other
5.17k stars 550 forks source link

Auto Planner uses AND for multiple keywords unclear to user #2930

Open mountaintime26 opened 5 months ago

mountaintime26 commented 5 months ago

Tandoor Version

1.5.12

Setup

Docker / Docker-Compose

Reverse Proxy

Others (please state below)

Other

HA Proxy

Bug description

When using Meal-Plan page, if using Auto-Planner with a single keyword and date range meals are selected and input on to the plan. When using Auto-Planner with more than one keyword, no entries appear after selecting Create Meal Plan.

Share user is selected as logged in user.


Operating Environment:
Linux TandoorVM 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64
Docker Engine - Community
 Version:           25.0.2
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        29cf629
 Built:             Thu Feb  1 00:23:17 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          25.0.2
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       fce6e0c
  Built:            Thu Feb  1 00:23:17 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Relevant logs

No response

vabene1111 commented 5 months ago

@AquaticLava do you want to take a look at this ?

AquaticLava commented 5 months ago

I'll take a look when i get some time, I should be able to over the weekend!

vabene1111 commented 5 months ago

awesome, thank you :)

AquaticLava commented 5 months ago

I'm not seeing the issue on my instance. Could you please provide the following information:

Thanks!

mountaintime26 commented 5 months ago

I'm not seeing the issue on my instance. Could you please provide the following information:

  • Keywords you are using
  • A example or two of what recipes you expected appear as entries
  • Keywords attached to those recipes

Thanks!

Hello, sorry for the delay. I just tried again with a 3 day period FEB 20-22; if i use the keyword "beef" or "chicken" it works and populates the dates, but if I use both words as in the attached photo, then the planner fails to populate any item.

Screen Shot 2024-02-15 at 10 52 18 AM
Cantello commented 4 months ago

Same here. Might it be that the planner automatically uses AND for the keywords and then does not find any recpies with 'beef' AND 'chicken' and silently ignores the error?

AquaticLava commented 4 months ago

Sorry, I thought that I responded to this. You are correct, The autoplanner does a AND operation on the given tags. When i get time I'd create a toast that displays a message along the lines of "Could not find recipes with tags beef and chicken".

Cantello commented 4 months ago

Thanks for the confirmation! Is there currently a way to use any of the keywords, not all?

vabene1111 commented 4 months ago

I think this is currently not supported, I will try to think about this when moving the dialog to the new frontend and add an "or" button.