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

Adding worship publication flag to existing ROs submissions #471

Merged

Conversation

Poltergeistz
Copy link
Contributor

Description

DL-5420

This PR adds the worship flag, <http://lblod.data.gift/concepts/403b71bd-5ab9-4c92-8990-4bb19d5469d1>, to mark previously sent submissions. The purpose of this flag is to enable these submissions to be included in the export process performed by the prepare-submissions-for-export-service.

While the service now has the necessary URIs, it's important to note that a migration is required to ensure data consistency. Without this migration, previously sent submissions that lack the export flag will not be included in the export process, even if the decisions types has the flag.

This PR is aimed at addressing this issue by adding the flag to applicable submissions and their attachments to ensure that they are properly prepared for export.

Here's the submissions decisions types that misses export :

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related services

  • prepare-submissions-for-export-service
  • mu-migrations

How to test

  1. Before running the migrations make sure you check data (QA or PROD sample), there is missing flags on ROs decisions types submissions listed in the description but you can also find them with this query :
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX schema: <http://schema.org/>

select distinct ?submission ?decisionType ?date ?publicationFlag WHERE {
  GRAPH ?g {
    ?s ?p ?decisionType .
    ?submission prov:generated ?s ;
     <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate> ?date .

    FILTER (?decisionType IN (<https://data.vlaanderen.be/id/concept/BesluitDocumentType/14793940-5b9c-4172-b108-c73665ad9d6a>, # Samenvoeging (RO)
      <https://data.vlaanderen.be/id/concept/BesluitDocumentType/651525f8-8650-4ce8-8eea-f19b94d50b73>, # Erkenning - reguliere procedure (RO)
      <https://data.vlaanderen.be/id/concept/BesluitDocumentType/d611364b-007b-49a7-b2bf-b8f4e5568777>, # Naamswijziging (RO)
      <https://data.vlaanderen.be/id/concept/BesluitDocumentType/95a6c5a1-05af-4d48-b2ef-5ebb1e58783b>, # Wijziging gebiedsomschrijving (RO)
      <https://data.vlaanderen.be/id/concept/BesluitDocumentType/6d1a3aea-6773-4e10-924d-38be596c5e2e> # Opheffing van annexe kerken en kapelanijen (RO)
      ))

    FILTER NOT EXISTS {
      ?submission schema:publication ?publicationFlag .
    }
  }
}
  1. You can then use this branch and run the migrations, check the migration : drc logs -f --tail=200 migrations
  2. You should expect old submissions to have the worship flag now
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX schema: <http://schema.org/>

select distinct ?submission ?decisionType ?date ?publicationFlag WHERE {
  GRAPH ?g {
    ?s ?p ?decisionType .
    ?submission prov:generated ?s ;
     <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate> ?date ;
     schema:publication ?publicationFlag .

    FILTER (?decisionType IN (<https://data.vlaanderen.be/id/concept/BesluitDocumentType/14793940-5b9c-4172-b108-c73665ad9d6a>, # Samenvoeging (RO)
      <https://data.vlaanderen.be/id/concept/BesluitDocumentType/651525f8-8650-4ce8-8eea-f19b94d50b73>, # Erkenning - reguliere procedure (RO)
      <https://data.vlaanderen.be/id/concept/BesluitDocumentType/d611364b-007b-49a7-b2bf-b8f4e5568777>, # Naamswijziging (RO)
      <https://data.vlaanderen.be/id/concept/BesluitDocumentType/95a6c5a1-05af-4d48-b2ef-5ebb1e58783b>, # Wijziging gebiedsomschrijving (RO)
      <https://data.vlaanderen.be/id/concept/BesluitDocumentType/6d1a3aea-6773-4e10-924d-38be596c5e2e> # Opheffing van annexe kerken en kapelanijen (RO)
      ))
    }
}
  1. You can also check their attachments with the same process

What to check

  • Any data issue

Links to other PR's

  • N/A

Notes

drc restart migrations resource cache

- Samenvoeging (RO)

- Erkenning - reguliere procedure (RO)

- Naamswijziging (RO)

-  Wijziging gebiedsomschrijving (RO)

- Opheffing van annexe kerken en kapelanijen (RO)
@cecemel cecemel merged commit f173823 into development Oct 30, 2023
@cecemel cecemel deleted the feature/adding-missing-ro-submissions-publication-flag branch October 30, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants