dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13687
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4459: Minor fix
------------------------------------------------------------
revno: 4459
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-08-26 20:34:45 +0200
message:
Minor fix
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/history/DefaultHistoryRetriever.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-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/history/DefaultHistoryRetriever.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/history/DefaultHistoryRetriever.java 2011-07-20 21:38:30 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/history/DefaultHistoryRetriever.java 2011-08-26 18:34:45 +0000
@@ -29,6 +29,7 @@
import java.util.List;
+import org.apache.commons.math.util.MathUtils;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.datavalue.DataValue;
@@ -128,6 +129,7 @@
max = Math.max( max, historyPoint.getValue() );
total += historyPoint.getValue();
average = total / ++count;
+ average = MathUtils.round( average, 1 );
}
historyPoint.setAverage( average );