Skip to content

Commit ede3bb2

Browse files
authored
Merge pull request #723 from maykinmedia/fix/721-selectielijstklasse
[#721] Show selectielijstklasse also if it's not on the zaak
2 parents ac04a96 + db8aef8 commit ede3bb2

File tree

13 files changed

+523
-16
lines changed

13 files changed

+523
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,280 @@
1+
[
2+
{
3+
"model": "catalogi.zaaktype",
4+
"pk": 3,
5+
"fields": {
6+
"_etag": "e06d2051a4000b5bf5bbb65826d67cdf",
7+
"datum_begin_geldigheid": "2018-01-01",
8+
"datum_einde_geldigheid": null,
9+
"concept": false,
10+
"uuid": "ec9ebcdb-b652-466d-a651-fdb8ea787487",
11+
"identificatie": "ZAAKTYPE-2020-0000000001",
12+
"zaaktype_omschrijving": "Testing resultaattypen process",
13+
"zaaktype_omschrijving_generiek": "",
14+
"vertrouwelijkheidaanduiding": "",
15+
"doel": "Trouble red compare produce animal. Everything today Democrat student enter. By probably adult.",
16+
"aanleiding": "Couple toward trip old nice memory system instead.",
17+
"toelichting": "",
18+
"indicatie_intern_of_extern": "extern",
19+
"handeling_initiator": "indienen",
20+
"onderwerp": "Evenementvergunning",
21+
"handeling_behandelaar": "uitvoeren",
22+
"doorlooptijd_behandeling": "P30D",
23+
"servicenorm_behandeling": null,
24+
"opschorting_en_aanhouding_mogelijk": true,
25+
"verlenging_mogelijk": false,
26+
"verlengingstermijn": null,
27+
"trefwoorden": "[]",
28+
"publicatie_indicatie": true,
29+
"publicatietekst": "",
30+
"verantwoordingsrelatie": "[]",
31+
"versiedatum": "2018-01-01",
32+
"verantwoordelijke": "100000000",
33+
"producten_of_diensten": "[\"https://example.com/product/123\"]",
34+
"selectielijst_procestype": "https://selectielijst.openzaak.nl/api/v1/procestypen/aa8aa2fd-b9c6-4e34-9a6c-58a677f60ea0",
35+
"selectielijst_procestype_jaar": 2020,
36+
"referentieproces_naam": "ReferentieProces 0",
37+
"referentieproces_link": "",
38+
"broncatalogus_url": "",
39+
"broncatalogus_domein": "",
40+
"broncatalogus_rsin": "",
41+
"bronzaaktype_url": "",
42+
"bronzaaktype_identificatie": "",
43+
"bronzaaktype_omschrijving": "",
44+
"catalogus": 1,
45+
"deelzaaktypen": []
46+
}
47+
},
48+
{
49+
"model": "catalogi.resultaattype",
50+
"pk": 3,
51+
"fields": {
52+
"uuid": "b9109699-67cd-4c2e-a2cf-76b311d40e25",
53+
"omschrijving": "Afgehandeld",
54+
"resultaattypeomschrijving": "Afgehandeld",
55+
"selectielijstklasse": "https://selectielijst.openzaak.nl/api/v1/resultaten/1bb001e9-5eab-4f10-8940-8781e11f180f",
56+
"zaaktype": 3
57+
}
58+
},
59+
{
60+
"model": "catalogi.resultaattype",
61+
"pk": 4,
62+
"fields": {
63+
"uuid": "7759dcb7-de9a-4543-99e3-81472c488f32",
64+
"omschrijving": "Lopend",
65+
"resultaattypeomschrijving": "Lopend",
66+
"selectielijstklasse": "https://selectielijst.openzaak.nl/api/v1/resultaten/cc5ae4e3-a9e6-4386-bcee-46be4986a829",
67+
"zaaktype": 3
68+
}
69+
},
70+
{
71+
"model": "catalogi.roltype",
72+
"pk": 1,
73+
"fields": {
74+
"uuid": "ae39e60c-0e4b-4432-a830-8755ed083fda",
75+
"_etag": "",
76+
"datum_begin_geldigheid": null,
77+
"datum_einde_geldigheid": null,
78+
"omschrijving": "Behandelend afdeling",
79+
"omschrijving_generiek": "behandelaar",
80+
"zaaktype": 3
81+
}
82+
},
83+
{
84+
"model": "catalogi.roltype",
85+
"pk": 1,
86+
"fields": {
87+
"uuid": "ae39e60c-0e4b-4432-a830-8755ed083fda",
88+
"_etag": "",
89+
"datum_begin_geldigheid": null,
90+
"datum_einde_geldigheid": null,
91+
"omschrijving": "Behandelend afdeling",
92+
"omschrijving_generiek": "behandelaar",
93+
"zaaktype": 3
94+
}
95+
},
96+
{
97+
"model": "zaken.zaakidentificatie",
98+
"pk": 105,
99+
"fields": {
100+
"identificatie": "ZAAK-2025-02-20-A",
101+
"bronorganisatie": "523791045"
102+
}
103+
},
104+
{
105+
"model": "zaken.zaak",
106+
"pk": 105,
107+
"fields": {
108+
"uuid": "0857eea4-9a80-4b13-8520-4b1e11c8d768",
109+
"_id": null,
110+
"_identificatie": "ZAAK-2025-02-20-A",
111+
"_bronorganisatie": "",
112+
"hoofdzaak": null,
113+
"omschrijving": "",
114+
"toelichting": "",
115+
"_zaaktype": 3,
116+
"registratiedatum": "2024-07-11",
117+
"verantwoordelijke_organisatie": "754209635",
118+
"startdatum": "2024-07-14",
119+
"einddatum": "2024-08-28",
120+
"einddatum_gepland": null,
121+
"uiterlijke_einddatum_afdoening": null,
122+
"publicatiedatum": null,
123+
"producten_of_diensten": "[]",
124+
"communicatiekanaal": "",
125+
"vertrouwelijkheidaanduiding": "zeer_geheim",
126+
"betalingsindicatie": "",
127+
"laatste_betaaldatum": null,
128+
"zaakgeometrie": null,
129+
"verlenging_reden": "",
130+
"verlenging_duur": null,
131+
"opschorting_indicatie": false,
132+
"opschorting_reden": "",
133+
"selectielijstklasse": "https://selectielijst.openzaak.nl/api/v1/resultaten/70d1d36b-49eb-4526-bc01-26f9b79b4100",
134+
"archiefnominatie": "vernietigen",
135+
"archiefstatus": "nog_te_archiveren",
136+
"archiefactiedatum": "2024-01-01",
137+
"opdrachtgevende_organisatie": "",
138+
"processobjectaard": "",
139+
"startdatum_bewaartermijn": null,
140+
"processobject_datumkenmerk": "",
141+
"processobject_identificatie": "",
142+
"processobject_objecttype": "",
143+
"processobject_registratie": "",
144+
"communicatiekanaal_naam": "",
145+
"created_on": "2024-07-19T13:33:19.146Z"
146+
}
147+
},
148+
{
149+
"model": "zaken.resultaat",
150+
"pk": 10,
151+
"fields": {
152+
"_etag": "9ca03d2cf915c579e6a2a19d3425adea",
153+
"uuid": "821b4d8f-3244-4ece-8d33-791fa6d2a2f3",
154+
"zaak": 105,
155+
"_resultaattype_base_url": null,
156+
"_resultaattype_relative_url": null,
157+
"_resultaattype_url": null,
158+
"_resultaattype": 3,
159+
"toelichting": "Testing resultaten"
160+
}
161+
},
162+
{
163+
"model": "zaken.zaakidentificatie",
164+
"pk": 106,
165+
"fields": {
166+
"identificatie": "ZAAK-2025-02-20-B",
167+
"bronorganisatie": "523791045"
168+
}
169+
},
170+
{
171+
"model": "zaken.zaak",
172+
"pk": 106,
173+
"fields": {
174+
"uuid": "37e5ab9c-8f1b-40c7-9d2d-6b549ee2ee2a",
175+
"_id": null,
176+
"_identificatie": "ZAAK-2025-02-20-B",
177+
"_bronorganisatie": "",
178+
"hoofdzaak": null,
179+
"omschrijving": "",
180+
"toelichting": "",
181+
"_zaaktype": 3,
182+
"registratiedatum": "2024-07-11",
183+
"verantwoordelijke_organisatie": "754209635",
184+
"startdatum": "2024-07-14",
185+
"einddatum": "2024-08-28",
186+
"einddatum_gepland": null,
187+
"uiterlijke_einddatum_afdoening": null,
188+
"publicatiedatum": null,
189+
"producten_of_diensten": "[]",
190+
"communicatiekanaal": "",
191+
"vertrouwelijkheidaanduiding": "zeer_geheim",
192+
"betalingsindicatie": "",
193+
"laatste_betaaldatum": null,
194+
"zaakgeometrie": null,
195+
"verlenging_reden": "",
196+
"verlenging_duur": null,
197+
"opschorting_indicatie": false,
198+
"opschorting_reden": "",
199+
"selectielijstklasse": "",
200+
"archiefnominatie": "vernietigen",
201+
"archiefstatus": "nog_te_archiveren",
202+
"archiefactiedatum": "2024-01-01",
203+
"opdrachtgevende_organisatie": "",
204+
"processobjectaard": "",
205+
"startdatum_bewaartermijn": null,
206+
"processobject_datumkenmerk": "",
207+
"processobject_identificatie": "",
208+
"processobject_objecttype": "",
209+
"processobject_registratie": "",
210+
"communicatiekanaal_naam": "",
211+
"created_on": "2024-07-19T13:33:19.146Z"
212+
}
213+
},
214+
{
215+
"model": "zaken.resultaat",
216+
"pk": 11,
217+
"fields": {
218+
"_etag": "fe043a089750cfe350e14130c92d2c56",
219+
"uuid": "c81e0154-7d0f-4f1f-9264-06c45127d6a4",
220+
"zaak": 106,
221+
"_resultaattype_base_url": null,
222+
"_resultaattype_relative_url": null,
223+
"_resultaattype_url": null,
224+
"_resultaattype": 4,
225+
"toelichting": "Testing resultaattype"
226+
}
227+
},
228+
{
229+
"model": "zaken.rol",
230+
"pk": 1,
231+
"fields": {
232+
"_etag": "2dc6415ef81623bb0c12483672eaca5d",
233+
"uuid": "b94d7ac7-b6c5-4e0a-8776-4c78090d1c47",
234+
"zaak": 105,
235+
"betrokkene": "",
236+
"betrokkene_type": "organisatorische_eenheid",
237+
"afwijkende_naam_betrokkene": "",
238+
"_roltype_base_url": null,
239+
"_roltype_relative_url": null,
240+
"_roltype_url": null,
241+
"_roltype": 1,
242+
"omschrijving": "Maykin Dev Afdeling",
243+
"omschrijving_generiek": "Maykin Dev Afdeling",
244+
"roltoelichting": "",
245+
"registratiedatum": "2025-02-20T14:09:47.129Z",
246+
"indicatie_machtiging": "",
247+
"contactpersoon_rol_emailadres": "",
248+
"contactpersoon_rol_functie": "",
249+
"contactpersoon_rol_telefoonnummer": "",
250+
"contactpersoon_rol_naam": "",
251+
"authenticatie_context": null
252+
}
253+
},
254+
{
255+
"model": "zaken.rol",
256+
"pk": 2,
257+
"fields": {
258+
"_etag": "cff68ceca76b521d77f94ad8cf2721d1",
259+
"uuid": "a0962f1a-07bf-46ed-bd49-8b54c3009b80",
260+
"zaak": 106,
261+
"betrokkene": "",
262+
"betrokkene_type": "organisatorische_eenheid",
263+
"afwijkende_naam_betrokkene": "",
264+
"_roltype_base_url": null,
265+
"_roltype_relative_url": null,
266+
"_roltype_url": null,
267+
"_roltype": 1,
268+
"omschrijving": "Maykin Support Afdeling",
269+
"omschrijving_generiek": "Maykin Support Afdeling",
270+
"roltoelichting": "",
271+
"registratiedatum": "2025-02-20T14:17:16.006Z",
272+
"indicatie_machtiging": "",
273+
"contactpersoon_rol_emailadres": "",
274+
"contactpersoon_rol_functie": "",
275+
"contactpersoon_rol_telefoonnummer": "",
276+
"contactpersoon_rol_naam": "",
277+
"authenticatie_context": null
278+
}
279+
}
280+
]

backend/docs/developers/logic.rst

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ Some aspects about the selectielijst resources that can be confusing:
3636
Each selectielijstklasse is associated with a selectielijstprocestype.
3737
The zaak can only be related to a selectielijstklasse whose procestype matches the procestype related to the zaaktype
3838
of the zaak.
39+
- If no selectielijstklasse is directly specified on the zaak, it can be deduced by looking at the
40+
resultaat of the zaak. The resultaat has a ``resultaattype`` field, and the ``resultaattype`` has
41+
a field ``selectielijstklasse``.
3942

4043
Zaaktypen
4144
=========

backend/src/openarchiefbeheer/destruction/tests/e2e/features/test_feature_list_create.py

+73-1
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,82 @@ def create_data():
138138
"ZAAKTYPE-03 (ZAAKTYPE-03)"
139139
])
140140

