From f32bb3dd5681d92ab75e38e44493ee42bdd9a60a Mon Sep 17 00:00:00 2001 From: Ronny Bruska Date: Tue, 12 Nov 2024 15:27:25 +0100 Subject: [PATCH] 17169 FIX Also rename parents in folder properties CMK-21232 Change-Id: I9d26cec7816550b4b9497ed592321793002d49fd --- .werks/17169.md | 17 +++++++++++++++++ cmk/gui/watolib/hosts_and_folders.py | 1 + 2 files changed, 18 insertions(+) create mode 100644 .werks/17169.md diff --git a/.werks/17169.md b/.werks/17169.md new file mode 100644 index 00000000000..fe119bd71b9 --- /dev/null +++ b/.werks/17169.md @@ -0,0 +1,17 @@ +[//]: # (werk v2) +# Also rename parents in folder properties + +key | value +---------- | --- +date | 2024-11-12T14:26:51+00:00 +version | 2.3.0p21 +class | fix +edition | cre +component | wato +level | 1 +compatible | yes + +If you renamed a host and a folder had this host as a parent in its properties, +the host was not renamed in the folder properties. + +This has been fixed. diff --git a/cmk/gui/watolib/hosts_and_folders.py b/cmk/gui/watolib/hosts_and_folders.py index 1705d9d6e51..193ba5e61a8 100644 --- a/cmk/gui/watolib/hosts_and_folders.py +++ b/cmk/gui/watolib/hosts_and_folders.py @@ -2590,6 +2590,7 @@ def rename_parent(self, oldname, newname): if not changed: return False + self.attributes["parents"] = [HostName(h) for h in new_parents] add_change( "rename-parent", _l('Renamed parent from %s to %s in folder "%s"')