cht-conf
cht-conf copied to clipboard
Add filtering options to medic-conf move-contacts
What feature do you want to improve?
It would be great if medic-conf move-contacts
offers a filtering option for data we want to move.
Describe the improvement you'd like
I was trying to resolve this ticket of CMoHM where data had to be moved from dev. instance to production for a specific number of areas and within the time range Sept, 14 - Oct, 20. Using medic-conf --instance= move-contacts -- --contacts=contact_1,contact_2 --parent=parent_id --docDirectoryPath=my_folder
downloads all the data of the specified contact, unless a part is deleted from CouchDB before using the command. Therefore, there was a need to select the data of interest in the bunch of .json files downloaded.
Also, it seems not possible to bulk download data for many contacts not having the same parent.
Describe alternatives you've considered Due to the difficulty stated above, the option considered was to use a set of a batch script. The entire process is described here.
Additional context
For sure, move-contacts
is not an everyday feature/tool in our current CHT activities/projects. But, maybe it could be helpful to add customization options to it.
cc @binokaryg @kennsippell
Related: https://github.com/medic/cht-core/issues/6680 https://github.com/medic/medic-conf/issues/197