fix: send showHierarchy for pivot table analytics requests - #384
Draft
HendrikThePendric wants to merge 1 commit into
Draft
HendrikThePendric wants to merge 1 commit into
HendrikThePendric wants to merge 1 commit into
Conversation
The "Display organisation unit hierarchy" option reached the pivot table engine but was never sent to the analytics API, so no ouNameHierarchy came back and the option had no effect. Send showHierarchy when the option is on, and include it in the request identity so toggling it refetches. It is set on the pivot adapter rather than in ANALYTICS_OPTIONS, which the line list shares and which must not start sending the parameter. Points @dhis2/analytics at a d2-ci build for testing; to be replaced with a released version once that PR is merged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
🚀 Deployed on https://pr-384.event-visualizer.netlify.dhis2.org |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Implements DHIS2-22094
Description
"Display organisation unit hierarchy" is offered in the pivot table Style tab but has no effect. The option reached the pivot engine, but
showHierarchywas never sent to the analytics API, so noouNameHierarchycame back.Sends
showHierarchywhen the option is on, and adds it to the request identity so toggling refetches. Set on the pivot adapter rather than inANALYTICS_OPTIONS, which the line list shares and which must not start sending the parameter.Dependency chain
oushowHierarchy=trueEnrollment pivots work once 2 merges. Event pivots additionally need 1 — until then the backend returns no hierarchy for
<stageId>.ouand the option stays inert for them.Merging 3 without 2 would make enrollment pivots worse than today: the option would blank the table rather than do nothing.
Quality checklist
ToDos
Known issues
🤖 Generated with Claude Code