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

Add in part to case number #1760

Merged
merged 3 commits into from
Oct 29, 2024
Merged
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
Binary file modified src/backend/expungeservice/files/multnomah_arrest.pdf
Binary file not shown.
10 changes: 10 additions & 0 deletions src/backend/expungeservice/form_filling.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,15 @@ def case_number_with_comments(self):

return with_comments

@property
def case_number_possibly_in_part(self):
case_name = self.case_number

if self.has_ineligible_charges:
case_name = f"{self.case_number} (in part)"

return case_name

##### All charges #####

@property
Expand Down Expand Up @@ -408,6 +417,7 @@ def extra_mappings(self):
"(FOR THE COUNTY OF)": s.county,
"(Plaintiff)": "State of Oregon",
"(Case No)": s.case_number_with_comments,
"(Case Number Possibly In Part)": s.case_number_possibly_in_part, # This field appears only on the Multnomah Arrest form.
"(Defendant)": s.case_name,
"(DOB)": s.date_of_birth,
"(record of arrest with no charges filed)": s.has_no_complaint,
Expand Down
5 changes: 2 additions & 3 deletions src/backend/tests/test_form_filling.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ def test_conviction(self, pdf_factory: Callable, conviction_charge_factory: Call

def test_arrest(self, pdf_factory: Callable, dismissed_charge_factory: Callable):
expected_values = {
"(Case Number)": "(base case number)",
"(Case Number Possibly In Part)": "(base case number)",
"(DA Number)": "(DA num 0)",
"(Case Name)": "(Case Name 0)",
"(Full Name)": "(foo bar)",
Expand All @@ -714,7 +714,7 @@ def test_font_shrinking_and_pdf_write_text(self, MockPdfWriter, pdf_factory: Moc
+ "A.............. Very.................... Long................. Name......................"
)
expected_values = {
"(Case Number)": "(base case number)",
"(Case Number Possibly In Part)": "(base case number)",
"(DA Number)": "(DA num 0)",
"(Case Name)": "(Case Name 0)",
"(Full Name)": "(foo bar)",
Expand All @@ -726,7 +726,6 @@ def test_font_shrinking_and_pdf_write_text(self, MockPdfWriter, pdf_factory: Moc
"(Zip Code)": "(97111)",
"(Dismissed Arrest Dates)": "(Feb 3, 2020)",
"(Dismissed Charges)": f"({charge_name})",
"(Case Number)": "(base case number)",
"(Full Name)": "(foo bar)",
"(DA Number)": "(DA num 0)",
"(Full Name---)": "(foo bar)",
Expand Down
Loading