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: a script to check if existing org can be sync with the crm #10507

Conversation

4nt0ineB
Copy link
Member

@4nt0ineB 4nt0ineB commented Jul 2, 2024

What

The script create a csv file that tells what will be matched in the crm and what will be created.
It's like a verbose dry run of accepting the org.

Screenshot

image

Related issue(s) and discussion

@github-actions github-actions bot added the 🏭 Producers Platform - Odoo OdooCRM is used by the Open Food Facts team to manage producers (and more) relationships label Jul 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 49.30%. Comparing base (dc04d18) to head (273167f).
Report is 461 commits behind head on main.

Files Patch % Lines
lib/ProductOpener/CRM.pm 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10507      +/-   ##
==========================================
- Coverage   49.54%   49.30%   -0.24%     
==========================================
  Files          67       76       +9     
  Lines       20650    21840    +1190     
  Branches     4980     5231     +251     
==========================================
+ Hits        10231    10769     +538     
- Misses       9131     9751     +620     
- Partials     1288     1320      +32     

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

@4nt0ineB 4nt0ineB force-pushed the check-if-orgs-can-be-synced-with-crm branch from c343152 to 7117266 Compare July 2, 2024 15:40
@4nt0ineB 4nt0ineB force-pushed the check-if-orgs-can-be-synced-with-crm branch from bc62047 to 67e1095 Compare July 2, 2024 15:58
@4nt0ineB 4nt0ineB force-pushed the check-if-orgs-can-be-synced-with-crm branch from dfa9285 to 520249a Compare July 4, 2024 13:05
@4nt0ineB 4nt0ineB marked this pull request as ready for review July 4, 2024 13:05
@4nt0ineB 4nt0ineB requested a review from a team as a code owner July 4, 2024 13:05
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.

Awesome

@stephanegigandet stephanegigandet merged commit 6014551 into openfoodfacts:main Jul 4, 2024
12 checks passed
@4nt0ineB 4nt0ineB deleted the check-if-orgs-can-be-synced-with-crm branch July 12, 2024 07:05
4nt0ineB added a commit that referenced this pull request Aug 22, 2024
<!-- IMPORTANT CHECKLIST
Make sure you've done all the following (You can delete the checklist
before submitting)
- [ ] PR title is prefixed by one of the following: feat, fix, docs,
style, refactor, test, build, ci, chore, revert, l10n, taxonomy
- [ ] Code is well documented
- [ ] Include unit tests for new functionality
- [ ] Code passes GitHub workflow checks in your branch
- [ ] If you have multiple commits please combine them into one commit
by squashing them.
- [ ] Read and understood the [contribution
guidelines](https://github.com/openfoodfacts/openfoodfacts-server/blob/main/CONTRIBUTING.md)
-->
### What

Existing orgs have been manually reviewed by @manon-corneille, using a
dump generated by this script
#10507.
This PR provides a migration script
(`scripts/migration/2024_08_validate_and_sync_crm_existing_orgs.pl`) to
accept the selected orgs. The others are rejected and receive a
rejection email notification.

- added sync of org's country
- few fixes in CRM.pm 

- [x]  Awaiting email's wording.


### Screenshot
<!-- Optional, you can delete if not relevant -->

### Related issue(s) and discussion

- Fixes #7355
- Fixes #7359
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏭 Producers Platform - Odoo OdooCRM is used by the Open Food Facts team to manage producers (and more) relationships
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants