From 8e499600614e3a5fea3b62e6538b704e6d0c37c0 Mon Sep 17 00:00:00 2001 From: Barry Brands Date: Mon, 2 Dec 2024 15:42:25 +0100 Subject: [PATCH] Mapping fix --- .../mappings/sharepoint-woo-verzoek-to-publications.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json b/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json index 76ae88fb..f97770ae 100644 --- a/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json +++ b/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json @@ -9,7 +9,7 @@ "category": "d.woo_x005f_categorie", "published": "{% if d['woo_x005f_publicatiedatum']|default %}{{ d['woo_x005f_publicatiedatum']|date('Y-m-d') }}{% endif %}", "modified": "d.vti_x005f_nexttolasttimemodified", - "attachments": "{{ '[' }}{% if fileUrls|default %}{% set index = 0 %}{% for file in fileUrls %}{% if index > 0 %}{{ ', ' }}{% endif %}{{ '{' }}{% if file['Name']|default %} \"title\": \"{{ file['Name'] }}\",{% endif %}{% if file['d']['document_x005f_label']|default %}\"labels\": [\"{{ file['d']['document_x005f_label'] }}\"],{% endif %} \"downloadUrl\": {{ '{' }}{% set uri = file['__metadata']['uri']~'\/$value' %}{{ '\"downloadUrl\": \"'~uri~'\",\"source\": \"1\"' }}{{ '}' }}{{ '}' }}{% endfor %}{% endif %}{{ ']' }}", + "attachments": "[ {% for file in fileUrls %} { {% if file['Name']|default %}\"title\": \"{{ file['Name'] }}\",{% endif %}{% if file['d']['document_x005f_label']|default %}\"labels\": [\"{{ file['d']['document_x005f_label'] }}\"],{% endif %}{% if file['__metadata']['uri']|default %}\"downloadUrl\": {\"downloadUrl\": \"{{ file['__metadata']['uri']~'/$value' }}\", \"source\": \"1\"}{% endif %} }{{ loop.last ? '' : ',' }} {% endfor %} ]", "status": "{% if d['woo_x005f_publicatiedatum']|default %}Published{% else %}Concept{% endif %}", "catalog": "" },