Skip to content

Conversation

sausage-todd
Copy link
Contributor

@sausage-todd sausage-todd commented Jul 28, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at 0821bbc

This pull request improves the member enrichment feature by adding transaction management, enhancing the organization data, and fixing the data format and deduplication issues. It affects the memberEnrichmentCacheRepository, memberRepository, memberService, and memberEnrichmentService modules in the backend/src directory.

🤖 Generated by Copilot at 0821bbc

We're the crew of the MemberEnrichmentService
We update the profiles with skill and finesse
We use transactions to keep the data clean
And we cast JSONB to make the orgs seen

Why

How

🤖 Generated by Copilot at 0821bbc

  • Add transaction management to database queries using SequelizeRepository class (link, link, link, link, link, link, link, link, link)
  • Modify organizations array format and deduplication logic to include member organization relation data (link, link, link, link, link)
  • Add delete query to avoid duplicate work experiences in memberOrganizations table (link)
  • Refresh result variable with updated member data after work experience upserts (link)
  • Add condition to return null if enrichmentData is falsy (link)
  • Add console.log statements for debugging purposes (link, link, link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@sausage-todd sausage-todd force-pushed the feature/c-1921-re-enrichment-duplicates-work-experiences-creating-the-same branch from f8a2b67 to 0821bbc Compare July 28, 2023 14:46
@sausage-todd sausage-todd force-pushed the feature/c-1921-re-enrichment-duplicates-work-experiences-creating-the-same branch from 0821bbc to 4004a5e Compare July 28, 2023 16:26
Misha Savelyev added 6 commits July 31, 2023 12:02
Since they're not part of a unique constraint, we clean them up
manually. Having dates is better than no dates, so we prefer to keep
those with dates. And if we still don't have dates, we'll always
re-create them.
So all queries have access to the same data
@sausage-todd sausage-todd force-pushed the feature/c-1921-re-enrichment-duplicates-work-experiences-creating-the-same branch from 1c8d7da to 057f5a0 Compare July 31, 2023 10:02
@sausage-todd sausage-todd merged commit 9ace3d4 into main Jul 31, 2023
@sausage-todd sausage-todd deleted the feature/c-1921-re-enrichment-duplicates-work-experiences-creating-the-same branch July 31, 2023 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants