mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
This PR closes #15065. As advised by @mtojek, a template's display name may be set to "", which is not useful in an email notification. We'd like to provide a friendly name for the template, but it also needs to be identifiable. As such, we fall back to template.Name in the case that the template's display name is empty.
17 lines
711 B
SQL
17 lines
711 B
SQL
UPDATE notification_templates
|
|
SET
|
|
body_template = E'Hi {{.UserName}},\n\n' ||
|
|
-- Revert to a single label for the template name:
|
|
E'A manual build of the workspace **{{.Labels.name}}** using the template **{{.Labels.template_name}}** failed (version: **{{.Labels.template_version_name}}**).\n\n' ||
|
|
E'The workspace build was initiated by **{{.Labels.initiator}}**.'
|
|
WHERE
|
|
id = '2faeee0f-26cb-4e96-821c-85ccb9f71513';
|
|
|
|
UPDATE notification_templates
|
|
SET
|
|
body_template = E'Hi {{.UserName}},\n\n' ||
|
|
-- Revert to a single label for the template name:
|
|
E'The template **{{.Labels.name}}** was deleted by **{{ .Labels.initiator }}**.\n\n'
|
|
WHERE
|
|
id = '29a09665-2a4c-403f-9648-54301670e7be';
|