From f4fc1b6438a02280a8d5e098e822db930d6233c3 Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Tue, 28 Feb 2023 20:12:01 +0530 Subject: [PATCH] fix: unable to create new kpi issue (#10361) * updated cypres.config to run searchflow last * updated cypress config * fixed kpi creation issue * reverting cypress change --- .../src/main/resources/ui/src/pages/KPIPage/AddKPIPage.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/AddKPIPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/AddKPIPage.tsx index ccc09f8958d..b0a0e88d7c8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/AddKPIPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/KPIPage/AddKPIPage.tsx @@ -142,7 +142,7 @@ const AddKPIPage = () => { const handleChartSelect = (value: string) => { const selectedChartValue = dataInsightCharts.find( - (chart) => chart.id === value + (chart) => chart.fullyQualifiedName === value ); setSelectedChart(selectedChartValue); }; @@ -191,7 +191,6 @@ const AddKPIPage = () => { const targetValue = getKpiTargetValueByMetricType(metricType, metricValue); const formData: CreateKpiRequest = { - // TODO: this needs to be fullyQualifiedName of the dataInsightChart dataInsightChart: values.dataInsightChart, description, name: kebabCase(`${values.displayName} ${selectedMetric?.name}`), @@ -256,10 +255,10 @@ const AddKPIPage = () => { data-testid="dataInsightChart" notFoundContent={t('message.all-charts-are-mapped')} placeholder={t('label.select-a-chart')} - value={selectedChart?.id} + value={selectedChart?.fullyQualifiedName} onChange={handleChartSelect}> {chartOptions.map((chart) => ( - ))}