From cc054d3818516be3b7a627011ec3eb6f06126428 Mon Sep 17 00:00:00 2001 From: David Cui <53581635+davidcui-amzn@users.noreply.github.com> Date: Tue, 29 Dec 2020 14:10:56 -0800 Subject: [PATCH] fixed report trigger interval vs daily pre-fill for edit (#280) --- .../report_definitions/report_trigger/report_trigger.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx b/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx index 006bc07b..53320af1 100644 --- a/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx +++ b/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx @@ -609,7 +609,8 @@ export function ReportTrigger(props: ReportTriggerProps) { const defaultEditScheduleFrequency = (trigger_params) => { if (trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[0].id) { - if (trigger_params.schedule.interval.unit === 'DAYS') { + if (trigger_params.schedule.interval.unit === 'Days' && + trigger_params.schedule.interval.period === 1) { setScheduleRecurringFrequency('daily'); } else { setScheduleRecurringFrequency('byInterval');