CRM 0.3.1: List subscriber counts stay right after deleting a contact
CRM 0.3.1 fixes the subscriber count of contact lists. Deleting a contact for good removed it from its lists, but the lists’ Subscribers number did not go down, so every list the contact was subscribed to stayed one too high.
The CRM now recounts exactly those lists in the same step as the deletion.
Smaller fixes in the same release:
- A search made only of spaces now shows everything instead of nothing, and a search containing a NUL byte no longer causes an error.
- A CSV import with a broken quote or a file that is not UTF-8 no longer crashes the import page.
- Comparing lists ignores malformed list ids and leaves trashed contacts out.
- Restoring a contact or company from the trash is shown as Restored from trash in its history.
Update the dependency; there is no migration. Counts that were already too high before the update are not changed by it.
Full release notes: CRM 0.3.1
0.3.1 · 19 July 2026
Fixed
Contacts.delete_contact/1permanently overcounted a list’ssubscriber_count— the FK cascade onphoenix_kit_crm_list_membersremoves membership rows at the DB level when a contact is hard-deleted, bypassingLists.remove_from_list/2‘s atomic counter decrement (that path only fires on a live status flip). Deleting a contact still"subscribed"on a list left the count permanently stuck one too high.delete_contact/1now snapshots the contact’s subscribed lists and recounts each one (Lists.recount_list/1) in the same transaction as the delete (PR #14).
CRM 0.3.1. Install or update: {:phoenix_kit_crm, "~> 0.3"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.