Skip to content

Commit fdc12e8

Browse files
committed
Update config and docblock
1 parent 45889f5 commit fdc12e8

File tree

3 files changed

+37
-24
lines changed

3 files changed

+37
-24
lines changed

configurations/sharepoint-woo/mappings/xxllnc-suite-to-publications.json

+19-17
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,25 @@
44
"version": "",
55
"reference": "",
66
"mapping": {
7-
"title": "omschrijving",
8-
"summary": "zaaktypeomschrijving",
9-
"description": "zaaktypeomschrijving",
10-
"published" : "",
11-
"modified" : "{{ 'now'|date(H:i:sTm-d-Y') }}",
12-
"status": "Concept",
13-
"catalog": "",
14-
"publicationType": ""
15-
},
16-
"unset": [],
17-
"cast": {
18-
"title": "unsetIfValue==omschrijving",
19-
"summary": "unsetIfValue==zaaktypeomschrijving",
20-
"description": "unsetIfValue==zaaktypeomschrijving",
21-
"published" : "unsetIfValue==",
22-
"catalog": "unsetIfValue==",
23-
"publicationType": "unsetIfValue=="
7+
"title": "omschrijving",
8+
"summary": "zaaktypeomschrijving",
9+
"description": "zaaktypeomschrijving",
10+
"category": "{% if zaaktypecode|default %}{% set wooVerzoekenEnBesluiten = ['LP00000431', 'B1873', 'cherry'] %}{% set klachtoordelen = ['LP00000091', 'LP00001132', 'LP00000121', 'B0757', 'LP00000832', 'LP00001096'] %}{% if zaaktypecode in wooVerzoekenEnBesluiten %}{{ 'Woo-verzoeken en -besluiten' }}{% elseif zaaktypecode in klachtoordelen %}{{ 'Klachtoordelen' }}{% endif %}{% endif %}",
11+
"published": "startdatum",
12+
"modified": "{{ 'now'|date('H:i:sTm-d-Y') }}",
13+
"attachments": "[{% if files|default %}{% for file in files %} { {% if file['titel']|default %}\"title\": \"{{ file['titel'] }}\",{% endif %}\"labels\": [\"{{ 'Informatieverzoek' }}\"],{% if file['formaat']|default %}\"extension\": \"{{ file['formaat']|split('/')|last }}\",\"type\": \"{{ file['formaat'] }}\",{% endif %}{% if file['inhoud']|default and file['formaat']|default %}\"accessUrl\": \"data:{{ file['formaat'] }};base64,{{ file.inhoud }}\"{% endif %} }{{ loop.last ? '' : ',' }} {% endfor %}{% endif %}]",
14+
"status": "Concept"
15+
},
16+
"unset": [
17+
""
18+
],
19+
"cast": {
20+
"title": "unsetIfValue==omschrijving",
21+
"summary": "unsetIfValue==zaaktypeomschrijving",
22+
"description": "unsetIfValue==zaaktypeomschrijving",
23+
"category": "unsetIfValue==",
24+
"published": "unsetIfValue==startdatum",
25+
"attachments": "jsonToArray"
2426
},
2527
"passThrough": false
2628
}

configurations/sharepoint-woo/synchronizations/xxllnc-suite-to-publications.json

+13-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@
77
"sourceHash": "",
88
"sourceTargetMapping": "1",
99
"sourceConfig": {
10-
"idPosition": "id",
11-
"resultsPosition": "results",
12-
"endpoint": "/tlb/zaaksysteem/api/v1/zaken",
13-
"headers": [],
14-
"query.startdatum__gte": "2024-07-06",
15-
"query.einddatum__lt": "2024-08-01"
16-
},
10+
"idPosition": "identificatie",
11+
"resultsPosition": "results",
12+
"endpoint": "\/tlb\/zaaksysteem\/api\/v1\/zaken",
13+
"headers": [],
14+
"query.startdatum__gte": "2024-08-01",
15+
"query.einddatum__lt": "2025-01-01",
16+
"usesPagination": "false",
17+
"extraDataConfigs.0.staticEndpoint": "/tlb/zaaksysteem/api/v1/zaken/{{ originId }}/informatieobjecten",
18+
"extraDataConfigs.0.mergeExtraData": "true",
19+
"extraDataConfigs.0.keyToSetExtraData": "files",
20+
"extraDataConfigs.0.resultsLocation": "results",
21+
"extraDataConfigs.0.extraDataConfigPerResult.staticEndpoint": "/tlb/zaaksysteem/api/v1/informatieobjecten/{{ originId }}"
22+
},
1723
"targetId": "1/1",
1824
"targetType": "register/schema"
1925
}

lib/Db/Synchronization.php

+5
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ public function __construct() {
6565
$this->addType(fieldName:'followUps', type: 'json');
6666
}
6767

68+
/**
69+
* Checks through sourceConfig if the source of this sync uses pagination
70+
*
71+
* @return bool true if its uses pagination
72+
*/
6873
public function usesPagination(): bool
6974
{
7075
if (isset($this->sourceConfig['usesPagination']) === true && ($this->sourceConfig['usesPagination'] === false || $this->sourceConfig['usesPagination'] === 'false')) {

0 commit comments

Comments
 (0)