141-
await self.when.user_filters_zaken(page, "identificatie", "ZAAK-000")
141+
await self.when.user_filters_zaken_on_text(page, "identificatie", "ZAAK-000")
142142
await self.then.path_should_be(page, "/destruction-lists/create?identificatie__icontains=ZAAK-000&page=1")
143143
await self.then.this_number_of_zaken_should_be_visible(page, 2)
144144
await self.then.zaaktype_filters_are(page, [
145145
"ZAAKTYPE-01 (ZAAKTYPE-01)",
146146
"ZAAKTYPE-02 (ZAAKTYPE-02)"
147147
])
148+
149+
async def test_zaaktype_filters_on_selectielijstklasse_create_page(self):
150+
@sync_to_async
151+
def create_data():
152+
ZaakFactory.create(
153+
identificatie="ZAAK-1",
154+
# The selectielijstklasse is set directly on the zaak
155+
selectielijstklasse="https://selectielijst.openzaak.nl/api/v1/resultaten/afa30940-855b-4a7e-aa21-9e15a8078814",
156+
)
157+
ZaakFactory.create(
158+
identificatie="ZAAK-2",
159+
# The selectielijstklasse is NOT set on the zaak, so we look at the resultaat->resultaattype->selectielijstklasse
160+
selectielijstklasse="",
161+
post___expand={
162+
"resultaat": {
163+
"resultaattype": "http://catalogue-api.nl/catalogi/api/v1/resultaattypen/111-111-111",
164+
"_expand": {
165+
"resultaattype": {
166+
"url": "http://catalogue-api.nl/catalogi/api/v1/resultaattypen/111-111-111",
167+
"selectielijstklasse": "https://selectielijst.openzaak.nl/api/v1/resultaten/8af64c99-a168-40dd-8afd-9fbe0597b6dc",
168+
}
169+
},
170+
}
171+
},
172+
)
173+
ZaakFactory.create(
174+
identificatie="ZAAK-3",
175+
# The selectielijstklasse overwrites the selectielijstklasse of the resultaat->resultaattype->selectielijstklasse
176+
selectielijstklasse="https://selectielijst.openzaak.nl/api/v1/resultaten/e84a06ac-1bdc-4e9c-9598-a22faa562459",
177+
post___expand={
178+
"resultaat": {
179+
"resultaattype": "http://catalogue-api.nl/catalogi/api/v1/resultaattypen/111-111-111",
180+
"_expand": {
181+
"resultaattype": {
182+
"url": "http://catalogue-api.nl/catalogi/api/v1/resultaattypen/111-111-111",
183+
"selectielijstklasse": "https://selectielijst.openzaak.nl/api/v1/resultaten/8af64c99-a168-40dd-8afd-9fbe0597b6dc",
184+
}
185+
},
186+
}
187+
},
188+
)
189+
190+
async with browser_page() as page:
191+
await self.given.data_exists(create_data)
192+
await self.given.record_manager_exists()
193+
await self.given.selectielijstklasse_choices_are_available(page)
194+
195+
await self.when.record_manager_logs_in(page)
196+
197+
await self.then.path_should_be(page, "/destruction-lists")
198+
199+
await self.when.user_clicks_button(page, "Vernietigingslijst opstellen")
200+
201+
await self.then.path_should_be(page, "/destruction-lists/create")
202+
await self.then.page_should_contain_text(page, "1.1 - Ingericht - vernietigen - P10Y")
203+
await self.then.page_should_contain_text(page, "1.1.1 - Ingericht - blijvend_bewaren")
204+
await self.then.page_should_contain_text(page, "1.1.2 - Ingericht - blijvend_bewaren")
205+
206+
await self.when.user_filters_zaken_on_dropdown(page, "selectielijstklasse", "1.1 - Ingericht - vernietigen - P10Y")
207+
208+
await self.then.this_number_of_zaken_should_be_visible(page, 1)
209+
await self.then.page_should_contain_text(page, "ZAAK-1")
210+
211+
await self.when.user_filters_zaken_on_dropdown(page, "selectielijstklasse", "1.1.1 - Ingericht - blijvend_bewaren")
212+
213+
await self.then.this_number_of_zaken_should_be_visible(page, 1)
214+
await self.then.page_should_contain_text(page, "ZAAK-2")
215+
216+
await self.when.user_filters_zaken_on_dropdown(page, "selectielijstklasse", "1.1.2 - Ingericht - blijvend_bewaren")
217+
218+
await self.then.this_number_of_zaken_should_be_visible(page, 1)
219+
await self.then.page_should_contain_text(page, "ZAAK-3")

