I’m able to reproduce this as well. Would you like to create a Jira bug issue with the same steps and link to this post?
How to quickly reproduce this bug (sorry, you’ll have to wait for the analytics export though):
Create a tracker program
Select tracked entity instance person
show attributes in the list
select OUs that can view data and capture
Go to the Capture app and create several TEIs in an OU
Transfer TEIs from this OU to another OU
Run Analytics Tables Export
Go to the Line Listing app
List the TEIs in the original OU
You will find the TEIs that were supposedly transferred are still there. /api/41/analytics/enrollments returns them too. Tried in Guest mode to avoid cache and it’s still the same.
This is because line lists are based on the enrollment org unit at the moment. We are looking into adding all the different org units to the LL app, follow that issue here: [DHIS2-13021] - Jira
Thank you @rcpoudel ! Please see the comment from @Karoline . It seems that this is a work in progress and currently the Line Listing app will count the enrollment OU but the ticket explains how “multiple org units associated with TEI enrollment” can be considered.