localgovdrupal / localgov_events

Events for LocalGov Drupal.
GNU General Public License v2.0
1 stars 0 forks source link

Fiqure out a way to nest the date filters correctly so the other filters apply #108

Open andybroomfield opened 1 year ago

andybroomfield commented 1 year ago

Just making a note here as needs some more thought.

Odd issue noted. BHCC added a few extra exposed filters to the events view, which have caused an unexpected oddity. We added a proximity filter, and this is bringing back events in far away places when searching for a local location. Example: https://www.brighton-hove.gov.uk/events?search=&proximity%5Bsource_configuration%5D%5Borigin_address%5D=whitehawk&dates=choose&start=&end=&bhcc_cost_value=All Brings back an event in Hangleton, when the location is Whitehawk.

Screenshot 2023-06-02 at 2 49 43 pm

I rounded this down to the Hangleton event spanning multiple days, instead of being set up as daily recurring.

It looks like the events filters that are set up in seperate Or group causes this, but then removing this filters out events whose end dates span the period as well.

Screenshot 2023-06-02 at 2 49 31 pm

Trying to remember the reason for the complex set up (there was one, otherwise events that should appear don't) We also need to fiqure out how to nest the date filter groups, as they should be combined together, but views can't support that in the UI at least.

eg.

- Exposed filter 1
  AND
- Exposed filter 2
  AND
- Date groups
-- Date group 1
--- Start date start filter
    AND
--- End date end filter
   OR
-- Date group 2
--- End date start filer
    AND
--- End date end filter