From 47590c08a4bbd5b413af5060514f7e1b1181ce9a Mon Sep 17 00:00:00 2001 From: Henrik Norlin Date: Thu, 31 Aug 2023 10:25:06 +0200 Subject: [PATCH] [FIX] web_timeline: date_delay = date_stop - date_start --- web_timeline/static/src/js/timeline_controller.esm.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web_timeline/static/src/js/timeline_controller.esm.js b/web_timeline/static/src/js/timeline_controller.esm.js index 3cc8b19a6558..b9aef14f4599 100644 --- a/web_timeline/static/src/js/timeline_controller.esm.js +++ b/web_timeline/static/src/js/timeline_controller.esm.js @@ -282,6 +282,10 @@ export default AbstractController.extend({ .utc() .format("YYYY-MM-DD HH:mm:ss"); } + if (this.date_delay && this.date_start && this.date_stop && item.end) { + default_context["default_".concat(this.date_delay)] + = (moment(item.end) - moment(item.start)) / 3600000; + } if (item.group > 0) { default_context["default_".concat(this.renderer.last_group_bys[0])] = item.group;