recipes icon indicating copy to clipboard operation
recipes copied to clipboard

Open Data Import: inconsistent update behavior

Open tomtjes opened this issue 2 years ago • 1 comments

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

tomtjes avatar Feb 23 '24 00:02 tomtjes

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.

vabene1111 avatar Feb 28 '24 06:02 vabene1111