chore: get one trackedEntity via path and query param is identical DHIS2-18541 #19377
+574
−637
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.
as already done for
/tracker/events
in #18943Program program
parameter was always null inDefaultTrackedEntityService
./tracker/trackedEntities/{uid}
using H2 and not/tracker/trackedEntities
.orgUnitMode
inOperationParams
toACCESSIBLE
as this is the safest/least surprising/mostly what we want value.null
is not a valid value and makes theOperationParams
harder to use.Tests
getTrackedEntityByIdWithFieldsRelationshipsNoAccessToRelationshipType
as we do not check data read access of the relationship type in/tracker/trackedEntities
. This was only done for/tracker/trackedEntities/{uid}
.Found Bug
We only tested the
/tracker/trackedEntities/{uid}
using controller tests so far. Only now do these tests show this bug as we are now using the same code path for serving collections. That code path is extremely complicated 😢 (aggregate).Reason was
We used the wrong
param
to detect whether relationships should be set on the event.TrackedEntityParams
are another source of unnecessary complexity.Next
TrackedEntitiesExportControllerTest
to use the json fixture instead of creating the setup using the managerTestBase
😬src/main
in the tracker module. Should we merge thetest-integration
andtest-web-api
modules? We need to investigate the pros/cons.