Skip to content

Commit

Permalink
changed logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyfey committed Jul 30, 2024
1 parent 0079b83 commit 762617e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ code: |
"beginning_to_user_information_duration": showifdef("beginning_to_user_information_duration.minutes"),
"case_information_time": showifdef("snapshot_case_information_time"),
"user_to_case_information_duration": showifdef("user_to_case_information_duration.minutes"),
"case_type": showif("case_type.true_values().elements",defined('case_type')),
"eviction_reason": showif("eviction_reason.true_values().elements",defined('eviction_reason')),
"case_type": case_type.true_values().elements,
"eviction_reason": eviction_reason.true_values().elements,
"review_time": snapshot_review_time,
"case_to_review_duration": showifdef("case_to_review_duration.minutes"),
"discovery_time": snapshot_discovery_time,
Expand Down Expand Up @@ -270,8 +270,8 @@ code: |
"beginning_to_user_information_duration": beginning_to_user_information_duration.minutes,
"case_information_time": showifdef("snapshot_case_information_time"),
"user_to_case_information_duration": showifdef("user_to_case_information_duration.minutes"),
"case_type": showif("case_type.true_values().elements",defined('case_type')),
"eviction_reason": showif("eviction_reason.true_values().elements",defined('eviction_reason')),
"case_type": case_type.true_values().elements,
"eviction_reason": eviction_reason.true_values().elements,
"review_time": snapshot_review_time,
"case_to_review_duration": showifdef("case_to_review_duration.minutes"),
"discovery_time": showifdef("snapshot_discovery_time"),
Expand All @@ -296,8 +296,8 @@ code: |
"beginning_to_user_information_duration": showifdef("beginning_to_user_information_duration.minutes"),
"case_information_time": showifdef("snapshot_case_information_time"),
"user_to_case_information_duration": showifdef("user_to_case_information_duration.minutes"),
"case_type": showif("case_type.true_values().elements",defined('case_type')),
"eviction_reason": showif("eviction_reason.true_values().elements",defined('eviction_reason')),
"case_type": case_type.true_values().elements,
"eviction_reason": eviction_reason.true_values().elements,
"review_time": snapshot_review_time,
"case_to_review_duration": showifdef("case_to_review_duration.minutes"),
"discovery_time": snapshot_discovery_time,
Expand Down Expand Up @@ -366,6 +366,8 @@ code: |
if motion_to_set_aside_attachment.enabled:
if motion_to_set_aside_judgment_order_exit:
motion_to_set_aside_exit
elif judgment_date_more_than_one_year:
old_judgment_warning
eviction_motion_to_continue_attachment.enabled
eviction_motion_for_leave_attachment.enabled
petition_date
Expand Down Expand Up @@ -445,6 +447,29 @@ code: |
other_parties[i].attorney[0].name.first
other_parties[i].attorney.complete = True
---
sets: old_judgment_warning
id: soft exit old judgment
decoration: hand
question: |
% if person_answering == "tenant":
You may not want to {file} an {answer}
% else:
The tenant may not want to {file} an {answer}
% endif
subquestion: |
% if person_answering == "tenant":
You said that the final judgment date was $( judgment_date }, which was more than a year ago. Although you may still be able to set aside the judgment, you should talk to a lawyer because it is more complicated.
% else:
You said that the final judgment date was $( judgment_date }, which was more than a year ago. Although the tenant may still be able to set aside the judgment, the tenant should talk to a lawyer because it is more complicated.
% endif
buttons:
- ${"I understand, let me keep going" if person_answering == "tenant" else "The tenant understands, let them keep going"}:
code: |
old_judgment_warning = True
- Exit: exit
url: https://motenanthelp.org/
---
sets: posting_warning
id: soft exit posting eviction
decoration: hand
Expand Down Expand Up @@ -692,14 +717,6 @@ continue button field: eviction_defender_intro
buttons:
- I agree: continue
---
only sets: case_type_kickout
id: case type kickout for answer
code: |
if not case_type["AC Rent and Possession"] and not case_type["AC Landlord Action (Bulk)"]:
if unlawful_detainer_kick_out_option:
motion_to_continue_order
case_type_kickout = True
---
code: |
docket_number
filing_date
Expand Down Expand Up @@ -740,9 +757,9 @@ code: |
---
depends on:
- final_judgment
- judgment_date_more_than_30
- judgment_date_more_than_one_year
code: |
motion_to_set_aside_attachment.enabled = final_judgment and not judgment_date_more_than_30
motion_to_set_aside_attachment.enabled = final_judgment and not judgment_date_more_than_one_year
---
question: Motion to Set Aside
subquestion: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ depends on:
- defense_no_breach
- defense_breach_not_material
code: |
if case_type["AC Unlawful Detainer"]:
if eviction_reason["lease violation"]:
defense_ud_did_not_violate_lease = (
defense_no_breach or
defense_breach_not_material
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ code: |
if motion_list['motion_to_set_aside_judgment']:
final_judgment
if (motion_list['motion_to_dismiss'] and (not has_written_lease or lease_attached or not eviction_reason["nonpayment of rent"])) or (motion_list['motion_to_set_aside_judgment'] and (judgment_date_more_than_30 or not final_judgment)):
if (motion_list['motion_to_dismiss'] and (not has_written_lease or lease_attached or not eviction_reason["nonpayment of rent"])) or (motion_list['motion_to_set_aside_judgment'] and (judgment_date_more_than_one_year or not final_judgment)):
warning_kickout_loop
trial_court.name
Expand Down
6 changes: 3 additions & 3 deletions docassemble/MOHUDEvictionProject/data/questions/shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1028,12 +1028,12 @@ code: |
depends on: judgment_date
id: Calculating if judgment_date is more then 30 days ago
code: |
thirty_days_ago = current_datetime() - date_interval(days=30)
one_year_ago = current_datetime() - date_interval(years=1)
if final_judgment:
judgment_date_more_than_30 = judgment_date <= thirty_days_ago
judgment_date_more_than_one_year = judgment_date <= one_year_ago
else:
judgment_date_more_than_30 = True
judgment_date_more_than_one_year = True
---
id: supporting_statement
question: |
Expand Down

0 comments on commit 762617e

Please sign in to comment.