Module: check_mk
Branch: master
Commit: fead0bae132cd74925eb204eb0aea36771220917
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fead0bae132cd7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 6 15:38:12 2016 +0200
3327 FIX Disallow scheduling downtimes with an end date that is before the start date
---
.werks/3327 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/views/commands.py | 3 +++
3 files changed, 14 insertions(+)
diff --git a/.werks/3327 b/.werks/3327
new file mode 100644
index 0000000..f594d5f
--- /dev/null
+++ b/.werks/3327
@@ -0,0 +1,10 @@
+Title: Disallow scheduling downtimes with an end date that is before the start date
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459949875
+
+
diff --git a/ChangeLog b/ChangeLog
index 592535a..91b9bb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -174,6 +174,7 @@
* 3321 FIX: Globes in dashboards now correctly reflect selected WATO folder...
* 3364 FIX: Fixed exception when creating a view of a single log entry...
* 3326 FIX: Fixed white text on white background in mobile GUI
+ * 3327 FIX: Disallow scheduling downtimes with an end date that is before the start
date
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node
selection...
diff --git a/web/plugins/views/commands.py b/web/plugins/views/commands.py
index af56bff..c5fc3c6 100644
--- a/web/plugins/views/commands.py
+++ b/web/plugins/views/commands.py
@@ -566,6 +566,9 @@ def command_downtime(cmdtag, spec, row):
raise MKUserError("_down_to", _("You cannot set a downtime
that ends in the past. "
"This incident will be reported."))
+ if down_to < down_from:
+ raise MKUserError("_down_to", _("Your end date is before your
start date."))
+
title = _("<b>schedule a downtime from %s to %s</b> on ") %
(
time.asctime(time.localtime(down_from)),
time.asctime(time.localtime(down_to)))