Skip to content

Enrich audit log entries with changed field details #583

@Chris0Jeky

Description

@Chris0Jeky

Context

PR #581 wired audit logging for board mutations (fixing #521), but update operations only log that an update occurred without specifying which fields changed.

Surfaced by Gemini code review on PR #581.

Problem

Audit log entries for update operations (board, card, column, label) record AuditAction.Updated but don't include what was actually changed. This makes the activity trail less useful for understanding what happened.

Proposed Changes

For each UpdateAsync path, build a change summary from the DTO before logging:

  • BoardService: log which of Name, Description, IsArchived changed
  • CardService: log which of Title, Description, DueDate, IsBlocked, BlockReason, LabelIds changed
  • ColumnService: log which of Name, WipLimit, Position changed
  • LabelService: log which of Name, Color changed

Pass the summary string to LogActionAsync via the existing changes parameter.

Acceptance Criteria

  • Update audit entries include a human-readable summary of changed fields
  • Null/unchanged fields are omitted from the summary
  • Existing tests still pass
  • New tests verify change details appear in audit entries

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions