Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
include:
- docassemble.AssemblyLine:assembly_line.yml
- docassemble.ALMassachusetts:al_massachusetts.yml
- ma1a_portable_schema.yml
---
metadata:
title: >-
Expand Down Expand Up @@ -71,6 +72,7 @@ code: |
al_form_type = "starts_case"
---
objects:
- petitioners: ALPeopleList.using(ask_number=False, target_number=2)
- other_parties: ALPeopleList.using(ask_number=True,target_number=1)
- children: ALPeopleList.using(there_are_any=True)
- users: ALPeopleList.using(there_are_any=True)
Expand All @@ -88,6 +90,7 @@ code: |
nav.set_section("review_a_divorce_agreement")
user_role = "plaintiff"
user_ask_role = "plaintiff"
ma1a_apply_portable_schema
users.gather()
set_parts(subtitle=str(users))
A_Divorce_Agreement
Expand Down Expand Up @@ -115,6 +118,7 @@ code: |
users[0].address.address
signature_date
docket_number
ma1a_export_portable_schema
interview_order_a_divorce_agreement = True
---
###################### Main order ######################
Expand Down Expand Up @@ -1168,4 +1172,3 @@ attachment:
tagged pdf: True



Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
include:
- docassemble.AssemblyLine:assembly_line.yml
- docassemble.ALMassachusetts:al_massachusetts.yml
- ma1a_portable_schema.yml
---
metadata:
title: >-
Expand Down Expand Up @@ -71,6 +72,7 @@ code: |
al_form_type = "starts_case"
---
objects:
- petitioners: ALPeopleList.using(ask_number=False, target_number=2)
- other_parties: ALPeopleList.using(ask_number=False,target_number=1)
- children: ALPeopleList.using(there_are_any=True)
- users: ALPeopleList.using(there_are_any=True)
Expand Down Expand Up @@ -115,6 +117,7 @@ code: |
allowed_courts = ['Probate and Family Court']
user_role = "plaintiff"
user_ask_role = "plaintiff"
ma1a_apply_portable_schema

# Parties
nav.set_section("parties")
Expand Down Expand Up @@ -272,6 +275,7 @@ code: |
users[0].address.address
signature_date
docket_number
ma1a_export_portable_schema

# Review
nav.set_section("review_a_divorce_agreement")
Expand Down Expand Up @@ -1952,4 +1956,3 @@ attachment:
docx template file: a_divorce_agreement.docx
tagged pdf: True


128 changes: 128 additions & 0 deletions docassemble/ADivorceAgreement/data/questions/ma1a_portable_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
comment: |
Adapter between the package-level MA 1A / Portable schema and the
standalone separation-agreement interview.

The shared 1A package uses petitioners[0] and petitioners[1]. This interview
keeps users[0] for Party A and other_parties[0] for Party B so it can remain
useful as a standalone agreement interview.

Children here are children of the parties/marriage who are subject to the
agreement. Do not use the financial-statement household/dependent child
fields for this interview.
---
code: |
if defined("petitioners[0].name.first") and not defined("users[0].name.first"):
users[0].name.first = petitioners[0].name.first
if defined("petitioners[0].name.middle") and not defined("users[0].name.middle"):
users[0].name.middle = petitioners[0].name.middle
if defined("petitioners[0].name.last") and not defined("users[0].name.last"):
users[0].name.last = petitioners[0].name.last
if defined("petitioners[0].name.suffix") and not defined("users[0].name.suffix"):
users[0].name.suffix = petitioners[0].name.suffix
if defined("petitioners[0].address.address") and not defined("users[0].address.address"):
users[0].address.address = petitioners[0].address.address
if defined("petitioners[0].address.unit") and not defined("users[0].address.unit"):
users[0].address.unit = petitioners[0].address.unit
if defined("petitioners[0].address.city") and not defined("users[0].address.city"):
users[0].address.city = petitioners[0].address.city
if defined("petitioners[0].address.state") and not defined("users[0].address.state"):
users[0].address.state = petitioners[0].address.state
if defined("petitioners[0].address.zip") and not defined("users[0].address.zip"):
users[0].address.zip = petitioners[0].address.zip
if defined("petitioners[0].phone_number") and not defined("users[0].phone_number"):
users[0].phone_number = petitioners[0].phone_number
if defined("petitioners[0].email") and not defined("users[0].email"):
users[0].email = petitioners[0].email

