fix(search): filter event search with division#805
Conversation
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-hobbies-pr805.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-events-pr805.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-sports-pr805.dev.hel.ninja 🚀🚀🚀 |
|
TAPAHTUMAT-UI branch is deployed to platta: https://tapahtumat-pr805.dev.hel.ninja 🚀🚀🚀 |
|
HARRASTUKSET-UI branch is deployed to platta: https://harrastukset-pr805.dev.hel.ninja 🚀🚀🚀 |
|
LIIKUNTA-UI branch is deployed to platta: https://liikunta-pr805.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://liikunta-pr805.dev.hel.ninja 😆🎉🎉🎉 |
|
EVENTS-GRAPHQL-PROXY branch is deployed to platta: https://events-graphql-proxy-pr805.dev.hel.ninja 🚀🚀🚀 |
|
VENUE-GRAPHQL-PROXY branch is deployed to platta: https://venue-graphql-proxy-pr805.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is failed for https://tapahtumat-pr805.dev.hel.ninja 😿💢💥💥 |
TestCafe result is success for https://harrastukset-pr805.dev.hel.ninja 😆🎉🎉🎉 |
3a6c463 to
0843cd9
Compare
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-events-pr805.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-hobbies-pr805.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-sports-pr805.dev.hel.ninja 🚀🚀🚀 |
|
TAPAHTUMAT-UI branch is deployed to platta: https://tapahtumat-pr805.dev.hel.ninja 🚀🚀🚀 |
TH-1429. NOTE: This affects in every apps searches: - event / course search - similar events - upcoming events The event search result list should not contain events outside the city of Helsinki. This commit fixes the event list search variables to contain a city of Helsinki division filter. The `*Ongoing*` -queries in LinkedEvents are using a search index (cache) that stores only the city of Helsinki events, but when the *Ongoing* -filter is not in use, the result set will contain also events outside the city of Helsinki. When the `allOngoingAnd` text query filter was replaced with a newer `xFullText` filter, the result set was no longer limited to city of Helsinki events (by the search index). To fix that, a new division filter is taken in action. NOTE: This should not be mixed with the `helsinkiOnly` -filter, that is still active in code base (but might be hidden in UI). The `helsinkiOnly` filter currently limits the result set by filtering it with `publisherAnchestor` field value (ahjo:00001; Helsinki; @see https://api.hel.fi/linkedevents/v1/organization/ahjo:00001/).
|
LIIKUNTA-UI branch is deployed to platta: https://liikunta-pr805.dev.hel.ninja 🚀🚀🚀 |
0843cd9 to
b1cfa86
Compare
|
HARRASTUKSET-UI branch is deployed to platta: https://harrastukset-pr805.dev.hel.ninja 🚀🚀🚀 |
|
|
|
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-hobbies-pr805.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-sports-pr805.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-events-pr805.dev.hel.ninja 🚀🚀🚀 |
|
TAPAHTUMAT-UI branch is deployed to platta: https://tapahtumat-pr805.dev.hel.ninja 🚀🚀🚀 |
|
HARRASTUKSET-UI branch is deployed to platta: https://harrastukset-pr805.dev.hel.ninja 🚀🚀🚀 |
|
LIIKUNTA-UI branch is deployed to platta: https://liikunta-pr805.dev.hel.ninja 🚀🚀🚀 |
|
EVENTS-GRAPHQL-PROXY branch is deployed to platta: https://events-graphql-proxy-pr805.dev.hel.ninja 🚀🚀🚀 |
|
VENUE-GRAPHQL-PROXY branch is deployed to platta: https://venue-graphql-proxy-pr805.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://liikunta-pr805.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is failed for https://tapahtumat-pr805.dev.hel.ninja 😿💢💥💥 |
TestCafe result is success for https://harrastukset-pr805.dev.hel.ninja 😆🎉🎉🎉 |
karisal-anders
left a comment
There was a problem hiding this comment.
For clarity IMHO it'd be good to rename the division to divisions because
it is explicitly defined to be an array, and can hold more than one element i.e.
division?: string[];
division: EventSearchParams['division'];
| 'division'
division: [HELSINKI_OCD_DIVISION_ID],
DIVISIONS = 'division',
[EVENT_SEARCH_FILTERS.DIVISIONS]: division,→
divisions?: string[];
divisions: EventSearchParams['divisions'];
| 'divisions'
divisions: [HELSINKI_OCD_DIVISION_ID],
DIVISIONS = 'divisions',
[EVENT_SEARCH_FILTERS.DIVISIONS]: divisions,
```
Otherwise good to merge.
I thought about this also, but then it would not be consistent with other parameters, which are following the naming in the LinkedEvents. In LE, the division-filter really is "division", even though it can handle multiple divisions. The naming actually comes from |



TH-1429.
NOTE: This affects in every apps searches:
The event search result list should not contain events outside the city of Helsinki. This commit fixes the event list search variables to contain a city of Helsinki division filter.
The
*Ongoing*-queries in LinkedEvents are using a search index (cache) that stores only the city of Helsinki events, but when the Ongoing -filter is not in use, the result set will contain also events outside the city of Helsinki. When theallOngoingAndtext query filter was replaced with a newerxFullTextfilter, the result set was no longer limited to city of Helsinki events (by the search index). To fix that, a new division filter is taken in action.NOTE: This should not be mixed with the
helsinkiOnly-filter, that is still active in code base (but might be hidden in UI). ThehelsinkiOnlyfilter currently limits the result set by filtering it withpublisherAnchestorfield value (ahjo:00001; Helsinki; https://api.hel.fi/linkedevents/v1/organization/ahjo:00001/).