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

ODCR: Organisatie datamodel + API resource #26

Closed
13 tasks done
Tracked by #8
sergei-maertens opened this issue Sep 12, 2024 · 6 comments · Fixed by #78, #79, #80, #95 or #110
Closed
13 tasks done
Tracked by #8

ODCR: Organisatie datamodel + API resource #26

sergei-maertens opened this issue Sep 12, 2024 · 6 comments · Fixed by #78, #79, #80, #95 or #110

Comments

@sergei-maertens
Copy link
Contributor

sergei-maertens commented Sep 12, 2024

Split off from #8

Description (why)

uit PSA: Deelnemende gemeenten willen ook namens organisaties waar zij aan deelnemen, bijvoorbeeld gemeenschappelijke regelingen, documenten kunnen publiceren.

Dit vraagt erom dat organisaties en organisatieonderdelen in de ODRC vastgelegd kunnen worden. Dit vraagt om aanpassingen in o.a. de data-opslag en de gebruikersinterface “Modelbeheer”. Organisaties moeten door beheerders gecreëerd, geraadpleegd, gemuteerd en ge(de)activeerd kunnen worden. Via de ODRC API moeten zij geraadpleegd kunnen worden.

Acceptance criteria

Implementation tasks

  • Implement data model for Organisatie and OrganisatieOnderdeel and wire up to the admin interface

    • Model fields: identifier, naam, oorsprong (enum as usual), actief (boolean, default=False)
    • identifier must be unique
    • Search through identifier and name fields
    • List filter on origin, actief
    • Bulk admin actions to publish/unpublish organisations
    • Tabular Inline for organisatieonderdelen
  • Add API endpoint for CRU operations /api/v1/organisaties

    • READ
      • Paginated list (there will be a lot of records)
      • List endpoint must support filter parameters for actief, origin. Search options for identifier and name (so that UIs can implemented autocomplete on name). By default, use actief=true if unspecified. Other options are false and alle (similar to ZGW API's Catalogi API, for zaaktypen/informatieobjecttypen)
      • Detail endpoint: as usual - a record being active/not active has no impact
    • CREATE
      • Create implies origin == 'zelf_toegevoegd'
      • identifier is generated server-side
      • user can only provide name and actief
    • UPDATE
      • name can be updated only if origin is zelf_toegevoegd
      • actief can always be updated
      • identifier and origin can never be updated
  • Add management command to populate the Organisaties from the waardelijsten

    • Management command will be run periodically and must result in django fixtures (using natural keys)
    • The fixtures will be included in the docker image and need to be automatically loaded on container/application start up (post migrate hook)
    • The fixture must be post-process to exclude the actief field, otherwise a container restart would undo the activations performed by a functional admin

Draft API resource definition here: #8 (comment)

@sergei-maertens
Copy link
Contributor Author

TODO: finish refining/technical specs for Bart

@sergei-maertens sergei-maertens moved this to Backlog in GPP-Woo Sep 18, 2024
@MarcoKlerks MarcoKlerks added this to the 08. ODRC: Organisaties en organisatieonderdelen milestone Sep 18, 2024
@MarcoKlerks MarcoKlerks moved this from Backlog to Refinement in GPP-Woo Oct 8, 2024
@sergei-maertens
Copy link
Contributor Author

Burgerportaal: volgt uit geïndexeerde data - out of scope voor dit ticket.

Publicatiecomponent:

  • Bij inlezen organisaties: alles deactiveren
  • Functioneel beheer activeert in ODRC wat nodig is
  • ODPC krijgt beperkte set

@sergei-maertens sergei-maertens moved this from Refinement to Ready in GPP-Woo Oct 9, 2024
@bart-maykin bart-maykin moved this from Ready to In progress in GPP-Woo Oct 17, 2024
@sergei-maertens
Copy link
Contributor Author

Re-opening because the fixture post-processing to make sure organisations are deactivated by default/initially is not picked up yet.

The functional requirement here is:

  • When a fresh instance is set up/deployed, all the organisations are present, but not active
  • An administrator activates in the admin the organisations that are relevant to them
  • If the fixture gets updated (extra organisations are added), then the new organisations are added and deactivated by default. Existing activated organisations are not deactivated.

@github-project-automation github-project-automation bot moved this from Done to In progress in GPP-Woo Oct 30, 2024
bart-maykin added a commit that referenced this issue Oct 31, 2024
…re file, also changed organisation default to false.
bart-maykin added a commit that referenced this issue Oct 31, 2024
…re file, also changed organisation default to false.
bart-maykin added a commit that referenced this issue Nov 1, 2024
…re file, also changed organisation default to false.
bart-maykin added a commit that referenced this issue Nov 1, 2024
…re data, because this is already posible with django.core.serializers.Serialize.
bart-maykin added a commit that referenced this issue Nov 1, 2024
…re data, because this is already posible with django.core.serializers.Serialize.
bart-maykin added a commit that referenced this issue Nov 1, 2024
…re data, because this is already posible with django.core.serializers.Serialize.
@MarcoKlerks
Copy link
Contributor

Testresultaten:

  1. De lijst aan gemeenten (filter: Municipality list) is leeg. Inlezen is niet gebeurd of mislukt.
  2. Alle organisaties staan op "actief". In de vorige opmerking hierboven is afgesproken dat ze standaard op "niet actief" gezet zouden worden, zodat de gewenste organisaties handmatig op "actief" gezet kunnen worden.
  3. In de admin-interface heet dit onderdeel "Organisations". In het Engels dus. De andere onderdelen onder "Metadata" hebben een Nederlandse naam gekregen ("Informatiecategorieën" en "Thema's"). Graag dit onderdeel hernoemen naar "Organisaties" t.b.v. consistentie.
  4. Graag de oorsprong en dus ook de filters in het Nederlands.

Ik zie overigens dat de API-documentatie (ReDoc) ook afwisselend in het Engels dan wel in het Nederlands geschreven is. Ik voeg een user story toe om dit te verbeteren.

@MarcoKlerks MarcoKlerks moved this from Testing to In review in GPP-Woo Nov 1, 2024
@MarcoKlerks MarcoKlerks removed their assignment Nov 1, 2024
@sergei-maertens
Copy link
Contributor Author

#110 will address some of these remarks! I'll put the ticket back in testing once that's tackled.

Re 3. and 4.: translations will follow soon, I typically do these in batches.

bart-maykin added a commit that referenced this issue Nov 1, 2024
…in the themes and information categories sync functions.
@github-project-automation github-project-automation bot moved this from In review to Done in GPP-Woo Nov 1, 2024
@bart-maykin bart-maykin moved this from Done to Testing in GPP-Woo Nov 1, 2024
@MarcoKlerks
Copy link
Contributor

Hertest: alle punten zijn opgelost

@MarcoKlerks MarcoKlerks moved this from Testing to Done in GPP-Woo Nov 4, 2024
@MarcoKlerks MarcoKlerks added this to the Plateau 0 (MVP) milestone Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment