Module: check_mk
Branch: master
Commit: 17be987b4c6bfa21652ecf65df9eb1d5318c5fef
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=17be987b4c6bfa…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 6 13:16:05 2018 +0100
6926 FIX Notify users: The list of contacts is now sorted
Change-Id: Ie1431cefa9da4dd36d221325c6b9762f6657b1c3
---
.werks/6926 | 11 +++++++++++
cmk/gui/notify.py | 4 +++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/6926 b/.werks/6926
new file mode 100644
index 0000000..e4526e6
--- /dev/null
+++ b/.werks/6926
@@ -0,0 +1,11 @@
+Title: Notify users: The list of contacts is now sorted
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1544089270
+
+
diff --git a/cmk/gui/notify.py b/cmk/gui/notify.py
index 237d1e5..68e0352 100644
--- a/cmk/gui/notify.py
+++ b/cmk/gui/notify.py
@@ -165,7 +165,9 @@ def _vs_notify():
('broadcast', _('Everybody (Broadcast)')),
('list', _('A list of specific users'),
DualListChoice(
- choices=[(uid, u.get('alias', uid)) for uid, u in
config.multisite_users.items()],
+ choices=sorted(
+ [(uid, u.get('alias', uid)) for uid, u in
config.multisite_users.items()],
+ key=lambda x: x[1].lower()),
allow_empty=False,
)),
#('contactgroup', _('All members of a contact group')),