← Back to team overview

dhis2-devs team mailing list archive

Re: Metadata api and groups/groupsets

 

Hi Bob,


On Tue, Sep 24, 2013 at 6:22 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:

> I've been grappling with a problem exporting and importing orgunit
> metadata which I'd like to share some thoughts on.
>
> Two dhis2 instances (in Rwanda) have slightly different sets of orgunits.
>  So we are trying to rationalize and combine them - in most cases a union
> of the two with some shuffling around in the hierarchy.
>
> We have solved this pretty well but here is a challenge with group
> memberships.  If I export all the orgunits from system A, together with
> their orgunitgroups, over to system B, one consequence is that the existing
> group memberships in A get replaced by those from B rather than appended.
>  This is not the desired behaviour
>
> It doesn't look like we have an api method which will allow me to add an
> orgunit to an existing group.  I could of course be missing something.
>
>
I see the issue. The challenge here is to be able to support removal of
members in (org unit) groups, at the same time as supporting incremental
additions to a group. What I mean is, if you for instance want to remove
all but one member for a group, then the best way is to simply include that
single member in the message and none else. This conflicts with the desire
for convenient additions of members to a group, where you must post all
members. I think we need to add a new method for this. Feel free to suggest
what would be most sensible.

Lars

References