Skip to content

Delete Records Design

Ed Mozley edited this page Dec 5, 2026 · 4 revisions

Deleting records made by mistake - Design

Status: AGREED (Ed, 5 December 2026) - all three stages built after 5.19.0 (companies: only when empty). Requested in #530 by @bbieganski; the bin was Ed's idea.

The request

A Super Admin tool to remove records made by mistake or in testing - assets, companies, users, imported people - that first shows everything depending on a record, so the decision is made knowingly, instead of deleting rows in the database.

Decided

Date Decision Who
2026-12-05 One tool with its own bin: System -> Maintenance -> Delete records, Super Admin only. It shows every dependent of a record (counts and links), offers Retire where the record type has it (assets, CIs, people) because that keeps the history, and otherwise deletes into the tool's own bin: a snapshot of the record and its dependents, kept for a number of days (a setting), from which Restore puts it back - refusing, and saying why, if something now clashes (a reused number, a re-imported person). Typed confirmation; every delete and restore audited. Ed
2026-12-05 Not soft-delete everywhere (a flag on every table and every query) - weeks of work and a risk of a missed filter showing deleted data Ed
2026-12-05 Not delete with no way back Ed
2026-12-05 Companies: only when empty. A company's preview lists everything still in it, with counts per kind; Delete is refused until it is empty (records moved to another company or deleted first). An empty company then goes into the bin like an asset or a person, fully restorable. Chosen over "everything into the bin" (a whole company's snapshot is huge, and files on disk cannot be promised back) and over leaving companies out. Closest to ITIL: controlled, audited, recoverable removal Ed

Closest to ITIL (service configuration management, information security): records keep their history through their lifecycle - retire rather than erase; deletion is the controlled, audited exception.

Build order

  1. The tool and the dependency preview for assets, people and imported people (the cases in the request). Built after 5.19.0.
  2. The bin and Restore. Built with stage 1 - a delete with no bin would have contradicted "not delete with no way back". See Delete records and the developer guide.
  3. Companies - only when empty (decided above). Built 5 December 2026.

FreeITSM

Getting Started

Modules

Multi-tenancy (planned)

Responses to feedback

Blue sky thinking

Bugs resolved

Pull requests

Links

Clone this wiki locally