-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
feat: Apply default tag on recipe import (by URL) #2930
base: mealie-next
Are you sure you want to change the base?
feat: Apply default tag on recipe import (by URL) #2930
Conversation
|
I guess SQLite doesn't enforce the foreign key constraints in tests, but Postgres does. Will resolve hopefully tomorrow. Review/comments are welcome in the meantime should anyone wish - I'm expecting the subsequent changes will be local to the unit test only. |
Have set this back to draft because I need to actually test the recent changes. Expecting it to go smoothly, but it won't get done today. |
Tested and ready for review again :) |
We have this old issue/task That I think has some cross concerns here. This implementation is very specific, and I'm wondering if there is a better way to generalize the implementation to be more flexible. Otherwise if #1106 ever gets implemented most of this work would likely have to be redone/removed. Having a db structure for Import Automations might be a good step? We could store something like this class ImportAutomation:
rules: RegexAutomation | AlwaysAutomation | TagAutomation # json column maybe?
type: str
groupd_id: UUID
order: int Then we could have multiple rules that could apply in series on every import. |
This PR is stale because it has been open 45 days with no activity. |
FWIW, I agree with the prior comment and it is my intention to at some point make this more generalised.. I have no timeline for when though. |
This PR is stale because it has been open 45 days with no activity. |
What type of PR is this?
What this PR does / why we need it:
The intent here is to allow for an "inbox" type of tag, that would get populated on every URL import and allows a user to review recipes that they haven't reviewed/checked for accuracy.
It might be that someone wants to go in and rename foods. Someone else might want to confirm nutrition looks right, etc..
Many reasons someone might want to confirm the end result of the parsing is exactly what they'd want.
This is just an enabler to make that easier to do - the tag gets added to all recipes imported by URL, bulk or single. It does not get added to other import types (e.g. zip, migration) as it's assumed those are already coming in in a clean state.
By default it's disabled, and requires the user to take action to enable it (in group settings).
Which issue(s) this PR fixes:
None.
Testing
Manual for the most part. Have added unit tests as well.