Skip to content

[$250] Broken card connection violation message not shown to workspace admins #87673

@MelvinBot

Description

@MelvinBot

If you haven't already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!

Connection with other issues: Split from #72055


Action Performed:

  1. Create a workspace with a company card feed connected
  2. As a workspace admin (who is not the expense submitter), view an expense that has a brokenCardConnection violation (i.e., the bank connection for the company card is broken)
  3. Observe the violation message displayed on the expense

Expected Result:

The workspace admin should see the message: "Receipt pending due to broken bank connection. Please resolve in Company cards" — with a link to the Company cards settings page.

This is the behavior implemented in BrokenConnectionDescription for the isPolicyAdmin && !isCurrentUserSubmitter(report) code path.

Actual Result:

The admin only sees a generic "Review" message. The brokenCardConnection-specific violation message does not appear.

Root Cause

There is a conflict between two layers of violation filtering logic:

  1. shouldShowViolation gates all rter violations (including brokenCardConnection type) on (isSubmitter || isInstantSubmitEnabled(policy)). For a workspace admin who is not the expense submitter, on a policy without instant submit, the RTER violation is filtered out entirely.

  2. BrokenConnectionDescription has a code path specifically for isPolicyAdmin && !isCurrentUserSubmitter(report) that renders the admin message — but this is dead code because the violation was already removed upstream by shouldShowViolation.

  3. shouldShowBrokenConnectionViolationInternal also has logic to show the violation to admins for open reports, but its input is already empty because shouldShowViolation filtered the violations first.

The filtering chain is: useTransactionViolations → calls shouldShowViolation → removes the RTER violation → shouldShowBrokenConnectionViolation receives empty array → BrokenConnectionDescription never renders.

Workaround

None known.

Platform:

All platforms.

Version Number: Main (current)

Reproducible in staging?: Yes

Reproducible in production?: Yes

Logs: N/A

Expensify/Expensify Issue URL: N/A

Notes/Photos/Videos: N/A


Originated from: #72055MelvinBot's analysis comment

Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @thelullabyy
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022042689725596467142
  • Upwork Job ID: 2042689725596467142
  • Last Price Increase: 2026-04-10

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type
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