jariarkko / psgeo

Activity location library
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Filtering is not consistent #338

Closed ralfstrandell closed 1 year ago

ralfstrandell commented 1 year ago

The initial filter uses code in psgeolib.js, to set, for example:

"op": "and", "conds": [ { "op": "activityMatch", "param1": "Caving" }, { "op": "or", "conds": [ { "op": "subactivityMatch", "param1": "Caving", "param2": "Rock" }, { "op": "subactivityMatch", "param1": "Caving", "param2": "Glacier" }, { "op": "subactivityMatch", "param1": "Caving", "param2": "Ice" }, { "op": "subactivityMatch", "param1": "Caving", "param2": "Material-Other" } ] } ]

In RerunFilters the subactivityMatch is lost, however. I assume that we want to use the filter definitions of psgeolib instead of pure activity filtering??? I assume that this is a bug, but I'm not quite sure.

(not a bug: Material-Other is also included or not depending on some settings)

ralfstrandell commented 1 year ago

Fixed in psgeoInitList. Tested to work with Caving, Skiing, Urbanex, Sauna. (and there were also rubbish characters, dD at the end of a filter object name, elsewhere in code messing with filtering)