openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
656 stars 386 forks source link

Add copy paste capability on packaging + tags fields #7996

Open alexgarel opened 1 year ago

alexgarel commented 1 year ago

Currently, on the web site:

Proposal:

This should all be supported by javascript.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity.

john-gom commented 1 year ago

I had a quick look at this and I found the whole packaging area quite hard to understand. For example, if I have said that the packaging is a "Tetra Brik Aspetic", do I still need to list the individual parts of the packaging, like the cap, or is that double-counting?

I think we should therefore be a bit cautious about prolifically "copying and pasting" data as one incorrect entry could then potentially corrupt many others without any kind of audit trail. I would suggest the following enhancement to this idea to help mitigate this:

  1. If packaging data is copied from one product (source) to another (target) then store the source product id against the target product, and add the target product id to a list on the source product. Maybe want to include a timestamp for when the data was copied
  2. If the product data is subsequently edited, create a data quality tag to indicate there may also be a problem with other product data if the product has a "copied from" product id or has any "copied to" product ids. Also make sure that a specific timestamp is stored for packaging edits
alexgarel commented 1 year ago

As discussed yesterday, as the process will probably be done by an advanced contributor, I don't think there will be so much mistakes.