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

Klantcontact.onderwerpobjecten inline does not show related onderwerpobjecten #261

Open
stevenbal opened this issue Oct 3, 2024 · 2 comments
Assignees
Labels
approved bug Something isn't working owner: dimpact

Comments

@stevenbal
Copy link
Collaborator

Product versie / Product version

latest

Omschrijf het probleem / Describe the bug

Onderwerpobjecten do not show up in the inline of the Klantcontact admin, despite existing in the API

image

GET http://localhost:8000/klantinteracties/api/v1/onderwerpobjecten

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "uuid": "27b2bd53-4416-4e22-93bb-98bf650dbe06",
      "url": "http://localhost:8000/klantinteracties/api/v1/onderwerpobjecten/27b2bd53-4416-4e22-93bb-98bf650dbe06",
      "klantcontact": {
        "uuid": "68c1fd86-a772-4aeb-bccd-a6143b552ada",
        "url": "http://localhost:8000/klantinteracties/api/v1/klantcontacten/68c1fd86-a772-4aeb-bccd-a6143b552ada"
      },
      "wasKlantcontact": null,
      "onderwerpobjectidentificator": {
        "objectId": "objectId",
        "codeObjecttype": "codeObjecttype",
        "codeRegister": "codeRegister",
        "codeSoortObjectId": "codeSoortObjectId"
      }
    }
  ]
}

Stappen om te reproduceren / Steps to reproduce

  1. Create a Klantcontact via the API
  2. Create a related Onderwerpobject via the API
  3. Navigate to /admin/klantinteracties/klantcontact and click on the newly created Klantcontact
  4. Scroll down to the Onderwerpobjecten inline and observe that it is empty

Verwacht gedrag / Expected behavior

The admin should show the related onderwerpobjecten

@stevenbal stevenbal added bug Something isn't working triage labels Oct 3, 2024
@stevenbal
Copy link
Collaborator Author

Might be because the Onderwerpobject resource has both klantcontact and was_klantcontact fields. I'm not sure what the difference between them is @bart-maykin do you know more about this?

@joeribekker
Copy link
Member

joeribekker commented Oct 22, 2024

if you look at the model (https://vng-realisatie.github.io/klantinteracties/informatiemodel/semantisch_model) it shows 2 relations:

wasKlantcontact: OnderwerpObject-was->Klantcontact
klantcontact: Klantcontact-(gingover->OnderwerpObject

So, we need to make sure the admin shows the proper one (or the API?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved bug Something isn't working owner: dimpact
Projects
Status: Todo
Development

No branches or pull requests

3 participants