cityofaustin / atd-moped

A comprehensive mobility project tracking platform for Austin, Texas.
https://mobility.austin.gov/moped/
4 stars 3 forks source link

Update project list view advanced search funding sources #1394

Closed chiaberry closed 2 months ago

chiaberry commented 2 months ago

Associated issues

https://github.com/cityofaustin/atd-data-tech/issues/18361

Update

Going to use this PR to make some small changes to the funding sources filter and come back to the funding program after some more changes.

To test: https://deploy-preview-1394--atd-moped-main.netlify.app/moped/projects?filters=%5B%7B%22field%22%3A%22funding_source_name%22%2C%22operator%22%3A%22string_is_null%22%2C%22value%22%3Anull%7D%5D&isOr=false

Confirm the filter options for the funding sources have been pared down.


old description

The issue description says both funding source and funding program should search on funding_source_and_program_names, but I ran into issues with two different entries in the config searching on the same field. Rather than refactor the entire filter config I instead left the funding source searching on the funding_source_name field.

There is a quirk (or maybe its a bug?) with having the funding program search on the entire source and program name string: if someone searches "is blank", the results are projects that have neither a source nor a program. This project has only a source: https://deploy-preview-1394--atd-moped-main.netlify.app/moped/projects/1802?tab=funding, but will not come up when searching is program blank.

Also the AND search behavior may be more restrictive than if both options were searching on the same field, but this feels more correct to me.

Testing

URL to test:

https://deploy-preview-1394--atd-moped-main.netlify.app/moped/projects?filters=%5B%7B%22field%22%3A%22funding_source_and_program_names%22%2C%22operator%22%3A%22string_contains_case_insensitive%22%2C%22value%22%3A%22Bikeways%22%7D%2C%7B%22field%22%3A%22funding_source_name%22%2C%22operator%22%3A%22string_contains_case_insensitive%22%2C%22value%22%3A%222012+Bond%22%7D%5D&isOr=false

Steps to test:

The link above has a search with Funding source and Funding program. Test searching with only one or the other. Try searching is blank, is not blank.


Ship list

mddilley commented 2 months ago

@roseeichelmann sorry to leave your comment hanging! I agree that it could be confusing. We will be updating the advanced search with a new field for Funding Programs too so I added a note in https://github.com/cityofaustin/atd-data-tech/issues/18763. Thanks!!!