feat: support email-owned CRM templates #24

Open
KofTwentyTwo wants to merge 1 commits from feature/shared-email-templates into develop
pull from: feature/shared-email-templates
KofTwentyTwo commented 2026-10-19 14:55:19 +00:00 (Migrated from github.com)

CRM currently owns a separate email-template table and renderer. Add explicit non-tenant host opt-in to shared qbit-email templates, so email owns rendering and outbox provenance while CRM retains its existing action authorization, caller-visible variables, delivery categories and exact sent-subject history.

  • With sharedEmailTemplates enabled, omit legacy template metadata/PVS and use email_template for Send Email and sequence steps. Default and tenant hosts retain legacy behavior; missing email and tenant opt-in are rejected.
  • Use qbit-email's checked render/send API, preserving native template policy, migrated CRM_LEGACY semantics, suppression and idempotency. Shared-template validation checks the email owner without dereferencing missing transports on unrelated actions.
  • Pin public qbit-email 0.1.0-RC.10 and QQQ BOM 4.1.0-RC.20. Register core CRM health definitions while preserving legacy adapters, execution-time caller/tenant context and worker-context behavior.
  • Document host migration, maintenance, rollback and explicit opt-in in UPGRADE; no production migration is included.

Validation: Java21, UTC, ./mvnw.cmd -B verify dependency:tree with no dependency overrides: 500 tests, zero failures/errors/skips, Checkstyle and required JaCoCo gates PASS. Full command BUILD SUCCESS in 1m02s. Coverage includes all45 action tests, checked real email transport, shared metadata and core/legacy health context parity.

Effective dependencies contain public email RC10 and QQQ core RC20, with no LOCAL artifacts. Resolved email JAR SHA256 matches the Maven Central download. Independently checked Central POM/JAR/sources and detached signature presence; all95 published Java sources match reviewed email PR30. Signed release tag points to38390d74bd1171248e0d39713562e88962edc1dc, differing from PR30 merge only by its release version. Artifact signatures were checked for presence, not cryptographically verified.

Host adoption remains a separate migration/rollout: quiesce CRM writes/workers, recheck counts, migrate populated rows and references with backups/provenance, then enable shared templates. No implicit tenant migration or broad email administration grant.

CRM currently owns a separate email-template table and renderer. Add explicit non-tenant host opt-in to shared qbit-email templates, so email owns rendering and outbox provenance while CRM retains its existing action authorization, caller-visible variables, delivery categories and exact sent-subject history. - With sharedEmailTemplates enabled, omit legacy template metadata/PVS and use email_template for Send Email and sequence steps. Default and tenant hosts retain legacy behavior; missing email and tenant opt-in are rejected. - Use qbit-email's checked render/send API, preserving native template policy, migrated CRM_LEGACY semantics, suppression and idempotency. Shared-template validation checks the email owner without dereferencing missing transports on unrelated actions. - Pin public qbit-email 0.1.0-RC.10 and QQQ BOM 4.1.0-RC.20. Register core CRM health definitions while preserving legacy adapters, execution-time caller/tenant context and worker-context behavior. - Document host migration, maintenance, rollback and explicit opt-in in UPGRADE; no production migration is included. Validation: Java21, UTC, `./mvnw.cmd -B verify dependency:tree` with no dependency overrides: **500 tests, zero failures/errors/skips**, Checkstyle and required JaCoCo gates PASS. Full command BUILD SUCCESS in 1m02s. Coverage includes all45 action tests, checked real email transport, shared metadata and core/legacy health context parity. Effective dependencies contain public email RC10 and QQQ core RC20, with no LOCAL artifacts. Resolved email JAR SHA256 matches the Maven Central download. Independently checked Central POM/JAR/sources and detached signature presence; all95 published Java sources match reviewed email PR30. Signed release tag points to38390d74bd1171248e0d39713562e88962edc1dc, differing from PR30 merge only by its release version. Artifact signatures were checked for presence, not cryptographically verified. Host adoption remains a separate migration/rollout: quiesce CRM writes/workers, recheck counts, migrate populated rows and references with backups/provenance, then enable shared templates. No implicit tenant migration or broad email administration grant.
This pull request has changes conflicting with the target branch.
  • CHANGELOG.md
  • pom.xml
  • src/main/java/com/kingsrook/qbits/crm/health/CrmHealthChecks.java
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/shared-email-templates:feature/shared-email-templates
git checkout feature/shared-email-templates
Sign in to join this conversation.