mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 23:59:01 +02:00
Merge pull request #10973 from overleaf/ab-split-test-dash-graphs-fix
[web] Include archived tests in split test dashboard stats GitOrigin-RevId: 570b6b5431dce3060a756752d45535a681ae9087
This commit is contained in:
committed by
Copybot
parent
d07a7ce4a2
commit
4d4a610fd2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user