CityOfDetroit / bloom

component-based web framework for affordable housing management
Apache License 2.0
16 stars 1 forks source link

Senior Housing Preference Filter #322

Closed avaleske closed 3 years ago

avaleske commented 3 years ago

Blocked by how we're going to store senior housing preference or restriction data. (Ask @anders-schneider)

Should this support filtering to places that have a preference OR a restriction?

avaleske commented 3 years ago

@anders-schneider assigning to you for senior preference/restriction questions

willrlin commented 3 years ago

@anders-schneider do you have an update on this?

anders-schneider commented 3 years ago

Nope; I have a question out to HRD that I just bumped.

willrlin commented 3 years ago

Note to self: this question is another question regarding what the spreadsheet column "Elderly=TRUE" means for the property.

willrlin commented 3 years ago

Assumption to unblock the work: filter on the reserved community type first, think about how much work it would be to include preference in the filter as an OR.

avaleske commented 3 years ago

Another note on this that @elenm and I ran into yesterday as she was working on this: We weren't sure if it's possible for a listing to have multiple reserved community types. That is, could a listing be both Senior and Disabled?

If so, we realized that allowing people to search only for listings with multiple reserved community types (So "Senior AND Disabled" vs "Senior and/or Disabled") would require additional work in how we build the filter query. In the inner query, we'd to filter only to listings that have rows for both community types. If a listing only had one of them, it would need to be excluded somehow (probably by joining the reserved community type table on the listing a second time and checking the first for Senior and the second for Disabled, if that didn't blow up the number of rows too much)

Also, when it comes to implementing this, we noticed a few options (and went with the first one):

avaleske commented 3 years ago

Also, hmm... if a listing can have multiple community types the simple "don't show me listings that are seniors only" won't work, because it will just filter out the rows where the listing is "Seniors" but not the rows where that listing is "Disabled" and so it will still show up in the results. If a listing can only have one community type this isn't a problem.

anders-schneider commented 3 years ago

I think Elen has work in flight on this - I'm going to unassign (but @elenm I'm down to pair on this when you're back!)

elenm commented 3 years ago

Are front end modal changes in scope for this ticket?

Also regarding our discussion with Austin about multiple community types per property, I've decided to assume that there will only be a single community type per property until we know for sure there need to be multiple.

willrlin commented 3 years ago

Yes, I think this covers everything to get the filter working for a user on /listings, not via the eligibility questionnaire (frontend changes, plus any backend filter changes, but I think you were adding the backend portion in another PR).

willrlin commented 3 years ago

Closed by #471