Skip to content

Commit

Permalink
Merge pull request #1760 from wittejm/add-in-part-to-case-number
Browse files Browse the repository at this point in the history
Add in part to case number
  • Loading branch information
wittejm authored Oct 29, 2024
2 parents 77122b4 + 03e6581 commit 6576549
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
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

0 comments on commit 6576549

Please sign in to comment.