Module: check_mk
Branch: master
Commit: ea09ae0948c8bbb8a1d66ff2accbae67764aa25a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ea09ae0948c8bb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Dec 4 15:43:28 2014 +0100
#1633 FIX Fix problem that attributes of new WATO folders have not been saved
When you created a new folder then only its name and title would be saved,
not any further attributes. This problem seems to exist from the very
beginning of WATO but nobody noticed...
---
.werks/1633 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 5 ++++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/1633 b/.werks/1633
new file mode 100644
index 0000000..ffbf275
--- /dev/null
+++ b/.werks/1633
@@ -0,0 +1,11 @@
+Title: Fix problem that attributes of new WATO folders have not been saved
+Level: 2
+Component: wato
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417704150
+Class: fix
+
+When you created a new folder then only its name and title would be saved,
+not any further attributes. This problem seems to exist from the very
+beginning of WATO but nobody noticed...
diff --git a/ChangeLog b/ChangeLog
index dbae9ed..26b41ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -178,6 +178,7 @@
* 1625 FIX: Safely handle characters that have a special meaning in regexes when
creating service-specific rules...
* 1637 FIX: Fixed exception in notification analysis when notifications have not
NOTIFICATIONTYPE set
* 1639 FIX: Interfaces with speed more than 10GBit/s can now be configured correctly
+ * 1633 FIX: Fix problem that attributes of new WATO folders have not been saved...
Notifications:
* 1512 Bulk notification can now be grouped according to custom macro values...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 76ff350..c213df8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1804,8 +1804,11 @@ def mode_editfolder(phase, new):
if new:
check_folder_permissions(g_folder, "write")
check_user_contactgroups(attributes.get("contactgroups", (False,
[])))
-
create_wato_folder(g_folder, name, title)
+ g_folder["attributes"] = attributes
+ save_folder(g_folder)
+ log_audit(g_folder, "new-folder", _("Created new folder
%s") % title)
+
else:
# TODO: migrate this block into own function edit_wato_folder(..)
cgs_changed = get_folder_cgconf_from_attributes(attributes) != \