-
Notifications
You must be signed in to change notification settings - Fork 5
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
Include detailed landlord information from NYCDB in HP Action packet #401
Conversation
# This is kind of yucky, because NYCDB/HPD provides state information as | ||
# all-caps two-letter strings (e.g. "NY") while the HotDocs endpoint wants | ||
# them fully spelled out (e.g. "New York"). However, in practice it doesn't seem | ||
# to mind if we give it the two-letter strings, so we'll just do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Um, I say "in practice it doesn't seem to mind" but I haven't actually verified this, I'm just guessing it's the case. I should verify it before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I just verified it... um... it actually seems like the more granular address info might not be used at all, i.e. LHI is just asking for it so it knows that the full address it pastes together is valid, and it doesn't need to do that with our answers because we paste stuff together on our end. I might be wrong though.
|
||
# TODO: We might actually want to fill this out even if we don't find | ||
# a management company, as this could at least generate the required | ||
# forms. Need to find this out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romeboards I'm curious what you think of this TODO. Do we still want to fill out the fields asking if the management company should be sued, even if we don't find a management company for the user, so that hopefully the forms are in the packet just in case they decide to go that route? Or alternatively, if the user has an individual owner landlord (not a company) does that mean there won't be a management company involved?
def user_to_hpactionvars(user: JustfixUser) -> hp.HPActionVariables: | ||
v = hp.HPActionVariables() | ||
|
||
# TODO: The HP Action form actually has a field for home phone | ||
# and a separate one for work; it's unclear which one the | ||
# user may have provided, but we'll assume it's home for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romeboards also curious what you think of this. Since you filled out "home phone" on LHI's site, I'm guessing it's the one we want to fill out for the user.
@@ -192,6 +192,7 @@ def user_to_hpactionvars(user: JustfixUser) -> hp.HPActionVariables: | |||
] | |||
v.sue_for_repairs_tf = True | |||
v.request_fee_waiver_tf = True | |||
v.sue_for_harassment_tf = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, the PDF wasn't showing the address of the management company at all until I explicitly added this line. So finicky.
This fixes #394.
A note on corporate landlords
I think I made a slight mistake in #380, in that for corporate landlords, I took the "name" value from the company owner field. However, based on the way @romeboards filled out the HP Action form on the LHI website, I think we actually need to take the name from the head officer field (we've been using the address from the head officer field, but not the name).
I think this is because company names are so often hidden behind a shell company that they're rendered fairly useless.
That said, the LHI interactive form makes it seem like you are supposed to put the company name in the "name of landlord" field, because once you select the "company" radio button, the "first name" and "last name" fields (which are shown for individual landlords) disappear and are replaced by a single "name of landlord" field. It seems like the creators of the LHI form were themselves confused, because this snippet shows up in the
Master.cmp
:Notice the commented-out lines; it seems like at some point, they were asking for a contact person's first and last name in the case of corporate landlords, but reverted to just asking for an "entity name".
This is so confusing.
Caching a user's BBL
We're finally moving to just caching a user's BBL, like we already cache their ZIP code, rather than constantly re-fetching it from the geocoding service whenever we need it. However, this is going to require populating the cached field once we make the database migration that's included in this PR. Here's some code to do that: