Compare commits

...

8 Commits

Author SHA1 Message Date
mirdono
f6fe8ac87d chore: update changelog 2025-06-05 14:00:34 +02:00
mirdono
7defbf9009 chore: bump frontend 2025-06-05 14:00:20 +02:00
mirdono
5f1bfe96c7 feat: cleanup jobs municipality and province relations
Add cleanup jobs to automatically insert and delete `org:hasSubOrganization`
relations between provinces and municipalities. These memberships were moved to
the `shared` graph causing the existing cleanup jobs to no longer work for them.
2025-06-04 11:41:21 +02:00
mirdono
d2ec188373 fix: relate provinces and municipalities in shared graph
The frontend relies on the memberships relating municipalities and province to
- automatically select the appropriate province given a municipality; and
- limit the municipality options to those in a given province.

This kind of functionality is used in both the worship and non-worship module so
the data should be readable by users with either roles. This moves the
appropriate data the `shared` graph, which can be read by all authenticated
users. Thereby fixing that that functionality was broken for users with the
worship role.
2025-06-04 11:41:21 +02:00
mirdono
9515aec9ad Merge branch 'master' into development 2025-06-04 11:40:58 +02:00
cecemel
d4cd0d5cbd Hotfix/add kabinet crevits as eenheid (#548)
* Added migration for Kabinet Crevits

Note: 
`<http://mu.semte.ch/graphs/shared>` is only needed when data needs to
be availible to worship and non-worship users

* Update CHANGELOG.md
2025-06-02 16:46:51 +02:00
mirdono
6036b030c1 Merge branch 'master' into development 2025-05-23 18:12:40 +02:00
mirdono
f2a65697db chore: remove deprecated version from docker compose configurations
The version property has been deprecated for a while. Now that the servers are
on a recent version of docker compose these can be removed from our
configurations. This avoids that the warnings are shown each time.
2025-05-23 14:40:09 +02:00
9 changed files with 153 additions and 5 deletions

View File

@@ -1,6 +1,27 @@
# Changelog
## Unreleased
## v1.33.0 (2025-06-05)
### Frontend
- Bump to version [v1.32.0](https://github.com/lblod/frontend-organization-portal/releases/tag/v1.32.0)
### Backend
- datafix: move memberships involving provinces and municipalities to shared graph [OP-3619]
### Deploy notes
```
drc restart migrations; drc logs -ft --tail=200 migrations
drc exec db-cleanup curl -X POST "http://localhost/cleanup"
drc pull frontend; drc up -d frontend
```
## v1.32.1 (2025-06-02)
### Backend
- Added Kabinet Crevits as bestuurseenheid. [DL-6655]
### Deploy Notes
```
drc restart migrations;
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs
```
## v1.32.0 (2025-05-23)
### Frontend
- Bump to version [v1.31.0](https://github.com/lblod/frontend-organization-portal/releases/tag/v1.31.0)

View File

@@ -0,0 +1,32 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT DATA {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
<http://data.lblod.info/id/bestuurseenheden/a33d5059-d527-4c9a-a788-1b7f5c75d10e>
rdf:type <http://www.w3.org/ns/org#Organization> , <http://data.vlaanderen.be/ns/besluit#Bestuurseenheid> , dcterms:Agent ;
owl:sameAs <http://data.vlaanderen.be/doc/organisatie/OVO053550> ;
<http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/52cc9d8d-1c9a-4d92-9936-da9d4a622ec4> ;
<http://www.w3.org/ns/org#linkedTo> <http://data.lblod.info/id/bestuurseenheden/141d9d6b-54af-4d17-b313-8d1c30bc3f5b> ;
<http://mu.semte.ch/vocabularies/core/uuid> "a33d5059-d527-4c9a-a788-1b7f5c75d10e" ;
skos:prefLabel "Kabinet Crevits" ;
<http://www.w3.org/2004/02/skos/core#note> """This is a special case, we consider (for now) Kabinet Crevits as a bestuurseenheid, of org:classification ABB.""";
<http://www.w3.org/ns/adms#identifier> <http://data.lblod.info/id/identificatoren/b53dc2b0-7fca-4c59-8f2a-276753edb81e> ;
<http://www.w3.org/ns/regorg#orgStatus> <http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> ;
<http://www.w3.org/ns/regorg#legalName> "Kabinet Crevits" .
<http://data.lblod.info/id/identificatoren/b53dc2b0-7fca-4c59-8f2a-276753edb81e>
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> <http://data.lblod.info/id/gestructureerdeIdentificator/aac3f5c0-e525-4cec-8432-2d59806661e5>;
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/adms#Identifier>;
<http://www.w3.org/2004/02/skos/core#notation> "OVO-nummer" ;
<http://mu.semte.ch/vocabularies/core/uuid> "b53dc2b0-7fca-4c59-8f2a-276753edb81e" .
<http://data.lblod.info/id/gestructureerdeIdentificator/aac3f5c0-e525-4cec-8432-2d59806661e5>
<http://mu.semte.ch/vocabularies/core/uuid> "aac3f5c0-e525-4cec-8432-2d59806661e5";
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://data.vlaanderen.be/ns/generiek#GestructureerdeIdentificator>;
<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "OVO053550" .
}
}

View File

@@ -0,0 +1,24 @@
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership ?p ?o .
?organization org:hasSubOrganization ?member .
}
} INSERT {
GRAPH <http://mu.semte.ch/graphs/shared>{
?membership ?p ?o .
?organization org:hasSubOrganization ?member .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership a org:Membership ;
org:member ?member ;
org:organization ?organization ;
?p ?o .
}
GRAPH <http://mu.semte.ch/graphs/shared> {
?member org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> . # Municipality
?organization org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> . # Province
}
}

View File

@@ -0,0 +1,36 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Insert triples of the form
# <Province> <http://www.w3.org/ns/org#hasSubOrganization> <Municipality>
# matching memberships for which no such triple exists.
# Province: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000>
#
# Municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>
<http://data.lblod.info/id/cleanup-job/0cc5e981-a61e-433e-b6f2-c59fd8599944> a cleanup:Job ;
mu:uuid "0cc5e981-a61e-433e-b6f2-c59fd8599944" ;
dcterms:title "Insert missing `org:hasSubOrganization` triples relating provinces and municipalities." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
INSERT {
GRAPH <http://mu.semte.ch/graphs/shared> {
?province org:hasSubOrganization ?municipality .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/shared> {
?membership a org:Membership ;
org:organization ?province ;
org:member ?municipality ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
FILTER NOT EXISTS { ?province org:hasSubOrganization ?municipality . }
?municipality org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
?province org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> .
}
}
""" .

View File

@@ -0,0 +1,37 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Delete triples of the form
# <Province> <http://www.w3.org/ns/org#hasSubOrganization> <Municipality>
# for which no matching membership exists.
# Province: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000>
#
# Municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>
<http://data.lblod.info/id/cleanup-job/7354dfd9-bdef-48d6-b81e-e814bd4f4e9c> a cleanup:Job ;
mu:uuid "7354dfd9-bdef-48d6-b81e-e814bd4f4e9c" ;
dcterms:title "Delete leftover `org:hasSubOrganization` triples between Provinces and municipalities." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/shared> {
?province org:hasSubOrganization ?municipality .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/shared> {
?province org:hasSubOrganization ?municipality .
FILTER NOT EXISTS {
?membership a org:Membership ;
org:organization ?province ;
org:member ?municipality ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
}
?municipality org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
?province org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> .
}
}
""" .

View File

@@ -1,5 +1,3 @@
version: "3.4"
services:
identifier:
restart: "no"

View File

@@ -1,5 +1,3 @@
version: "3.4"
x-logging: &default-logging
driver: "json-file"
options:
@@ -196,7 +194,7 @@ services:
restart: always
logging: *default-logging
frontend:
image: lblod/frontend-organization-portal:1.31.0
image: lblod/frontend-organization-portal:1.32.0
volumes:
- ./config/frontend/add-x-frame-options-header.conf:/config/add-x-frame-options.conf
environment: