From 24f9126cdff7440087e6c04b2eb1dee1546ebccf Mon Sep 17 00:00:00 2001 From: jackyin <648588267@qq.com> Date: Tue, 25 Feb 2025 12:53:51 +0800 Subject: [PATCH] Interval variable: Fix $__auto value behavior (#100479) --- public/app/features/dashboard-scene/utils/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/dashboard-scene/utils/utils.ts b/public/app/features/dashboard-scene/utils/utils.ts index 60768226dfc..05358cfd0d2 100644 --- a/public/app/features/dashboard-scene/utils/utils.ts +++ b/public/app/features/dashboard-scene/utils/utils.ts @@ -263,7 +263,7 @@ export function getCurrentValueForOldIntervalModel(variable: IntervalVariableMod const selectedInterval = Array.isArray(variable.current.value) ? variable.current.value[0] : variable.current.value; // If the interval is the old auto format, return the new auto interval from scenes. - if (selectedInterval.startsWith('$__auto_interval_')) { + if (selectedInterval.startsWith('$__auto_interval_') || selectedInterval === '$__auto') { return '$__auto'; }