Revert "fix: export only two days of data (#10611)" (#10618)

This reverts commit 77c6aa9eaa.
This commit is contained in:
Marius Andra
2022-07-04 12:35:14 +02:00
committed by GitHub
parent e21bcd3237
commit 8ee6c02af8
2 changed files with 4 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ const secondEvent = makeEvent('1', '2023-05-05T00:00:00.000Z')
const beforeLastEventsTimestamp = '2023-05-05T00:00:00.000Z'
const afterTheFirstEvent = 'the first timestamp'
const afterTwoDaysAgo = '2021-05-03T00:00:00.000Z'
const afterOneMonthAgo = '2021-04-05T00:00:00.000Z'
const afterOneYearAgo = '2020-05-05T00:00:00.000Z'
const fiveDaysAgo = '2021-04-30T00:00:00.000Z'
const orderByTimestamp = '["-timestamp"]'
@@ -411,7 +411,7 @@ describe('eventsTableLogic', () => {
expect(getUrlParameters(logic.values.exportUrl)).toEqual({
properties: emptyProperties,
orderBy: orderByTimestamp,
after: afterTwoDaysAgo,
after: afterOneMonthAgo,
})
})
@@ -424,7 +424,7 @@ describe('eventsTableLogic', () => {
expect(getUrlParameters(logic.values.exportUrl)).toEqual({
properties: propertiesWithFilterValue,
orderBy: orderByTimestamp,
after: afterTwoDaysAgo,
after: afterOneMonthAgo,
})
})

View File

@@ -232,7 +232,7 @@ export const eventsTableLogic = kea<eventsTableLogicType>({
(teamId, exportParams) => `/api/projects/${teamId}/events.csv?${toParams(exportParams)}`,
],
months: [() => [(_, prop) => prop.fetchMonths], (months) => months || 12],
minimumExportDate: [() => [], () => now().subtract(2, 'days').toISOString()],
minimumExportDate: [() => [selectors.months], () => now().subtract(1, 'months').toISOString()],
minimumQueryDate: [() => [selectors.months], (months) => now().subtract(months, 'months').toISOString()],
pollAfter: [
() => [selectors.events],