From c740e320be568cce4430afaab688dd52ced83fa3 Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Mon, 28 Aug 2023 14:09:26 +0200 Subject: [PATCH 1/2] fix: use correct aggregation type if numberType undefined DHIS2-15698 (#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 --- src/modules/pivotTable/PivotTableEngine.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/pivotTable/PivotTableEngine.js b/src/modules/pivotTable/PivotTableEngine.js index 815a5b8d4..ddea5c485 100644 --- a/src/modules/pivotTable/PivotTableEngine.js +++ b/src/modules/pivotTable/PivotTableEngine.js @@ -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( From 6d1bcc9c83b336bf655d34c7455ed9347124ce7c Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Mon, 28 Aug 2023 12:14:16 +0000 Subject: [PATCH 2/2] chore(release): cut 26.0.17 [skip ci] ## [26.0.17](https://github.com/dhis2/analytics/compare/v26.0.16...v26.0.17) (2023-08-28) ### Bug Fixes * use correct aggregation type if numberType undefined DHIS2-15698 ([#1564](https://github.com/dhis2/analytics/issues/1564)) ([c740e32](https://github.com/dhis2/analytics/commit/c740e320be568cce4430afaab688dd52ced83fa3)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1484780c0..69b7b35c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [26.0.17](https://github.com/dhis2/analytics/compare/v26.0.16...v26.0.17) (2023-08-28) + + +### Bug Fixes + +* use correct aggregation type if numberType undefined DHIS2-15698 ([#1564](https://github.com/dhis2/analytics/issues/1564)) ([c740e32](https://github.com/dhis2/analytics/commit/c740e320be568cce4430afaab688dd52ced83fa3)) + ## [26.0.16](https://github.com/dhis2/analytics/compare/v26.0.15...v26.0.16) (2023-08-18) diff --git a/package.json b/package.json index 5e045ed10..eef1e94f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/analytics", - "version": "26.0.16", + "version": "26.0.17", "main": "./build/cjs/index.js", "module": "./build/es/index.js", "exports": {