Skip to content

Lead search by name returns no results when first and last name are in different fields #709

Description

@anshulpahwa

Bug Report

Reported by: @Maya-chen (Sales Ops)

When using the lead list search, filtering by a rep's name like "John" returns zero results even though leads named "John Smith" clearly exist in the system.

Steps to reproduce:

  1. Create a lead with first_name="John", last_name="Smith"
  2. GET /api/leads/?name=John
  3. Expected: lead appears in results
  4. Actual: empty list

Root cause hint: The filtering logic in the list view may be using the wrong boolean operator when combining first/last name conditions.

Acceptance criteria:

  • GET /api/leads/?name=John returns all leads where either first name OR last name contains "John"
  • Add or update a test asserting the correct results for a partial-name search
  • Existing tests should continue to pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions