Parcourir la source

Merge pull request #10973 from overleaf/ab-split-test-dash-graphs-fix

[web] Include archived tests in split test dashboard stats

GitOrigin-RevId: 570b6b5431dce3060a756752d45535a681ae9087
Alexandre Bourdin il y a 3 ans
Parent
commit
4d4a610fd2
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      services/web/app/src/Features/SplitTests/SplitTestManager.js

+ 4 - 4
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 {