if defined("petitioners[1].name.first") and not defined("other_parties[0].name.first"):
other_parties[0].name.first = petitioners[1].name.first
if defined("petitioners[1].name.middle") and not defined("other_parties[0].name.middle"):
other_parties[0].name.middle = petitioners[1].name.middle
if defined("petitioners[1].name.last") and not defined("other_parties[0].name.last"):
other_parties[0].name.last = petitioners[1].name.last
if defined("petitioners[1].name.suffix") and not defined("other_parties[0].name.suffix"):
other_parties[0].name.suffix = petitioners[1].name.suffix
if defined("petitioners[1].address.address") and not defined("other_parties[0].address.address"):
other_parties[0].address.address = petitioners[1].address.address
if defined("petitioners[1].address.unit") and not defined("other_parties[0].address.unit"):
other_parties[0].address.unit = petitioners[1].address.unit
if defined("petitioners[1].address.city") and not defined("other_parties[0].address.city"):
other_parties[0].address.city = petitioners[1].address.city
if defined("petitioners[1].address.state") and not defined("other_parties[0].address.state"):
other_parties[0].address.state = petitioners[1].address.state
if defined("petitioners[1].address.zip") and not defined("other_parties[0].address.zip"):
other_parties[0].address.zip = petitioners[1].address.zip
if defined("petitioners[1].phone_number") and not defined("other_parties[0].phone_number"):
other_parties[0].phone_number = petitioners[1].phone_number
if defined("petitioners[1].email") and not defined("other_parties[0].email"):
other_parties[0].email = petitioners[1].email

if defined("children_of_marriage") and not defined("has_children"):
has_children = children_of_marriage
if defined("children_of_marriage") and not defined("has_no_children"):
has_no_children = not children_of_marriage
if defined("has_children_of_marriage") and not defined("has_children"):
has_children = has_children_of_marriage
if defined("has_children_of_marriage") and not defined("has_no_children"):
has_no_children = not has_children_of_marriage

ma1a_apply_portable_schema = True
---
code: |
if defined("users[0].name.first") and not defined("petitioners[0].name.first"):
petitioners[0].name.first = users[0].name.first
if defined("users[0].name.middle") and not defined("petitioners[0].name.middle"):
petitioners[0].name.middle = users[0].name.middle
if defined("users[0].name.last") and not defined("petitioners[0].name.last"):
petitioners[0].name.last = users[0].name.last
if defined("users[0].name.suffix") and not defined("petitioners[0].name.suffix"):
petitioners[0].name.suffix = users[0].name.suffix
if defined("users[0].address.address") and not defined("petitioners[0].address.address"):
petitioners[0].address.address = users[0].address.address
if defined("users[0].address.unit") and not defined("petitioners[0].address.unit"):
petitioners[0].address.unit = users[0].address.unit
if defined("users[0].address.city") and not defined("petitioners[0].address.city"):
petitioners[0].address.city = users[0].address.city
if defined("users[0].address.state") and not defined("petitioners[0].address.state"):
petitioners[0].address.state = users[0].address.state
if defined("users[0].address.zip") and not defined("petitioners[0].address.zip"):
petitioners[0].address.zip = users[0].address.zip
if defined("users[0].phone_number") and not defined("petitioners[0].phone_number"):
petitioners[0].phone_number = users[0].phone_number
if defined("users[0].email") and not defined("petitioners[0].email"):
petitioners[0].email = users[0].email

if defined("other_parties[0].name.first") and not defined("petitioners[1].name.first"):
petitioners[1].name.first = other_parties[0].name.first
if defined("other_parties[0].name.middle") and not defined("petitioners[1].name.middle"):
petitioners[1].name.middle = other_parties[0].name.middle
if defined("other_parties[0].name.last") and not defined("petitioners[1].name.last"):
petitioners[1].name.last = other_parties[0].name.last
if defined("other_parties[0].name.suffix") and not defined("petitioners[1].name.suffix"):
petitioners[1].name.suffix = other_parties[0].name.suffix
if defined("other_parties[0].address.address") and not defined("petitioners[1].address.address"):
petitioners[1].address.address = other_parties[0].address.address
if defined("other_parties[0].address.unit") and not defined("petitioners[1].address.unit"):
petitioners[1].address.unit = other_parties[0].address.unit
if defined("other_parties[0].address.city") and not defined("petitioners[1].address.city"):
petitioners[1].address.city = other_parties[0].address.city
if defined("other_parties[0].address.state") and not defined("petitioners[1].address.state"):
petitioners[1].address.state = other_parties[0].address.state
if defined("other_parties[0].address.zip") and not defined("petitioners[1].address.zip"):
petitioners[1].address.zip = other_parties[0].address.zip
if defined("other_parties[0].phone_number") and not defined("petitioners[1].phone_number"):
petitioners[1].phone_number = other_parties[0].phone_number
if defined("other_parties[0].email") and not defined("petitioners[1].email"):
petitioners[1].email = other_parties[0].email

if defined("has_children") and not defined("children_of_marriage"):
children_of_marriage = has_children
if defined("has_children") and not defined("has_children_of_marriage"):
has_children_of_marriage = has_children
if defined("has_no_children") and not defined("children_of_marriage"):
children_of_marriage = not has_no_children
if defined("has_no_children") and not defined("has_children_of_marriage"):
has_children_of_marriage = not has_no_children

ma1a_export_portable_schema = True