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

Added CASLS retainer agreement #15

Merged
merged 5 commits into from
Mar 18, 2024
Merged

Conversation

h-mcguire
Copy link
Collaborator

This PR adds the docx and yml for the CASLS retainer agreement. It also makes necessary adjustments to attachment, objects, and bundles to produce document as output.

I also removed the attachment block from one of the yml for the plain_langauge_retainer per the Lemma Style Guide.

…created and edited necessary attachment and object blocks. document is automating without issue.
Copy link
Contributor

@miabonardi miabonardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work here.

A few things:

  1. Down the CASLS letter path only, after collecting signatures, it collects addresses which are not used on output document. I don't think this should be happening. Maybe try looking into why these are being triggered?

  2. The header and logo are overlapping and should be adjusted
    Screen Shot 2024-02-06 at 10 59 24 AM

  3. Logo in bottom corner is getting cut off
    Screen Shot 2024-02-06 at 11 00 27 AM

…header and footer). could not resolve order bug and improper gather of client + atty address.
Copy link
Contributor

@miabonardi miabonardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress here.

Did you test these changes?

I ran into an error after selecting CASLS as document:

Screen Shot 2024-02-20 at 7 55 17 AM

You'll need to change the order block to make the [i] be [0]. If you need more than 1 client or attorney, you'll want to do a clients.gather()

@h-mcguire
Copy link
Collaborator Author

I must have totally not tested this - sorry for committing broken code. I was trying to fix the ordering and gather problem (it's gathering the address's for attorney and client after signatures and without me asking for it in any code I wrote). I tried to do it by changing how complete_attribute for attorneys and clients was implemented. I used the [i] based on how the process was discussed in the documentation here.

I tried to just have complete_attribute defined only within the individual .yml but it didn't fix the gathering issue.

@miabonardi
Copy link
Contributor

No worries!

You're working on an interview order block, and the link you sent is a question block (which is why they are working differently for you).

Check out how I've edited the example you're looking at to do something similar to what you're going for. You can run this in the playground by creating a new project, and naming the yml file.

objects:
  - location: |
      DAList.using(
        object_type=Address,
        there_are_any=True)
---
# main interview order
# only 1 mandatory True
mandatory: True
code: |
  location.gather()
  download
---
event: download
question: |
  The locations
subquestion: |
  % for loc in location:
  * ${ loc }
  % endfor
---
question: |
  What is the address of the
  ${ ordinal(i) } location?
fields:
  - Address: location[i].address
  - Unit: location[i].unit
    required: False
  - City: location[i].city
  - State: location[i].state
    code: |
      states_list()
  - Zip: location[i].zip
    required: False
---
question: |
  Would you like to add another location?
yesno: location.there_is_another

For troubleshooting why its asking for address even when the interview order and the template do not ask for it, on the page it asks for it, select developer information and scroll to the bottom and see why it's being called. A zip code might be required on download in AL, but we can figure it out if this is causing your issue.

@h-mcguire
Copy link
Collaborator Author

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
Copy link
Contributor

Can you commit the code that was getting this error?

@h-mcguire
Copy link
Collaborator Author

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
Copy link
Contributor

@nonprofittechy Is there a way to disable the collection of an address on download or preset it in AL?

@nonprofittechy
Copy link
Contributor

Yes, look for the store_variable_snapshot line that is calling for users[0].address.zip

@miabonardi
Copy link
Contributor

That's what I thought it was too, but couldn't find it when I looked. Will try again

@nonprofittechy
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link

tobyfey commented Feb 20, 2024

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).

setup.py Outdated Show resolved Hide resolved
@nonprofittechy nonprofittechy merged commit 115ee60 into main Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants