From b7fda9aa44eaed795b88bb5c7228114afdf2f977 Mon Sep 17 00:00:00 2001 From: Brian Pond Date: Thu, 31 Mar 2022 10:12:14 -0700 Subject: [PATCH] Update report Scheduled Task Summary to calculate via UTC --- .../btu_scheduled_task_summary.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/btu/btu_core/report/btu_scheduled_task_summary/btu_scheduled_task_summary.json b/btu/btu_core/report/btu_scheduled_task_summary/btu_scheduled_task_summary.json index 9e28502..8231016 100644 --- a/btu/btu_core/report/btu_scheduled_task_summary/btu_scheduled_task_summary.json +++ b/btu/btu_core/report/btu_scheduled_task_summary/btu_scheduled_task_summary.json @@ -9,13 +9,13 @@ "filters": [], "idx": 0, "is_standard": "Yes", - "modified": "2021-12-17 15:48:24.757554", + "modified": "2022-03-26 02:59:13.080158", "modified_by": "Administrator", "module": "BTU_Core", "name": "BTU Scheduled Task Summary", "owner": "Administrator", "prepared_report": 0, - "query": "SELECT\n\t TaskSchedule.name AS \"Schedule ID:Link/BTU Task Schedule:100\"\n\t,TaskSchedule.task AS \"Task ID:Link/BTU Task:100\"\n\t,TaskSchedule.task_description AS \"Task Description:Data:200\"\n\t,TaskSchedule.schedule_description AS \"Schedule Description:Data:200\"\n\t,drv1.date_time_started\t\tAS \"Last Run On:Data:150\"\n\t,drv1.execution_time\t\t\tAS \"Last Duration (secs):Data:150\"\n\t,drv1.success_fail\t\t\tAS \"Last Result:Data:150\"\n\t,TIMESTAMPDIFF(HOUR,drv1.date_time_started\t,now())\t\tAS \"Hours Since Last:Data:150\"\nFROM\n\t`tabBTU Task Schedule`\tAS TaskSchedule\n\nLEFT JOIN\t\n\t(\n\tSELECT schedule, date_time_started, execution_time, success_fail,\n\tROW_NUMBER() OVER (ORDER BY schedule, date_time_started DESC) - \n\tRANK() OVER (ORDER BY schedule) \tAS occurrence\n\t\n\tFROM `tabBTU Task Log`\tAS TaskLog\n\t) drv1\n\t\nON\n\tdrv1.schedule = TaskSchedule.name\nAND drv1.occurrence = 0\n\t\nWHERE\n\tTaskSchedule.enabled = 1\n", + "query": "SELECT\n\t TaskSchedule.name AS \"Schedule ID:Link/BTU Task Schedule:100\"\n\t,TaskSchedule.task AS \"Task ID:Link/BTU Task:100\"\n\t,TaskSchedule.task_description AS \"Task Description:Data:200\"\n\t,TaskSchedule.schedule_description AS \"Schedule Description (UTC):Data:200\"\n\t,DATE_FORMAT(drv1.date_time_started, \"%W, %M %d %Y @ %h:%m:%s %p\") AS \"Last Run On:Data:150\"\n\t,drv1.execution_time\t\t\tAS \"Last Duration (secs):Data:150\"\n\t,drv1.success_fail\t\t\tAS \"Last Result:Data:150\"\n\t,TIMESTAMPDIFF(HOUR, drv1.date_time_started, CONVERT_TZ(UTC_TIMESTAMP, 'UTC', 'America/New_York'))\t\tAS \"Hours Since Last:Data:150\"\nFROM\n\t`tabBTU Task Schedule`\tAS TaskSchedule\n\nLEFT JOIN\t\n\t(\n\t# Times here are Eastern.\n\tSELECT schedule, date_time_started, execution_time, success_fail,\n\tROW_NUMBER() OVER (ORDER BY schedule, date_time_started DESC) - \n\tRANK() OVER (ORDER BY schedule) \tAS occurrence\n\t\n\tFROM `tabBTU Task Log`\tAS TaskLog\n\t) drv1\n\t\nON\n\tdrv1.schedule = TaskSchedule.name\nAND drv1.occurrence = 0\n\t\nWHERE\n\tTaskSchedule.enabled = 1\n", "ref_doctype": "BTU Task Log", "report_name": "BTU Scheduled Task Summary", "report_type": "Query Report",