LemmaLegalConsulting / docassemble-GBLSLetters

Letter Suite for Greater Boston Legal Services.
https://www.gbls.org/
MIT License
0 stars 0 forks source link

address asked before download #16

Open miabonardi opened 9 months ago

miabonardi commented 9 months ago

Issue from #15

@h-mcguire Member Author h-mcguire commented 7 hours ago Thanks! I think it is about the download in AL. It calls CASLS_Retainer_Agreement['final'] and then looks for the clients address set that includes zip. For each variable in the set the interview would look for the object with "_label" after.

So it looked for clients[0].address.address and pulled up the question block that gathers that, then it looked for clients[0].address.address_label. Then it moved to another variable from the set doing the same thing, ending on clients[0].address.zip_label. Not sure if this is helpful or makes sense.

@miabonardi Member miabonardi commented 7 hours ago Can you commit the code that was getting this error?

@h-mcguire corrected error using [i] in order block; address gather error still … 4881045 @h-mcguire Member Author h-mcguire commented 6 hours ago Just committed! The address gather problem also happens when you try to do other documents, see the no contact letter for a quick example.

In the CASLS Retainer there is also a problem where it seems like it is gathering legal_problems before clients[0].name.full despite it being after the name gather. Or more specifically, legal_problems use of ${ clients[0].name } is what triggers the name gather. If you click the dev mode when it gathers name it makes it seem like legal_problems is what triggers the question - not the main order block.

@miabonardi Member miabonardi commented 3 hours ago @nonprofittechy Is there a way to disable the collection of an address on download or preset it in AL?

@nonprofittechy Member nonprofittechy commented 2 hours ago Yes, look for the store_variable_snapshot line that is calling for users[0].address.zip

@miabonardi Member miabonardi commented 2 hours ago That's what I thought it was too, but couldn't find it when I looked. Will try again

@nonprofittechy Member nonprofittechy commented 1 hour ago That's what I thought it was too, but couldn't find it when I looked. Will try again

You can also use the icon in the playground to browse through mentions of any reference to users[0].address.address, and of course try the developer information button </> in the browser when you're running the interview.

image

@miabonardi Member miabonardi commented 1 hour ago I did that for store_variable_snapshot and found nothing. For users[0].address.address and users[0].address.zip only mentions are coming in from ql_baseline.yml. I wonder if something in the al_visual file could be causing this? Should this file be in this repo?

@nonprofittechy Member nonprofittechy commented 16 minutes ago al_visual should be fine for this package. It definitely doesn't mention users[0].address.address

Possibly this could be coming from the work @tobyfey was doing on the legal server integration, but I can't think there's anything in the Assembly Line that would force the address to get gathered.

I think the court gathering used to trigger address, but I don't think it does for a year or more.

@tobyfey Member tobyfey commented 11 minutes ago With GBLS, I also had users[0].address.address being called when it wasn't in the interview or the templates. It would be called during document production, so I assumed it was in the documents, and later realized it wasn't (after I added a code block that set it to GBLS main office).

tobyfey commented 9 months ago

Correction, it is attorneys[0].address.address, and it is no longer asked by the interview; it is now set by a code block. But I do think it adds time for the interview to have to define variables after it starts producing templates, and right now, all of the documents take a long time to produce with little room to spare. And attorneys[0].address.address is not in the template.