mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +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.
19 lines
850 B
SQL
19 lines
850 B
SQL
UPDATE notification_templates
|
|
SET
|
|
body_template = E'Hi {{.UserName}},\n\n' ||
|
|
E'A manual build of the workspace **{{.Labels.name}}** using the template **{{.Labels.template_name}}** failed (version: **{{.Labels.template_version_name}}**).\n\n' ||
|
|
-- Mention template display name:
|
|
E'The template''s display name was **{{.Labels.template_display_name}}**. ' ||
|
|
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' || -- Add a comma
|
|
E'The template **{{.Labels.name}}** was deleted by **{{ .Labels.initiator }}**.\n\n' ||
|
|
-- Mention template display name:
|
|
E'The template''s display name was **{{.Labels.display_name}}**.'
|
|
WHERE
|
|
id = '29a09665-2a4c-403f-9648-54301670e7be';
|