All problems

Team Invites Duplicate When Email Casing Differs

Level 1 · node · Data · Duplicate data from missing email normalization

Scenario

A team invitation service should return an existing pending invitation for the same email in the same team. Repeating a lowercase address works, but when an existing invitation contains uppercase letters and a new request uses different casing, another invitation is created and duplicate notifications are sent.

Requirements

- Compare emails case-insensitively within the same team - Do not create a record when a matching pending invitation exists - The same email can be invited independently to another team - An accepted invitation does not block a new pending invitation - Store newly invited emails normalized to lowercase

Acceptance criteria

  • A pending invitation with identical casing is reused
  • The same email with different casing also reuses the pending invitation
  • Another team creates a separate invitation
  • A new pending invitation can be created after acceptance
  • A new email is stored in lowercase