-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: compute subtotals/totals for boolean types (DHIS2-9155) #1696
Conversation
@@ -744,7 +749,15 @@ export class PivotTableEngine { | |||
totalCell.valueType = currentValueType | |||
} | |||
|
|||
if (dxDimension?.valueType === VALUE_TYPE_NUMBER) { | |||
// compute subtotals and totals for all numeric and boolean value types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to keep the part above with the prev/current comparison because valueType
can be of types other than numeric and boolean.
In that case, the total cell would not get the type, but always N/A if we simply check for numeric/boolean for assigning the last evaluated valueType
in the loop and fallback to N/A otherwise.
This is to align with the recent change in the backend where values are returned with 2 decimals by default.
Approved when tests are updated. |
## [26.8.3](v26.8.2...v26.8.3) (2024-08-27) ### Bug Fixes * compute subtotals/totals for boolean types (DHIS2-9155) ([#1696](#1696)) ([3392d78](3392d78))
🎉 This PR is included in version 26.8.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Implements DHIS2-9155
Key features
Description
In aggregate analytics, boolean types can be summed up.
Prior to this PR, only dimensions with value type
NUMBER
were summed up when subtotals and/or totals options were enabled.After this PR, all numeric and boolean types will be summed up.
Screenshots
Before:
After: