fix(tickets): humanise FK column names in change-history field labels #267
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/pms-370-humanize-history-field-labels"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PMS-359 added inline-edit dropdowns for Status, Priority and Assigned To and routed each change through the existing ticket audit snapshot path. The per-record history feed derives its
fieldlabels straight from the changed JSON column keys, so the FK columns (status_id,priority_id,assigned_to_id) leaked into the rendered labels asUpdated: Status id,Updated: Priority id,Updated: Assigned to id.Strip a trailing
_idsuffix and replace underscores with spaces at the history read boundary (From<HistoryRow> for EntityHistoryEntry) via a singlehumanize_fieldhelper. The stored audit rows still record the exact column that changed; only the rendered label is cleaned up, so any future FK field inherits the fix without a client change. The rawfield_changeswriter (asset audit log) is untouched and keeps storing exact column names.Adds a
humanize_fieldunit test and a Postgres-backed integration test that performs an inline Status edit and asserts the history row carries the humanisedstatusfield, neverstatus_id.#PMS-370