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: (2.39) Incorrect follow-up value while saving working list[DHIS2-18206] #18846

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class EntityQueryCriteria implements Serializable {
* Property indicating whether to filter tracked entity instances whose enrollments are marked for
* followup or not
*/
private Boolean followUp = false;
private Boolean followUp;

/** Property indication the OU for the filter. */
private String organisationUnit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,25 @@ void testAddGet() {
assertEquals(trackedEntityInstanceFilterB, trackedEntityInstanceFilterService.get(idB));
}

@Test
void testAddFilterWithAndWithoutFollowUp() {
TrackedEntityInstanceFilter filterWithOutFollowUp =
createTrackedEntityInstanceFilter('A', programA);
TrackedEntityInstanceFilter filterWithFollowUp =
createTrackedEntityInstanceFilter('B', programB);
filterWithFollowUp.getEntityQueryCriteria().setFollowUp(true);

long idA = trackedEntityInstanceFilterService.add(filterWithOutFollowUp);
long idB = trackedEntityInstanceFilterService.add(filterWithFollowUp);
TrackedEntityInstanceFilter fetchedA = trackedEntityInstanceFilterService.get(idA);
TrackedEntityInstanceFilter fetchedB = trackedEntityInstanceFilterService.get(idB);

assertEquals(filterWithOutFollowUp, fetchedA);
assertNull(fetchedA.getEntityQueryCriteria().getFollowUp());
assertEquals(filterWithFollowUp, trackedEntityInstanceFilterService.get(idB));
assertTrue(fetchedB.getEntityQueryCriteria().getFollowUp());
}

@Test
void testDefaultPrivateAccess() {
long idA =
Expand Down
Loading