Hi Rui,
Thanks for your detailed report. You found an intersting use case that in Bacularis is normal behaviour in the Bacula configuration context but in the Config/Pattern this takes on a new meaning.
This is about directive fields and its default values. Normally in any configuration field if the field is modified and the value is different than default, this value is saved. In case this checkbox type if default checkbox value is true (enabled) then we don't save it because it is unmodified (value is default value). Unchecking this checkbox causes that it is modified. This is because on your side applying the config with disabled checkbox worked, but applying config with enabled not.
The same situation is with the opposite scenario with saving values if the default value is false (unchecked) and we want to save in Config this false value.
For other fields (non-checkboxes) this is general issue with supporting saved in the Config value that is default field value. For example, in text field default directive XYZ
value is abc
and we want to save in the Config XYZ=abc
.
So, I think we need to implement a way of supporting in Configs/Patterns values if we want to save in Config the value that is the same as default value. For Bacula configuration part this behavior is fine, but in Configs/Patterns not.
Thanks for finding it.
Best regards,
Marcin Haba (gani)