TandoorRecipes / recipes

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

Open Data Import: inconsistent update behavior #2972

Open tomtjes opened 6 months ago

tomtjes commented 6 months ago

Tandoor Version

beta (commit bba44b0c1e3c5d03430520df184af0a400a3f406)

Setup

Docker / Docker-Compose

Reverse Proxy

No reverse proxy

Other

No response

Bug description

It's unclear what happens when Update Existing Data is checked for an Open Data Import.

I created a new instance, did an open data import, then edited some of the foods, then imported from open data again.

The table below shows 6 foods with 6 different edits. After the second data import, the site said that 1 food was updated and 1 conversion was updated. As the table shows, in fact 2 foods were updated.

edit before update after update
change food name singular restored, plural not updated
change values of properties not updated
delete 2 out of 4 properties deleted properties restored
change shopping category not updated
change conversion values values restored
change Properties Food Amount not updated

Desired behavior:

I think people have a lot of different preferences especially for naming conventions. Food names should not be restored to their open data value by default. However I would expect that edited property values do get restored. On the other hand, someone might have edited them on purpose to match their preferred brand. The same is true for conversions. I think ideally, the user would get a choice which fields should be updated/restored from open data.

Relevant logs

No response

vabene1111 commented 6 months ago

I do agree with you, ideally there would be a list of fields that will be updated and the user could choose which ones. This is also probably something that can be done with the new rewrite of the importer I did for the last round. I will first have to work on the new frontend which will take a while but once that's done I can look into this.