Column-footer aggregates (Sum/Min/Max/Avg) should follow the field's Short/Full format #21627
Replies: 2 comments
🟡 Sonarly Analysis — Medium SeverityAggregate formatter ignores currency/number display settings Aggregate values are formatted with hardcoded rules, so footer/group/chart totals can display differently from table cells for the same field. Root Cause
This is inconsistent with row-cell renderers, which do read field settings:
All affected UI surfaces share this same aggregate formatter and already pass field metadata into it (so the problem is not missing inputs):
Why it failed now (triggering cause): Timeline evidence:
Blame commit: Suggested FixImplemented a targeted fix in
This keeps formatting logic aligned between aggregate values and record cell rendering, resolving the mismatch users saw when using non-default display settings. Analyzed by Sonarly · View full analysis |
Uh oh!
There was an error while loading. Please reload this page.
Scope & Context
Twenty already lets users choose Short (
$1.2m) vs Full ($1,200,000) display for Currency fields, and Number vs Short for Number fields, and the table cells honor that. But the column-footer aggregates (Sum / Min / Max / Average), the record-index group totals, and the pie-chart center metric ignore the field's format setting — they all go throughtransformAggregateRawValueIntoAggregateDisplayValue, which doesn't read the field'ssettings.Related to #21521.
Current behavior
A Currency column set to Full shows full amounts in its cells, but its footer Sum (and Min/Max/Avg) still renders the abbreviated value — an inconsistency between the cells and their totals. Same for Number fields set to short.
Expected behavior
Aggregate totals should follow the column field's own Short/Full setting, so the footer/total matches the cells:
full, else short.shortNumber, else full.Technical inputs
packages/twenty-front/src/modules/object-record/record-aggregate/utils/transformAggregateRawValueIntoAggregateDisplayValue.ts: make the CURRENCY and NUMBER branches readaggregateFieldMetadataItem.settings(mirroringCurrencyDisplay/NumberFieldDisplay).FieldCurrencyFormat,FieldNumberVariant, graphdisplayType, widgetChartNumberFormat); a broader unification could be scoped separately.All reactions