Skip to content

Commit

Permalink
TMS-968: Event query fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eebbi committed Feb 21, 2024
1 parent 83d938f commit 020dbed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ and this project adheres to [Semantic Versioning][semver].

## [Unreleased]

- TMS-968: Add recurring event fields to manual events
- TMS-968:
- Add recurring event fields to manual events
- Add recurring event logic to events component, combined event search & combined event listing

## [1.2.0] - 2024-02-01

Expand Down
5 changes: 2 additions & 3 deletions src/Models/page-combined-events-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ protected function get_manual_events() : array {
'type' => 'DATE',
],
[
'key' => 'end_datetime',
'value' => '',
'compare' => '!=',
'key' => 'recurring_event',
'value' => 0,
],
],
];
Expand Down
5 changes: 5 additions & 0 deletions src/Models/page-combined-events-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ protected function get_manual_events( $params ) : array {
'posts_per_page' => 200, // phpcs:ignore
's' => $params['q'] ?? '',
'meta_query' => [
'relation' => 'AND',
[
'key' => 'end_datetime',
'value' => [
Expand All @@ -193,6 +194,10 @@ protected function get_manual_events( $params ) : array {
'compare' => 'BETWEEN',
'type' => 'DATE',
],
[
'key' => 'recurring_event',
'value' => 0,
],
],
];

Expand Down

0 comments on commit 020dbed

Please sign in to comment.