We’ve recently experienced some confusion with moving contacts via their edit form.
Like shown below (taken from this thread):
As an admin moving the person, similar as above, results in the hierarchy updating accordingly.
We, perhaps incorrectly, assumed that was all there was to it. The CHW can now log in and pull their new work.
Unfortunately this was not the case. Logging in as the CHW the same work is displayed as before.
After some playing around it seems we required 2 additional steps:
We need to update the place value for the login user linked to the moved CHW.
The CHW then needs to clear their cache in order to replicate the new data, simply syncing did not work.
Is that the expected behavior?
I’m not sure if this process is perhaps documented anywhere and we just missed it?
As previously noted, moving contacts is current a hot-topic for the CHT since the current functionality is not sufficient.
I think the short answer is, yes, this is expected behavior. These docs cover the general process of moving contacts (particularly for an admin user moving contacts between offline users). Unfortunately, I am not sure we have any specific docs regarding moving a user’s contact. The process should be similar as what is documented for moving any other contact with this addition (as you noted) that the facility_id value for the doc in the _users db and the user-settings doc in the medic db will need to be set to the contact’s new place id. FWIW, I know that improving the process of moving users is a priority for GitHub - medic/cht-user-management and progress is being made, and more features are being added to cht-core to help support this…