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
GNU Affero General Public License v3.0
632 stars 370 forks source link

Make producers more in control of Append/Replace behaviour, field by field #7850

Open alexgarel opened 1 year ago

alexgarel commented 1 year ago

Context

On pro platform, as we import data there are two types of behaviour:

This behaviour is true, either when I import data with a CSV, or when the data is published to pro platform.

Story

As a producer,

  1. when I import products from a CSV on the producer platform I want to be able to specify that for a certain field, my list of value is final (and not an addition to existing values)
  2. when my data is published on the public platform, I want the same behavior

PS: making a single ticket as problems are related, might be splet though

Tags values:

relevant code:

Fields:

Also note that "brands" as some special handlings.

alexgarel commented 1 year ago

Technically,

stephanegigandet commented 1 year ago

Many of the tags fields are not direct input fields, only a few can be written directly (allergens, categories, countries, labels etc.).

It's probably worth looking at each of those fields to see which behaviour we want, and which behaviour producers may want.

e.g. for allergens and traces, if the producer supplies a non empty value, we probably could remove pre-existing values, both on the producers platform and the public platform.

manon-corneille commented 1 year ago

This would be very helpful for a lot of producers, especially for large ones. In my opinion, within the Pro platform issues, it is one of the most needed. Could it be prioritised over the next few weeks (/months?) please? cc @alexgarel @stephanegigandet

manon-corneille commented 8 months ago

One common case is that producers want to clean the existing data in fields like the ingredient list.

Food for thought ... Here is an example of how Brevo deals with a similar situation.

Image