dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43659
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22131: fix decimals for merge with in indicator
------------------------------------------------------------
revno: 22131
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2016-03-03 22:14:16 +0700
message:
fix decimals for merge with in indicator
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2016-02-11 09:27:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2016-03-03 15:14:16 +0000
@@ -35,7 +35,6 @@
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-
import org.hisp.dhis.common.BaseDimensionalItemObject;
import org.hisp.dhis.common.BaseIdentifiableObject;
import org.hisp.dhis.common.DxfNamespaces;
@@ -155,7 +154,7 @@
// -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
-
+
@Override
public boolean haveUniqueNames()
{
@@ -333,6 +332,7 @@
if ( mergeMode.isReplace() )
{
+ decimals = indicator.getDecimals();
denominator = indicator.getDenominator();
denominatorDescription = indicator.getDenominatorDescription();
numerator = indicator.getNumerator();
@@ -343,6 +343,7 @@
}
else if ( mergeMode.isMerge() )
{
+ decimals = indicator.getDecimals() == null ? decimals : indicator.getDecimals();
denominator = indicator.getDenominator() == null ? denominator : indicator.getDenominator();
denominatorDescription = indicator.getDenominatorDescription() == null ? denominatorDescription : indicator.getDenominatorDescription();
numerator = indicator.getNumerator() == null ? numerator : indicator.getNumerator();