fix: SetTeam transaction now shows as system event in timeline

- Added SetTeam to isSystem check
- Shows 'Team changed' in the timeline instead of raw 'SetTeam' text

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Gjermund Høsøien Wiggen
2026-06-09 22:52:25 +02:00
parent c023079a1a
commit 6f1d7bfa9b

View File

@@ -113,6 +113,7 @@ function TransactionCard({
const isSystem = const isSystem =
tx.transaction_type === "StatusChange" || tx.transaction_type === "StatusChange" ||
tx.transaction_type === "SetOwner" || tx.transaction_type === "SetOwner" ||
tx.transaction_type === "SetTeam" ||
tx.transaction_type === "CustomFieldChange" || tx.transaction_type === "CustomFieldChange" ||
tx.transaction_type === "Create"; tx.transaction_type === "Create";
const isInternal = tx.transaction_type === "Comment"; const isInternal = tx.transaction_type === "Comment";
@@ -132,6 +133,8 @@ function TransactionCard({
message = `Status changed from ${oldLabel} to ${newLabel}`; message = `Status changed from ${oldLabel} to ${newLabel}`;
} else if (tx.transaction_type === "SetOwner") { } else if (tx.transaction_type === "SetOwner") {
message = tx.new_value ? `Assigned to ${userLabel(users, tx.new_value)}` : "Unassigned"; message = tx.new_value ? `Assigned to ${userLabel(users, tx.new_value)}` : "Unassigned";
} else if (tx.transaction_type === "SetTeam") {
message = "Team changed";
} else if (tx.transaction_type === "CustomFieldChange") { } else if (tx.transaction_type === "CustomFieldChange") {
const fieldName = tx.field ? customFieldLabels[tx.field] ?? "Custom field" : "Custom field"; const fieldName = tx.field ? customFieldLabels[tx.field] ?? "Custom field" : "Custom field";
message = tx.new_value ? `${fieldName} set to ${tx.new_value}` : `${fieldName} cleared`; message = tx.new_value ? `${fieldName} set to ${tx.new_value}` : `${fieldName} cleared`;