Date handling broken in OpsBoard's criteria builder component

Description

Date values are parsed and persisted using the DateFormat instance for the current locale. The restriction (e.g. Gt, Eq and Lt) method just uses the value's toString()-method to compare value which does not make any sense for date values represented in the locale's format. We must use the ISO format at this point.

Environment

https://mynms.opennms.com/Ticket/Display.html?id=6211 OpenNMS 24.1.2

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Christian Pape August 13, 2019 at 8:12 AM

You can now use "+seconds" and "-seconds" for relative values and absolute value can be given in ISO format, e.g. "2019-06-20T20:45:15.123-05:00".

Please review:

Jeff Gehlbach August 12, 2019 at 1:27 PM

Thanks for investigating, .

It's worth mentioning that the user expects to enter a number of whole seconds (e.g. 300 for five minutes) for one of these *EventTime criteria values, and have the value dynamically applied relative to "now". I think that's a reasonable expectation in the context of building dashboards. This may be at odds with the operation of all the other criteria evaluators.

Fixed

Details

Assignee

Reporter

Sprint

Fix versions

Affects versions

Priority

PagerDuty

Created August 10, 2019 at 6:50 AM
Updated August 21, 2019 at 12:00 PM
Resolved August 14, 2019 at 4:07 PM

Flag notifications