KamoCRM

The campaigns grid read counts the API never sent

Fixkamo-internal
Shipped
11 செப்டம்பர், 2026 அன்று 10:59 PM UTC
Author
Kamo
Commit
1895c28

EmailService's CampaignDTO carries a campaign's counters flat (totalCount, sentCount, failedCount, suppressedCount, bouncedCount, queuedCount), but every screen here reads them as campaign.counts. Nothing mapped one to the other. The grid destructures c.counts for each row, so /marketing/email crashed with "Cannot destructure property 'total' of 't.counts' as it is undefined" as soon as an org had a single campaign, and the editor's `c.counts || ZERO_COUNTS` fallback meant it showed zero progress for every campaign. emailCampaignApi now normalizes at the boundary: toCampaign builds counts from the flat fields (a missing counter is 0, never undefined, and a counts object the server sends is kept), and the list and every call that returns a campaign go through it.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing