Skip to content

Commit 8ff0824

Browse files
authored
Merge pull request #1765 from wittejm/jw/probation-selected
always select probation box
2 parents e97549d + bee53f1 commit 8ff0824

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

src/backend/expungeservice/form_filling.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ def extra_mappings(self):
445445
"(1 year has passed since the later of the convictionfindingjudgment or release_2)": s.has_violation_or_contempt_of_court,
446446
"(I have not been convicted of any other offense or found guilty except for insanity_2)": s.has_violation_or_contempt_of_court,
447447
"(I have fully completed complied with or performed all terms of the sentence of the court)": s.has_conviction,
448-
"(I was sentenced to probation in this case and)": s.has_probation_revoked,
448+
"(I was sentenced to probation in this case and)": True,
449+
"(My probation WAS NOT revoked)": not s.has_probation_revoked,
449450
"(My probation WAS revoked and 3 years have passed since the date of revocation)": s.has_probation_revoked,
450451
"(Date of arrest)": s.arrest_dates,
451452
"(no accusatory instrument was filed and at least 60 days have passed since the)": s.has_no_complaint,

src/backend/tests/fixtures/form_filling_data.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
"(1 year has passed since the later of the convictionfindingjudgment or release_2)": None,
5353
"(I have not been convicted of any other offense or found guilty except for insanity_2)": None,
5454
"(I have fully completed complied with or performed all terms of the sentence of the court)": None,
55-
"(I was sentenced to probation in this case and)": None,
56-
"(My probation WAS NOT revoked)": None,
55+
"(I was sentenced to probation in this case and)": "/On",
56+
"(My probation WAS NOT revoked)": "/On",
5757
"(My probation WAS revoked and 3 years have passed since the date of revocation)": None,
5858
"(Date of arrest)": "(Oct 22, 2019)",
5959
"(If no arrest date date of citation booking or incident)": None,
@@ -118,8 +118,8 @@
118118
"(1 year has passed since the later of the convictionfindingjudgment or release_2)": None,
119119
"(I have not been convicted of any other offense or found guilty except for insanity_2)": None,
120120
"(I have fully completed complied with or performed all terms of the sentence of the court)": "/On",
121-
"(I was sentenced to probation in this case and)": None,
122-
"(My probation WAS NOT revoked)": None,
121+
"(I was sentenced to probation in this case and)": "/On",
122+
"(My probation WAS NOT revoked)": "/On",
123123
"(My probation WAS revoked and 3 years have passed since the date of revocation)": None,
124124
"(Date of arrest)": "(Jul 8, 2015)",
125125
"(If no arrest date date of citation booking or incident)": None,
@@ -184,8 +184,8 @@
184184
"(1 year has passed since the later of the convictionfindingjudgment or release_2)": "/On",
185185
"(I have not been convicted of any other offense or found guilty except for insanity_2)": "/On",
186186
"(I have fully completed complied with or performed all terms of the sentence of the court)": "/On",
187-
"(I was sentenced to probation in this case and)": None,
188-
"(My probation WAS NOT revoked)": None,
187+
"(I was sentenced to probation in this case and)": "/On",
188+
"(My probation WAS NOT revoked)": "/On",
189189
"(My probation WAS revoked and 3 years have passed since the date of revocation)": None,
190190
"(Date of arrest)": "(Jul 8, 2014)",
191191
"(If no arrest date date of citation booking or incident)": None,
@@ -265,8 +265,8 @@
265265
"(1 year has passed since the later of the convictionfindingjudgment or release_2)": None,
266266
"(I have not been convicted of any other offense or found guilty except for insanity_2)": None,
267267
"(I have fully completed complied with or performed all terms of the sentence of the court)": None,
268-
"(I was sentenced to probation in this case and)": None,
269-
"(My probation WAS NOT revoked)": None,
268+
"(I was sentenced to probation in this case and)": "/On",
269+
"(My probation WAS NOT revoked)": "/On",
270270
"(My probation WAS revoked and 3 years have passed since the date of revocation)": None,
271271
"(Date of arrest)": "(Oct 22, 2019)",
272272
"(If no arrest date date of citation booking or incident)": None,
@@ -341,8 +341,8 @@
341341
"(1 year has passed since the later of the convictionfindingjudgment or release_2)": None,
342342
"(I have not been convicted of any other offense or found guilty except for insanity_2)": None,
343343
"(I have fully completed complied with or performed all terms of the sentence of the court)": "/On",
344-
"(I was sentenced to probation in this case and)": None,
345-
"(My probation WAS NOT revoked)": None,
344+
"(I was sentenced to probation in this case and)": "/On",
345+
"(My probation WAS NOT revoked)": "/On",
346346
"(My probation WAS revoked and 3 years have passed since the date of revocation)": None,
347347
"(Date of arrest)": "(Jul 8, 2015)",
348348
"(If no arrest date date of citation booking or incident)": None,
@@ -417,8 +417,8 @@
417417
"(1 year has passed since the later of the convictionfindingjudgment or release_2)": "/On",
418418
"(I have not been convicted of any other offense or found guilty except for insanity_2)": "/On",
419419
"(I have fully completed complied with or performed all terms of the sentence of the court)": "/On",
420-
"(I was sentenced to probation in this case and)": None,
421-
"(My probation WAS NOT revoked)": None,
420+
"(I was sentenced to probation in this case and)": "/On",
421+
"(My probation WAS NOT revoked)": "/On",
422422
"(My probation WAS revoked and 3 years have passed since the date of revocation)": None,
423423
"(Date of arrest)": "(Jul 8, 2014)",
424424
"(If no arrest date date of citation booking or incident)": None,
@@ -508,8 +508,8 @@
508508
"(1 year has passed since the later of the convictionfindingjudgment or release_2)": None,
509509
"(I have not been convicted of any other offense or found guilty except for insanity_2)": None,
510510
"(I have fully completed complied with or performed all terms of the sentence of the court)": None,
511-
"(I was sentenced to probation in this case and)": None,
512-
"(My probation WAS NOT revoked)": None,
511+
"(I was sentenced to probation in this case and)": "/On",
512+
"(My probation WAS NOT revoked)": "/On",
513513
"(My probation WAS revoked and 3 years have passed since the date of revocation)": None,
514514
"(Date of arrest)": "(Oct 22, 2019)",
515515
"(If no arrest date date of citation booking or incident)": None,
@@ -585,8 +585,8 @@
585585
"(1 year has passed since the later of the convictionfindingjudgment or release_2)": None,
586586
"(I have not been convicted of any other offense or found guilty except for insanity_2)": None,
587587
"(I have fully completed complied with or performed all terms of the sentence of the court)": "/On",
588-
"(I was sentenced to probation in this case and)": None,
589-
"(My probation WAS NOT revoked)": None,
588+
"(I was sentenced to probation in this case and)": "/On",
589+
"(My probation WAS NOT revoked)": "/On",
590590
"(My probation WAS revoked and 3 years have passed since the date of revocation)": None,
591591
"(Date of arrest)": "(Jul 8, 2015)",
592592
"(If no arrest date date of citation booking or incident)": None,
@@ -662,8 +662,8 @@
662662
"(1 year has passed since the later of the convictionfindingjudgment or release_2)": "/On",
663663
"(I have not been convicted of any other offense or found guilty except for insanity_2)": "/On",
664664
"(I have fully completed complied with or performed all terms of the sentence of the court)": "/On",
665-
"(I was sentenced to probation in this case and)": None,
666-
"(My probation WAS NOT revoked)": None,
665+
"(I was sentenced to probation in this case and)": "/On",
666+
"(My probation WAS NOT revoked)": "/On",
667667
"(My probation WAS revoked and 3 years have passed since the date of revocation)": None,
668668
"(Date of arrest)": "(Jul 8, 2014)",
669669
"(If no arrest date date of citation booking or incident)": None,

src/backend/tests/test_form_filling.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ class TestBuildOregonPDF(PDFTestFixtures):
430430
"(Address)": "(1234 NE Dev St. #12, Portland, OR, 97111, 555-555-1234)",
431431
# full_name
432432
"(Name typed or printed_2)": "(foo bar)",
433+
"(I was sentenced to probation in this case and)": "/On",
434+
"(My probation WAS NOT revoked)": "/On"
433435
}
434436
expected_conviction_values = {
435437
# case_number_with_comments
@@ -486,6 +488,8 @@ def test_has_probation_revoked(self, conviction_charge: Mock, pdf_factory: Calla
486488
new_expected_values = {
487489
"(I was sentenced to probation in this case and)": "/On",
488490
"(My probation WAS revoked and 3 years have passed since the date of revocation)": "/On",
491+
"(My probation WAS NOT revoked)": None
492+
489493
}
490494
conviction_charge.charge_type = Mock()
491495
conviction_charge.probation_revoked = create_date(1988, 5, 3)

0 commit comments

Comments
 (0)