Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate filters to use units summary #530

Closed
Tracked by #63
avaleske opened this issue Sep 3, 2021 · 4 comments · Fixed by #538
Closed
Tracked by #63

Migrate filters to use units summary #530

avaleske opened this issue Sep 3, 2021 · 4 comments · Fixed by #538
Assignees
Labels
bug Something isn't working epic: filtering Tickets related to Filtering size: 5 A few days of work
Milestone

Comments

@avaleske
Copy link

avaleske commented Sep 3, 2021

The availability filter currently looks up the number of available units in the Units Summary table. This may not work for listings that don't use the unit summary table, and instead include every unit in the units table.

It seems like we have two options to make this work:

  • Each time we write to the units table for a listing, update the corresponding units summary rows.
  • Update the filter to also check the units table, if the units summary table is empty.
@avaleske avaleske mentioned this issue Sep 3, 2021
35 tasks
@avaleske avaleske added epic: filtering Tickets related to Filtering size: 5 A few days of work labels Sep 3, 2021
@avaleske avaleske assigned avaleske and abbiefarr and unassigned avaleske Sep 3, 2021
@abbiefarr
Copy link

We'll have to consider this for bedroom and rent filters as well (and potentially more), so ideally we'll have a general solution for whether to use the units or the units summary table for queries.

@avaleske avaleske added this to the M11 milestone Sep 3, 2021
@avaleske avaleske added the M11 label Sep 3, 2021
@avaleske avaleske added the bug Something isn't working label Sep 3, 2021
@abbiefarr
Copy link

As kind of a hack, we've been using disableUnitsAccordion to determine if we're editing the summaries or the units table. This is also a column in the listings table. We could potentially use this setting to determine how we fetch filters.

E.g. if disableUnitsAccordion is true for the listing (i.e. the PM chose to use summaries instead of individual units) then we filter on the summary table. If it's false, we filter on the units table.

@abbiefarr
Copy link

To make this less hacky (and more contributeable upstream), I think we should add a column to the listingstable (and a corresponding radio in the listings form) letting partners pick which table they want to use. Then when filtering we choose our inner query based on this listing property.

@abbiefarr
Copy link

Ok, pivoting on this a bit. After discussing with @willrlin I think it's likely that Exygy will deliver the link between the units and summary table before we wind up getting any units data, so it makes more sense to simplify this and just migrate all the filters to check summary data.

@abbiefarr abbiefarr changed the title Update availability filter to support units table when units summary is not present Migrate filters to use units summary Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working epic: filtering Tickets related to Filtering size: 5 A few days of work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants