From e02c5e13d9cf329b2e0ca295bb6e5009b170ef89 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sat, 13 Apr 2019 15:25:40 +0200 Subject: [PATCH] baculum: Fix saving job runscript config if RunsWhen=Always --- gui/baculum/protected/Web/Portlets/DirectiveRunscript.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui/baculum/protected/Web/Portlets/DirectiveRunscript.php b/gui/baculum/protected/Web/Portlets/DirectiveRunscript.php index 91b69fd02..8558a1a9d 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveRunscript.php +++ b/gui/baculum/protected/Web/Portlets/DirectiveRunscript.php @@ -60,6 +60,14 @@ class DirectiveRunscript extends DirectiveListTemplate { $directive_value = $config[$i]->{$directive_name}; } + /** + * Because of bug in bdirjson: http://bugs.bacula.org/view.php?id=2464 + * Here is workaround for bdirjson from Bacula versions without fix for it. + */ + if ($directive_name === 'RunsWhen' && $directive_value === 'Any') { + $directive_value = 'Always'; + } + $default_value = null; $data = null; $field_type = 'TextBox'; -- 2.47.3