Pin the quote letter's dotted templateKey, as the HR family already is

Testkamo-shared-library
Shipped
2 Septemba 2026, 15:19 UTC
Author
Kamo
Commit
77bcf03

The constant is not the templateKey. CanonicalTemplateLoader.load derives only the FILENAME from the constant (QUOTE_SENT -> quote-sent.json) and reads templateKey out of the JSON — commerce.quote_sent. EmailTemplateService.sendToUser looks the org's row up by the key the CALLER passed and, on a miss, seeds (writing the JSON's key) and retries the SAME caller key, so a sender that passes the constant 404s forever against a row that seeded perfectly. That is what SecurityService's QuoteEmailClient did, and the database says so: 37 orgs carry a commerce.quote_sent row and none has ever carried QUOTE_SENT. The symptom was a swallowed boolean — the link minted, the panel said "Link created", no email was ever sent. QuoteSentTemplateTest pins the JSON leg of the triple the way HrPackageTemplateTest pins the HR one, plus the reverse regression: "tidying" the JSON to match the constant would restore the bug, not fix it. HrPackageTemplateTest's doc comment said this was "live today"; it no longer is.

All changes

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei