Skip to content

Metadata deletion not considering child metadata (providence 2.0.9) #1865

@thCAgh

Description

@thCAgh

Lets say i create this metadata tree

ParentA (container)
  |> ChildA-1 (text)
  |> ChildA-2 (container)
    |> ChildA-2-1 (text)
    |> ChildA-2-2 (text)

If using the UI, i delete ChildA-2, that record in the DB gets flagged as deleted=1 and not showing the entire tree in the UI anymore, but the ChildA-2-1 and ChildA-2-2 are still there.
If i try to remove/purge the deleted items using caUtils i get the same outputs and totals every time i run the command, looks like nothing is being "purged" at the end.

If i open the DB directly and try to delete ChildA-2 (container), i have consistency errors from DB, indicating i need to delete ChildA-2-1 and ChildA-2-1 before delete it.

I see room for two main improvements:

  1. Somehow this "dependency" messages are not displayed by the caUtils purge-deleted command, it would be helpful to have it.
  2. Deleting (in the UI) a container with metadata on it should not break "consistency". Perhaps avoided displaying a message or all the tree must be correctly deleted after asking confirmation to the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions