- ๐ฎ๐ณIndia kanyan.ror@gmail.com
kanyan.ror@gmail.com โ made their first commit to this issueโs fork.
- Status changed to Postponed: needs info
over 1 year ago 4:04pm 5 June 2023
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')
)
)
Create a filter group using the `AND` operator, then `AND` that filter group with another filter group that uses the `OR` operator
Unknown, the WHERE clause is so far from what it should be I have no idea where to even start
Postponed: needs info
9.5
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
kanyan.ror@gmail.com โ made their first commit to this issueโs fork.