diff --git a/coderd/database/migrations/000311_improve_dormant_workspace_notification.down.sql b/coderd/database/migrations/000311_improve_dormant_workspace_notification.down.sql new file mode 100644 index 0000000000000..1414f4dfa413b --- /dev/null +++ b/coderd/database/migrations/000311_improve_dormant_workspace_notification.down.sql @@ -0,0 +1,3 @@ +UPDATE notification_templates SET body_template = E'Your workspace **{{.Labels.name}}** has been marked as [**dormant**](https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) because of {{.Labels.reason}}.\n' || + E'Dormant workspaces are [automatically deleted](https://coder.com/docs/templates/schedule#dormancy-auto-deletion-enterprise) after {{.Labels.timeTilDormant}} of inactivity.\n' || + E'To prevent deletion, use your workspace with the link below.' WHERE id = '0ea69165-ec14-4314-91f1-69566ac3c5a0'; diff --git a/coderd/database/migrations/000311_improve_dormant_workspace_notification.up.sql b/coderd/database/migrations/000311_improve_dormant_workspace_notification.up.sql new file mode 100644 index 0000000000000..146ef365dafce --- /dev/null +++ b/coderd/database/migrations/000311_improve_dormant_workspace_notification.up.sql @@ -0,0 +1,3 @@ +UPDATE notification_templates SET body_template = E'Your workspace **{{.Labels.name}}** has been marked as [**dormant**](https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) due to inactivity exceeding the dormancy threshold.\n\n' || + E'This workspace will be automatically deleted in {{.Labels.timeTilDormant}} if it remains inactive.\n\n' || + E'To prevent deletion, activate your workspace using the link below.' WHERE id = '0ea69165-ec14-4314-91f1-69566ac3c5a0'; diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDormant.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDormant.html.golden index 40bd6fc135469..ee3021c18cef1 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDormant.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDormant.html.golden @@ -13,12 +13,13 @@ Content-Type: text/plain; charset=UTF-8 Hi Bobby, Your workspace bobby-workspace has been marked as dormant (https://coder.co= -m/docs/templates/schedule#dormancy-threshold-enterprise) because of breache= -d the template's threshold for inactivity. -Dormant workspaces are automatically deleted (https://coder.com/docs/templa= -tes/schedule#dormancy-auto-deletion-enterprise) after 24 hours of inactivit= -y. -To prevent deletion, use your workspace with the link below. +m/docs/templates/schedule#dormancy-threshold-enterprise) due to inactivity = +exceeding the dormancy threshold. + +This workspace will be automatically deleted in 24 hours if it remains inac= +tive. + +To prevent deletion, activate your workspace using the link below. View workspace: http://test.com/@bobby/bobby-workspace @@ -54,12 +55,13 @@ argin: 8px 0 32px; line-height: 1.5;">
Hi Bobby,
Your workspace bobby-workspace has been marked =
as dormant because of breached the template&r=
-squo;s threshold for inactivity.
-Dormant workspaces are automatically deleted after 24 hour=
-s of inactivity.
-To prevent deletion, use your workspace with the link below.
This workspace will be automatically deleted in 24 hours if it remains i= +nactive.
+ +To prevent deletion, activate your workspace using the link below.