RocketChat / RocketChat/Rocket.Chat

Lead Capture features: Either create a migration script fixing records or deprecate it

Open
#40,168 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

todo type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Temporary workaround for legacy data.
Some old records have 'visitorEmails' or 'phone' set to 'null', which breaks the $addToSet below.
Pending Product decision: either run a proper DB migration to fix all nulls,
or deprecate this feature entirely. Remove this once a decision is made.

📝 Found in packages/models/src/models/LivechatVisitors.ts#L387

Commit: 9713af36f5c0d673f2d2093015f322341706bab0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at packages/models/src/models/LivechatVisitors.ts around line 387 and inspect the temporary workaround for null visitorEmails or phone values and the affected $addToSet operation. The issue is complete only after the pending Product decision is made and either a migration fixes the legacy records or the feature is deprecated and the workaround is removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.