Problem/Motivation
When you use the OR operator in a filter group, it doesn't work. In fact, the query generated isn't even close to what it should be... Here is an example if set of filters I added to a view:
And then here is the resulting WHERE clause from the query:
WHERE
(
(
// Content: Type (= On-demand)
node__field_format.field_format_target_id = '29'
)
)
AND
(
(
(
// Content: Published (= Yes)
"node_field_data"."status" = '1'
)
AND
(
// Content: Content type (in Event, Training)
"node_field_data"."type" IN ('event', 'training_session')
)
)
AND
(
(
// (field_date_and_location: Paragraph) Paragraph: Date Range (>= + 0 minutes)
DATE_FORMAT((paragraphs_item_field_data_node__field_date_and_location__paragraph__field_date_range.field_date_range_value + INTERVAL -21600 SECOND), '%Y-%m-%d\T%H:%i:%s') >= DATE_FORMAT(('2021-10-19T18:53:48' + INTERVAL -21600 SECOND), '%Y-%m-%d\T%H:%i:%s')
)
)
)
This query isn't even remotely close to what I have it configured as... By my configurations, the expected WHERE clause should be
WHERE
(
(
// Content: Published (= Yes)
"node_field_data"."status" = '1'
)
AND
(
// Content: Content type (in Event, Training)
"node_field_data"."type" IN ('event', 'training_session')
)
)
AND
(
(
// Content: Type (= On-demand)
node__field_format.field_format_target_id = '29'
)
OR
(
// (field_date_and_location: Paragraph) Paragraph: Date Range (>= + 0 minutes)
DATE_FORMAT((paragraphs_item_field_data_node__field_date_and_location__paragraph__field_date_range.field_date_range_value + INTERVAL -21600 SECOND), '%Y-%m-%d\T%H:%i:%s') >= DATE_FORMAT(('2021-10-19T18:53:48' + INTERVAL -21600 SECOND), '%Y-%m-%d\T%H:%i:%s')
)
)
Steps to reproduce
Create a filter group using the `AND` operator, then `AND` that filter group with another filter group that uses the `OR` operator
Proposed resolution
Unknown, the WHERE clause is so far from what it should be I have no idea where to even start