fix(tracker): use v42 tracker API params for org unit filtering#386
fix(tracker): use v42 tracker API params for org unit filtering#386ifoche wants to merge 1 commit intodevelopmentfrom
Conversation
Replace deprecated ouMode/orgUnit params with orgUnitMode/orgUnits and comma delimiter for /tracker/trackedEntities endpoint. Fixes TEI population ignoring selected org units in DHIS2 v42. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
BundleMonNo change in files bundle size Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
|
confirmed that it works on my side. Just one doubt. Bulk Load seems to be badly designed when it comes to this endpoint (the new endpoint for TEIs). Bulk Load is using a separate call instead of implementing this in d2-api. For that reason I have implemented the modification also in the app, which happens to work. But we would need to do that in d2-api if we wanted to cover this. Specifically: d2-api has two separate TEI APIs:
But the app bypasses d2-api's typed tracker class entirely. At Dhis2TrackedEntityInstances.ts:549: The ideal design would be both:
But the d2-api fix alone wouldn't help - since the app bypasses the typed class and builds its own query params, fixing d2-api would only fix the type definitions, not the actual HTTP calls the app makes. So the pragmatic solution here: the app fix is the critical one regardless. A d2-api fix would be a good companion improvement (type correctness + making it possible to use the typed API), but it's not a prerequisite and wouldn't solve the problem by itself. |
Summary
ouModewithorgUnitMode,orgUnitwithorgUnits(plural), and semicolon delimiter with commas for/tracker/trackedEntitiesendpointRelated Tasks
Test plan
🤖 Generated with Claude Code