openfoodfacts-server icon indicating copy to clipboard operation
openfoodfacts-server copied to clipboard

Prevention - New edit rules to ignore or notify edits that match given conditions

Open stephanegigandet opened this issue 7 years ago • 1 comments

What

We need a new system to easily add rules that can be triggered when products are edited and when the edits match given conditions.

In particular this is needed to ignore unwanted edits from apps.

Proposed features and format:


@edit_rules = (

{
	name => "App XYZ",
	conditions => [
		user_id => "xyz",
	],
	actions => {
		ignore_if_existing_ingredients_texts_fr => 1,
		ignore_if_0_nutriments_fruits-vegetables-nuts_100g => 1,		
		warn_if_match_nutriments_fruits-vegetables-nuts_100g => 100,
		ignore_if_regexp_match_packaging => "^(artikel|produit|producto|produkt|produkte)$",
	},
	notifications => qw (
		[email protected]
		slack_channel_edit-alert
		slack_channel_edit-alert-xyz
	),
},


);

Part of

  • #5538

stephanegigandet avatar Apr 17 '17 10:04 stephanegigandet

Can we close ?

teolemon avatar May 02 '17 06:05 teolemon