From 4d4a610fd2615a462cf7e4147a3bbb5c9ec39e3d Mon Sep 17 00:00:00 2001 From: Alexandre Bourdin Date: Wed, 21 Dec 2022 14:00:12 +0100 Subject: [PATCH] Merge pull request #10973 from overleaf/ab-split-test-dash-graphs-fix [web] Include archived tests in split test dashboard stats GitOrigin-RevId: 570b6b5431dce3060a756752d45535a681ae9087 --- .../web/app/src/Features/SplitTests/SplitTestManager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/web/app/src/Features/SplitTests/SplitTestManager.js b/services/web/app/src/Features/SplitTests/SplitTestManager.js index 0e4966ed26..6e92d059d5 100644 --- a/services/web/app/src/Features/SplitTests/SplitTestManager.js +++ b/services/web/app/src/Features/SplitTests/SplitTestManager.js @@ -7,12 +7,12 @@ const ALPHA_PHASE = 'alpha' const BETA_PHASE = 'beta' const RELEASE_PHASE = 'release' -async function getSplitTests({ name, phase, type, activeOnly, archivedOnly }) { +async function getSplitTests({ name, phase, type, active, archived }) { const filters = {} if (name && name !== '') { filters.name = { $regex: _.escapeRegExp(name) } } - if (activeOnly) { + if (active) { filters.$where = 'this.versions[this.versions.length - 1].active === true' } if (type === 'split-test') { @@ -41,9 +41,9 @@ async function getSplitTests({ name, phase, type, activeOnly, archivedOnly }) { filters.$where = query } } - if (archivedOnly) { + if (archived === true) { filters.archived = true - } else { + } else if (archived === false) { filters.archived = { $ne: true } } try {