Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Fix and improve detection of apps (name and UUID) to populate data sources #6319

Merged
merged 6 commits into from
Jan 21, 2022

Conversation

stephanegigandet
Copy link
Contributor

@stephanegigandet stephanegigandet commented Jan 20, 2022

We try to identifiy product edits that are made through apps, so that we can populate the data_sources facet. We currently do it by using the comment field that can contain an app name, and in some cases a uuid (used so that we can group contributions by the same user, for instance to check for errors), and/or the specific OFF user used by some app. This has been broken for some time.

This PR:

image

image

@stephanegigandet stephanegigandet requested a review from a team as a code owner January 20, 2022 18:56
@github-actions github-actions bot added Display 🧪 tests Translations We use a non-standard version of GetText, lack language variants support translate.openfoodfacts.org Products Tags labels Jan 20, 2022
Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alexgarel
Copy link
Member

Did you update the documentation to explain the new parameters ?

I think you should update the wiki and the API documentation.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Comment on lines +1110 to +1116
# Allow apps to send app_name, app_version and app_uuid parameters
foreach my $field (qw(app_name app_version app_uuid)) {
my $value = remove_tags_and_quote(decode utf8=>param($field));
if ((defined $value) and ($value ne "")) {
$change_ref->{$field} = $value;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we have three string parameters:

  • app_name
  • app_version
  • app_uuid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Display Products Tags 🧪 tests Translations We use a non-standard version of GetText, lack language variants support translate.openfoodfacts.org
Projects
None yet
4 participants