Skip to content

Extend API to prevent breaking intervention actions when deleting referenced observation #388

@iaigner

Description

@iaigner

Deleting an observation that’s used within an intervention (for data checks or actions) does break intervention actions, with actions referenced to observation. This results in interventions missing essential components without notifying the user.

For this to be possible, the backend and API needs to be extended:

  • When deleting an observation, that is linked to an intervention, the delete dialog (alert) should show interventions, that have the observation linked (no endpoint exists for listing interventions based on observationId)
  • When deleting the observation with linked interventions, all links to the observation in intervention actions have to be deleted as well (otherwise we have a broken intervention action) (extend deleteObservation endpoint)

Note to Endpoints:

  • Interventions with linked observations have to observationId inside the actions.properties property. This is the only point, where the observationId is currently saved. Right now this can only be fetched based on one specific intervention

Referring Frontend Issue: MORE-Platform/more-studymanager-frontend#560

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions