From 21ed005c849e1d2baa774f43c9b2aaf8133fb049 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 24 Apr 2021 19:47:20 +0200 Subject: [PATCH] Make it possible to enable email notifications when creating a jobset The checkbox is only enabled if `email_notification = 1` is set in `hydra.conf`. However, when creating jobset (in contrast to the edit form), the checkbox is always disabled because the `emailNotification` parameter in Catalyst's stash was missing. --- src/lib/Hydra/Controller/Project.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/Hydra/Controller/Project.pm b/src/lib/Hydra/Controller/Project.pm index f60bb494..ea0be34b 100644 --- a/src/lib/Hydra/Controller/Project.pm +++ b/src/lib/Hydra/Controller/Project.pm @@ -126,6 +126,7 @@ sub create_jobset : Chained('projectChain') PathPart('create-jobset') Args(0) { $c->stash->{template} = 'edit-jobset.tt'; $c->stash->{create} = 1; $c->stash->{totalShares} = getTotalShares($c->model('DB')->schema); + $c->stash->{emailNotification} = $c->config->{email_notification} // 0; }