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

fix: existing orgs migration script to crm #10727

Merged

Conversation

4nt0ineB
Copy link
Member

What

Fixed a bunch of things in the sync process in CRM.pm.
Also, in migration script :

  • orgs created after the date of dump, used to review the orgs, are skipped.

@4nt0ineB 4nt0ineB requested a review from a team as a code owner August 23, 2024 15:52
@github-actions github-actions bot added 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers Display 👥 Users 🏭 Producers Platform - Odoo OdooCRM is used by the Open Food Facts team to manage producers (and more) relationships 🏭 Orgs labels Aug 23, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 1.72414% with 57 lines in your changes missing coverage. Please review.

Project coverage is 49.23%. Comparing base (dc04d18) to head (20b0aaf).
Report is 606 commits behind head on main.

Files Patch % Lines
lib/ProductOpener/CRM.pm 1.96% 49 Missing and 1 partial ⚠️
lib/ProductOpener/Orgs.pm 0.00% 5 Missing ⚠️
lib/ProductOpener/Display.pm 0.00% 1 Missing ⚠️
lib/ProductOpener/Users.pm 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10727      +/-   ##
==========================================
- Coverage   49.54%   49.23%   -0.32%     
==========================================
  Files          67       77      +10     
  Lines       20650    22064    +1414     
  Branches     4980     5269     +289     
==========================================
+ Hits        10231    10863     +632     
- Misses       9131     9875     +744     
- Partials     1288     1326      +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. label Aug 26, 2024
Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

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

Thank you!

}

my $org_is_valid = exists $orgs_to_accept{$org_id};
if ($org_is_valid) {
$org_ref->{valid_org} = 'accepted';
sync_org_with_crm($org_ref, $User_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

So when we ran the script on Friday on the first orgs, some were accepted, but not synced in the crm?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes exactly

Copy link

sonarcloud bot commented Aug 26, 2024

@stephanegigandet stephanegigandet merged commit 1e255d4 into openfoodfacts:main Aug 27, 2024
13 checks passed
stephanegigandet pushed a commit that referenced this pull request Aug 28, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.43.0](v2.42.0...v2.43.0)
(2024-08-28)


### Features

* add rate-limiting on facet pages
([#10738](#10738))
([9e9e321](9e9e321))


### Bug Fixes

* ban more AI bots in robots.txt
([#10726](#10726))
([4ce657e](4ce657e))
* existing orgs migration script to crm
([#10727](#10727))
([1e255d4](1e255d4))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Display 🏭 Orgs 🏭 Producers Platform - Odoo OdooCRM is used by the Open Food Facts team to manage producers (and more) relationships 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. 🧪 tests 🌐 Translations 👥 Users
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants