Skip to content
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: handle sections without data elements [DHIS2-15883] #359

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

tomzemp
Copy link
Member

@tomzemp tomzemp commented Sep 28, 2023

See ticket: https://dhis2.atlassian.net/jira/software/c/projects/DHIS2/issues/DHIS2-15883

This fixes an issue where the section would error out (and would crash) if a section had no data elements present. The problem was that the IndicatorTableBody component has logic that adds padding cells based on the number of data elements; when no data elements were present, the calculation was saying that the data elements in the section had -Infinity maxColumnsInSection)

** I also noticed that there was a problem adjusting the padding cells based on the totals being displayed. We were removing a padding cell when column totals were displayed (if you sum up by column, you get an additional row) and not when row totals were displayed (when you sum up by row, you get an additional column).

An example of this before the fix:
image

and after:
image

@tomzemp tomzemp requested a review from a team September 28, 2023 11:54
@dhis2-bot
Copy link
Contributor

🚀 Deployed on https://pr-359--dhis2-data-entry.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify September 28, 2023 11:59 Inactive
@tomzemp tomzemp merged commit 83c062e into master Oct 5, 2023
11 checks passed
dhis2-bot added a commit that referenced this pull request Oct 5, 2023
## [100.3.7](v100.3.6...v100.3.7) (2023-10-05)

### Bug Fixes

* handle sections without data elements [DHIS2-15883] ([#359](#359)) ([83c062e](83c062e))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.3.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants