dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36699
Re: [Bug 1435060] [NEW] Indicators with existing names imported as new
Hi Calle,
this is actually intended behavior. For most of the domain objects, the
"name" property is not unique.
The main reason for this is the "sharing" solution, where we allow users to
create private / usergroup-shared objects - hence the name cannot be unique
across the entire system.
Indicator has a non-unique name. You can inspect each and every property of
all domain objects from the api/schemas endpoint:
https://apps.dhis2.org/demo/api/schemas
So the properties we match on for indicators are UID and code. You will
have to synchronize on one or both of these properties to match.
best regards,
Lars
On Sun, Mar 22, 2015 at 8:10 PM, Calle Hedberg <calle.hedberg@xxxxxxxxx>
wrote:
> Public bug reported:
>
> Scenario:
> Exporting a complete set of indicators from instance A to instance B. This
> two instances have nearly identical sets of indicators in terms of NAMES
> but not necessarily in terms of indicators UIDs. A number of indicator
> parameters/fields have been updated in instance A, updates which needs to
> be transferred to instance B using export and import (new and update). Many
> of these indicators are used in reports and charts in instance B, so a
> complete removal of all indicators in B before importing the set from A is
> not practical.
>
> 1. Export a complete set of around 300 indicators from instance A (XML
> format).
>
> 2. Import the set into instance B, using "new and updates". The import
> summary highlights a number of issues, mainly related to the fact that
> the indicators in A have additional user-specified attributes.
>
> 3. When checking the indicator list in B afterwards, a large number
> (over half) of the indicators are duplicated.
>
> My assumption is that any indicator with the same NAME as an existing
> indicator but with a different UID, will be imported as new and become a
> duplicate.
>
--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1435060
Title:
Indicators with existing names imported as new
Status in DHIS 2:
Invalid
Bug description:
Scenario:
Exporting a complete set of indicators from instance A to instance B. This two instances have nearly identical sets of indicators in terms of NAMES but not necessarily in terms of indicators UIDs. A number of indicator parameters/fields have been updated in instance A, updates which needs to be transferred to instance B using export and import (new and update). Many of these indicators are used in reports and charts in instance B, so a complete removal of all indicators in B before importing the set from A is not practical.
1. Export a complete set of around 300 indicators from instance A (XML
format).
2. Import the set into instance B, using "new and updates". The import
summary highlights a number of issues, mainly related to the fact that
the indicators in A have additional user-specified attributes.
3. When checking the indicator list in B afterwards, a large number
(over half) of the indicators are duplicated.
My assumption is that any indicator with the same NAME as an existing
indicator but with a different UID, will be imported as new and become
a duplicate.
DHIS 2.18 latest, Win 7-64bits, PostgresQL 9.4, Java 7.75, Tomcat 8.2
To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1435060/+subscriptions
References