maykinmedia / open-klant

Registratiecomponent voor de opslag en ontsluiting van klantgegevens volgens de Klantinteracties API-specificatie.
Other
2 stars 3 forks source link

Question: why is `betrokkene` required in the Admin Interface, for a `digitaalAdres` that is `verstrektDoorPartij` #226

Closed sytskevanhasselt closed 4 weeks ago

sytskevanhasselt commented 3 months ago

Product versie / Product version

2.1.0

Omschrijf het probleem / Describe the bug

I want to enter a Digitaal Adres for one of the Partijen we created from KISS, in the admin interface of OpenKlant.

But when I try to add a Digitaal Adres for only a Partij, I get a message that betrokkene is required.

From the OpenAPI.yaml, i got the impression that within digitaalAdres both vertrektDoorBetrokkene and vertrektDoorPartij are required, but can be null. Where the intention is: one of these two must not be null

What is the reason betrokkene is required when adding a digitaalAdres? Is the idea that when a partij "verstrekt" a digitaalAdres, this is alway done within the context of a klantcontact, and hence there must be a betrokkene ?

Stappen om te reproduceren / Steps to reproduce

Verwacht gedrag / Expected behavior

No response

sytskevanhasselt commented 1 month ago

Just to confirm: a POST via postman, with this body, works okay:

{
"verstrektDoorBetrokkene": null,
"verstrektDoorPartij": {
"uuid": "a6df27cc-6481-4222-9ecb-f715692008f5"
},
"adres": "0306921581",
"soortDigitaalAdres": "telnr",
"omschrijving": "digitaaladres via post"
}
joeribekker commented 1 month ago

@sytskevanhasselt this indeed sounds like the wrong behaviour in the admin. The semantic model supports that this is not required (and logic tells me it should not be required).

sytskevanhasselt commented 1 month ago

When discussing this issue, we also found that, when entering a digitaalAdres for a partij in the Admin interface, it is possible to select any betrokkene availble in OpenKLant. Even a betrokkene that was a totally different Partij. This doesn't seem right, but i'm not sure if this is an issue for the Admin, or not. Should we make separate issue? Or is it the responsability of the consumer to make sure that data is semantically correct?