Skip to content

Commit

Permalink
Fix Engagement date filtering (#3350)
Browse files Browse the repository at this point in the history
The optional matches are not needed, these nodes will always exist.
The former clause was causing the filter to not work.

Co-authored-by: Carson Full <[email protected]>
  • Loading branch information
rdonigian and CarsonF authored Jan 13, 2025
1 parent 52d22cc commit 4bcd77b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/engagement/engagement.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ export const engagementFilters = filter.define(() => EngagementFilters, {
node('', 'Language', { id }),
]),
startDate: filter.dateTime(({ query }) => {
query.optionalMatch([
query.match([
[
node('node'),
relation('out', '', 'startDateOverride', ACTIVE),
Expand All @@ -750,7 +750,7 @@ export const engagementFilters = filter.define(() => EngagementFilters, {
return coalesce('startDateOverride.value', 'mouStart.value');
}),
endDate: filter.dateTime(({ query }) => {
query.optionalMatch([
query.match([
[
node('node'),
relation('out', '', 'endDateOverride', ACTIVE),
Expand Down

0 comments on commit 4bcd77b

Please sign in to comment.