Skip to content

Commit

Permalink
fix(experiments): Avoid displaying results on draft experiments (#27374)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber authored Jan 9, 2025
1 parent 5c0e29c commit bd3ca52
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions frontend/src/scenes/experiments/experimentLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,13 @@ export const experimentLogic = kea<experimentLogicType>([
setExperimentStatsVersion: async ({ version }, breakpoint) => {
actions.updateExperiment({ stats_config: { version } })
await breakpoint(100)
actions.loadMetricResults(true)
actions.loadSecondaryMetricResults(true)
if (values.experiment?.start_date) {
actions.loadMetricResults(true)
actions.loadSecondaryMetricResults(true)
} else {
actions.loadMetricResultsSuccess([])
actions.loadSecondaryMetricResultsSuccess([])
}
},
endExperiment: async () => {
const endDate = dayjs()
Expand Down Expand Up @@ -763,8 +768,13 @@ export const experimentLogic = kea<experimentLogicType>([
},
updateExperimentSuccess: async ({ experiment }) => {
actions.updateExperiments(experiment)
actions.loadMetricResults()
actions.loadSecondaryMetricResults()
if (experiment.start_date) {
actions.loadMetricResults()
actions.loadSecondaryMetricResults()
} else {
actions.loadMetricResultsSuccess([])
actions.loadSecondaryMetricResultsSuccess([])
}
},
setExperiment: async ({ experiment }) => {
const experimentEntitiesChanged =
Expand Down

0 comments on commit bd3ca52

Please sign in to comment.