dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16339
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6194: Using uid instead of id in report org unit param
------------------------------------------------------------
revno: 6194
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-03-07 08:32:27 +0100
message:
Using uid instead of id in report org unit param
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/impl/DefaultReportService.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/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2012-02-20 10:20:01 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2012-03-07 07:32:27 +0000
@@ -456,7 +456,7 @@
/**
* Creates a map which contains mappings between the organisation unit
- * identifier and the name of the group this organisation unit is a member
+ * uid and the name of the group this organisation unit is a member
* of in all of the given group sets for all organisation units in this
* report table.
*
@@ -469,13 +469,13 @@
for ( OrganisationUnitGroupSet groupSet : groupSets )
{
- Map<Integer, String> map = new HashMap<Integer, String>();
+ Map<String, String> map = new HashMap<String, String>();
for ( NameableObject unit : allUnits )
{
if ( unit instanceof OrganisationUnit )
{
- map.put( unit.getId(), ((OrganisationUnit) unit).getGroupNameInGroupSet( groupSet ) );
+ map.put( unit.getUid(), ((OrganisationUnit) unit).getGroupNameInGroupSet( groupSet ) );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml 2012-02-29 09:21:50 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml 2012-03-07 07:32:27 +0000
@@ -70,7 +70,6 @@
<bean id="org.hisp.dhis.datamerge.DataMergeStore" class="org.hisp.dhis.datamerge.jdbc.JdbcDataMergeStore">
<property name="jdbcTemplate" ref="jdbcTemplate" />
<property name="statementBuilder" ref="statementBuilder" />
- <!--property name="statementManager" ref="statementManager"/-->
</bean>
<bean id="org.hisp.dhis.datamerge.DataMergeService" class="org.hisp.dhis.datamerge.DefaultDataMergeService">
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/impl/DefaultReportService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/impl/DefaultReportService.java 2012-02-26 21:19:49 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/impl/DefaultReportService.java 2012-03-07 07:32:27 +0000
@@ -145,7 +145,7 @@
if ( report.isUsingOrganisationUnitGroupSets() )
{
- params.putAll( reportTable.getOrganisationUnitGroupMap( organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets() ) );
+ params.putAll( reportTable.getOrganisationUnitGroupMap( organisationUnitGroupService.getAllOrganisationUnitGroupSets() ) );
}
print = JasperFillManager.fillReport( jasperReport, params, grid );
@@ -168,7 +168,7 @@
{
JRExportUtils.export( type, out, print );
}
- }
+ }
catch ( Exception ex )
{
throw new RuntimeException( "Failed to render report", ex );