Skip to content

Commit

Permalink
fix: use correct aggregation type if numberType undefined DHIS2-15698 (
Browse files Browse the repository at this point in the history
…#1564)

numberType can be missing in AO that use the default value for it.
The default value is VALUE and should not cause the total aggregation
type to be overridden.

Co-authored-by: Martin <[email protected]>
  • Loading branch information
edoardo and martinkrulltott authored Aug 28, 2023
1 parent 82f3626 commit c740e32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/pivotTable/PivotTableEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,10 @@ export class PivotTableEngine {
if (totalCell && totalCell.count) {
totalCell.value = applyTotalAggregationType(
totalCell,
this.visualization.numberType !== NUMBER_TYPE_VALUE &&
// DHIS2-15698: do not override total aggregation type when numberType option is not present
// (numberType option default is VALUE)
this.visualization.numberType &&
this.visualization.numberType !== NUMBER_TYPE_VALUE &&
AGGREGATE_TYPE_SUM
)
this.adaptiveClippingController.add(
Expand Down

0 comments on commit c740e32

Please sign in to comment.