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

[#1382] Update title text in cases #594

Merged
merged 1 commit into from
May 2, 2023
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
12 changes: 2 additions & 10 deletions src/open_inwoner/accounts/views/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,7 @@ def process_cases(self, cases: List[Zaak]) -> List[dict]:
"uuid": str(case.uuid),
"start_date": case.startdatum,
"end_date": getattr(case, "einddatum", None),
"description": (
case.omschrijving
if case.omschrijving
else case.zaaktype.omschrijving
),
"description": case.zaaktype.omschrijving,
"current_status": glom(
case, "status.statustype.omschrijving", default=""
),
Expand Down Expand Up @@ -350,11 +346,7 @@ def get_context_data(self, **kwargs):
"end_date_legal": getattr(
self.case, "uiterlijke_einddatum_afdoening", None
),
"description": (
self.case.omschrijving
if self.case.omschrijving
else self.case.zaaktype.omschrijving
),
"description": self.case.zaaktype.omschrijving,
"current_status": glom(
self.case,
"status.statustype.omschrijving",
Expand Down
2 changes: 1 addition & 1 deletion src/open_inwoner/openzaak/tests/test_case_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def test_status_is_retrieved_when_user_logged_in_via_digid(self, m):
"end_date": datetime.date(2022, 1, 3),
"end_date_planned": datetime.date(2022, 1, 4),
"end_date_legal": datetime.date(2022, 1, 5),
"description": "Zaak naar aanleiding van ingezonden formulier",
"description": "Coffee zaaktype",
"current_status": "Finish",
"statuses": [status_new_obj, status_finish_obj],
# only one visible information object
Expand Down
12 changes: 5 additions & 7 deletions src/open_inwoner/openzaak/tests/test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ def test_list_open_cases(self, m):
"start_date": datetime.date.fromisoformat(self.zaak2["startdatum"]),
"end_date": None,
"identificatie": self.zaak2["identificatie"],
"description": self.zaak2["omschrijving"],
"description": self.zaaktype["omschrijving"],
"current_status": self.status_type1["omschrijving"],
},
{
"uuid": self.zaak1["uuid"],
"start_date": datetime.date.fromisoformat(self.zaak1["startdatum"]),
"end_date": None,
"identificatie": self.zaak1["identificatie"],
"description": self.zaak1["omschrijving"],
"description": self.zaaktype["omschrijving"],
"current_status": self.status_type1["omschrijving"],
},
],
Expand Down Expand Up @@ -403,7 +403,7 @@ def test_list_closed_cases(self, m):
"start_date": datetime.date.fromisoformat(self.zaak3["startdatum"]),
"end_date": datetime.date.fromisoformat(self.zaak3["einddatum"]),
"identificatie": self.zaak3["identificatie"],
"description": self.zaak3["omschrijving"],
"description": self.zaaktype["omschrijving"],
"current_status": self.status_type2["omschrijving"],
},
],
Expand Down Expand Up @@ -482,13 +482,12 @@ def test_list_cases_paginated(self, m):
"start_date": datetime.date.fromisoformat(self.zaak2["startdatum"]),
"end_date": None,
"identificatie": self.zaak2["identificatie"],
"description": self.zaak2["omschrijving"],
"description": self.zaaktype["omschrijving"],
"current_status": self.status_type1["omschrijving"],
},
],
)
self.assertNotContains(response_1, self.zaak1["identificatie"])
self.assertNotContains(response_1, self.zaak1["omschrijving"])
self.assertContains(response_1, "?page=2")

# 2. test next page
Expand All @@ -503,13 +502,12 @@ def test_list_cases_paginated(self, m):
"start_date": datetime.date.fromisoformat(self.zaak1["startdatum"]),
"end_date": None,
"identificatie": self.zaak1["identificatie"],
"description": self.zaak1["omschrijving"],
"description": self.zaaktype["omschrijving"],
"current_status": self.status_type1["omschrijving"],
},
],
)
self.assertNotContains(response_2, self.zaak2["identificatie"])
self.assertNotContains(response_2, self.zaak2["omschrijving"])
self.assertContains(response_2, "?page=1")

@patch.object(CaseListMixin, "paginate_by", 1)
Expand Down