Skip to content

Delete attached photos when a feature is deleted #4727

Description

@gabriel-bolbotina

Current situation

When a feature is deleted, its attached photos stay on the device and in the project. This leaves unused files behind, and with the composition relation supported (#2315) more features will be deleted automatically, so more orphaned photos could pile up.

Proposed solution

When a feature is deleted, delete its attached photos as well. This also applies to child features deleted through a composition relation (for example, if a parent feature is deleted, then its children should be deleted as well)

Acceptance criteria

  • Deleting a feature deletes its attached photo(s)
  • Deleting a parent with composition children deletes the photo(s) of all deleted child features (including nested ones)
  • If child features are created while adding a parent, and the parent is discarded without saving, the photos of those child features are deleted too
  • Deleting a parent with association children does not delete the children's photos (and neither the children, check acceptance criteria of (Relationship strength "composite" has no effect in the app #2315)
  • when discarding a parent feature with composition children, the delete confirmation text mentioned that the attached photos will also be deleted

Related to: #2315

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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