Skip to content

Commit

Permalink
feat: switch default duration (#25922)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
pauldambra and github-actions[bot] authored Oct 31, 2024
1 parent e8d88aa commit 99c8ae7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ describe('sessionRecordingsPlaylistLogic', () => {
filters: {
date_from: '-3d',
date_to: null,
duration: [{ key: 'duration', operator: 'gt', type: 'recording', value: 1 }],
duration: [{ key: 'active_seconds', operator: 'gt', type: 'recording', value: 5 }],
filter_group: {
type: FilterLogicalOperator.And,
values: [
Expand Down Expand Up @@ -793,10 +793,10 @@ describe('sessionRecordingsPlaylistLogic', () => {
filter_test_accounts: false,
having_predicates: [
{
key: 'duration',
key: 'active_seconds',
operator: 'gt',
type: 'recording',
value: 1,
value: 5,
},
],
kind: 'RecordingsQuery',
Expand All @@ -815,10 +815,10 @@ describe('sessionRecordingsPlaylistLogic', () => {
date_to: null,
duration: [
{
key: 'duration',
key: 'active_seconds',
operator: 'gt',
type: 'recording',
value: 1,
value: 5,
},
],
filter_group: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export const PINNED_RECORDINGS_LIMIT = 100 // NOTE: This is high but avoids the

export const defaultRecordingDurationFilter: RecordingDurationFilter = {
type: PropertyFilterType.Recording,
key: 'duration',
value: 1,
key: 'active_seconds',
value: 5,
operator: PropertyOperator.GreaterThan,
}

Expand Down Expand Up @@ -199,7 +199,7 @@ export function convertLegacyFiltersToUniversalFilters(
? DEFAULT_RECORDING_FILTERS['filter_test_accounts']
: filters.filter_test_accounts,
duration: filters.session_recording_duration
? [{ ...filters.session_recording_duration, key: filters.duration_type_filter || 'duration' }]
? [{ ...filters.session_recording_duration, key: filters.duration_type_filter || 'active_seconds' }]
: DEFAULT_RECORDING_FILTERS['duration'],
filter_group: {
type: FilterLogicalOperator.And,
Expand Down

0 comments on commit 99c8ae7

Please sign in to comment.