All articles

Utilities

Audit Log & Restore

Every meaningful create / update / delete is logged with who, when, what changed (before-and-after), and where to restore it. The Restore button rebuilds a deleted record or rolls back an update from the log entry alone — no DB administrator needed.

The Audit Log at Utilities → Audit Log is JewelTrak’s accountability layer: every meaningful change to a record (create, update, delete) is captured with who did it, when, the full before-and-after of every changed field, and a Restore button to undo it.

The audit log is admin-only (gated by CanManageUsers).

What gets logged

The audited operations cover the records most likely to need investigation or recovery:

  • Inventory — creates, updates, deletes (including bulk operations)
  • Customers / contacts — creates, updates, merges, deletes
  • Invoices and line items — finalize, void, edit, line add/remove
  • Memos — issue, return, convert
  • Payments — record, void
  • Partnerships — setup, reconcile
  • Settings — store config, user roles, permission group changes
  • Schema-touching admin actions — anything that goes through the audited helpers

Routine reads, list views, and report generation are not logged — too noisy.

Searching the log

Filters on the log page:

  • Date range — most common starting filter
  • User — who did it
  • Entity type — inventory / contact / order / payment / etc.
  • Operation — create / update / delete
  • Search text — match against record IDs or field values

Each row shows the timestamp, user, operation, the affected record (with a link), and a diff of what changed.

Restoring from the log

For deletes: every audited delete captures the full pre-delete snapshot of the record (and any of its dependent rows that cascaded). Click Restore on the delete entry — JewelTrak rebuilds the record from the snapshot, including the IDs (where possible) and the dependent rows. Audit log entry is added recording the restore.

For updates: the audit entry has the before-state of every changed field. Restore rolls those fields back to their pre-edit values. Subsequent edits between the original change and now are not automatically reverted — only the specific change you’re undoing.

This works for any audited record without database access. Common uses:

  • Salesperson deletes the wrong invoice → restore from audit
  • Manager edits a partner’s split percentage by mistake → restore from audit
  • Inventory item description changed and you want the old one back → restore the field

Polymorphic refs and limits

The restore engine handles polymorphic references (item_additional_costs, setstones.MountID, etc.) at the app layer — there are some edge cases where a restore needs manual intervention if the parent record has changed since the delete. The UI flags those with a warning.

Tips

  • The audit log is append-only — no editing, no deletion of entries. Even the act of restoring leaves its own log entry.
  • For high-volume changes (bulk imports), the log can get large fast. Use date filters to keep the page responsive.
  • The log is invaluable for compliance and audits — most year-end reviews want to see “who changed what when” for sample transactions.
  • If you need a one-shot bulk-export of audit entries (for a regulator, an incident response), the Audit Log Viewer’s CSV export covers the same data the UI shows.