Commit graph

9 commits

Author SHA1 Message Date
Kailash Nadh
f1dd8a4ccf Add support for campaign-level JSON attributes.
- Add new `attribs` field to the DB.
- New `Attributes` JSON text input in the campaign editor UI.
- Introduces the new `{{ Campaign.Attribs.$key}}` syntax in campaign body.

Closes #2059
2026-01-02 17:26:04 +05:30
Kailash Nadh
a65608c113 Split 'overwrite' on import UI into 2 separate options (userinfo and subscription status). Closes #2496 2026-01-01 00:12:08 +05:30
Kailash Nadh
570bb46d75 Add cron-based VACUUM ANALYZE support for DB maintenance.
- Add a new vacuum setting option on the UI in Admin -> Settings -> Maintenance.
- Also refactor frontend (lock-and-wait-for-restart) login on settings into
  the global vue instance so that it can be reused across contexts.
  Settings.vue and Maintenance.vue both now use it to wait for the backend
  to restart.
2025-11-30 11:54:15 +05:30
Kailash Nadh
583f92a6fc Add bulk deletion (by id or query) to lists and campaigns.
- Like subscribers, select one-or more or 'all' items and delete them
  on the lists and campaigns UIs.
- New `DELETE /api/lists` and `DELETE /api/campaigns` endpoints that
  take one or more `id` params or a single `query` param.
2025-11-28 16:37:20 +05:30
Kailash Nadh
b46e0d6947 Fix list update query returning incorrect state on lists with no campaigns. 2025-11-28 16:37:20 +05:30
Kailash Nadh
e526a5f981 Fix list name not being updated in campaign_lists on list update. Closes #2734. 2025-11-23 15:47:57 +05:30
Kailash Nadh
2074604512 Add archival support to lists.
This patch adds a new `status` field (active, archived) to the lists table and
an 'Archived?' toggle on the UI that allows a list to be marked as archived.
This hides the lists from the lists page, campaigns list selection, list roles,
and public forms. A new "View archived lists" link on the lists UI allows
viewing the list of archived lists.

This is useful to hide/declutter lists by archiving historical, temporary lists
etc. This is largely a UX value addition.

Closes #2613.
2025-11-23 15:39:17 +05:30
Kailash Nadh
6417f30d77 Stop recording to send count on campaign creation.
Prior to this patch, when a new campaign was created, the `to send` count of
subscribers was counted from the subscriptions and added to the campaign to be
displayed on the frontend. However, this had several issues:

- On large databases, the count can be extremely slow, slowing down campaign
  creation.
- The count was purely cosmetic. When a campaign starts, it's recounted (for real)
  anyway.
- The count was also inaccurate. Changing the list on a campaign, or changes to
  the subscribers in a list never updated the count on the campaign, rendering
  it wholly incorrect sometimes.

Closes #2431.
2025-11-23 12:13:50 +05:30
Kailash Nadh
3bf8bdb410
Split queries.sql into multiple files for better readability and maintainability. Closes #2738. (#2776)
Co-authored-by: 13unk0wn <n0b0dy0.000729@gmail.com>
2025-11-22 13:23:10 +05:30