backend/src/openarchiefbeheer/destruction/tests/e2e/features/test_feature_list_edit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def create_data():
181181
"ZAAKTYPE-04 (ZAAKTYPE-04)",
182182
])
183183
# If filtering first on identificatie, the zaaktype filters change
184-
await self.when.user_filters_zaken(page, "identificatie", "ZAAK-000")
184+
await self.when.user_filters_zaken_on_text(page, "identificatie", "ZAAK-000")
185185
await self.then.path_should_be(page, "/destruction-lists/00000000-0000-0000-0000-000000000000/edit?page=1&is_editing=true&identificatie__icontains=ZAAK-000")
186186
await self.then.this_number_of_zaken_should_be_visible(page, 2)
187187
await self.then.zaaktype_filters_are(page, [

backend/src/openarchiefbeheer/destruction/tests/e2e/features/test_feature_list_process_review.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def create_data():
192192
await self.then.zaaktype_filters_are(page, ["ZAAKTYPE-01 (ZAAKTYPE-01)", "ZAAKTYPE-02 (ZAAKTYPE-02)"])
193193

194194
# If filtering first on identificatie, the zaaktype filters change
195-
await self.when.user_filters_zaken(page, "identificatie", "ZAAK-000")
195+
await self.when.user_filters_zaken_on_text(page, "identificatie", "ZAAK-000")
196196
await self.then.path_should_be(page, "/destruction-lists/00000000-0000-0000-0000-000000000000/process-review?identificatie__icontains=ZAAK-000&page=1")
197197
await self.then.this_number_of_zaken_should_be_visible(page, 1)
198198
await self.then.zaaktype_filters_are(page, ["ZAAKTYPE-01 (ZAAKTYPE-01)"])

0 commit comments

Comments
 (0)