← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21896: Data set report, fixed regression bug from web api change

 

------------------------------------------------------------
revno: 21896
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2016-02-06 14:21:31 +0100
message:
  Data set report, fixed regression bug from web api change
modified:
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js


--
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-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2015-08-03 22:22:21 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2016-02-06 13:21:31 +0000
@@ -78,7 +78,7 @@
 	
 	var html = '';
 	
-	$.getJSON( "../api/dimensions/dataSet/" + ds, function( json ) {
+	$.getJSON( "../api/dimensions/dataSet/" + ds + ".json", function( json ) {
 		
 		if ( !json.dimensions ) {
 			$( "#dimensionsDiv" ).hide();
@@ -88,7 +88,7 @@
 			var rx = [];
 			
 			$.each( json.dimensions, function( idx, dim ) {
-				rx.push( $.get( "../api/dimensions/" + dim.id + ".json" ) );
+				rx.push( $.get( "../api/dimensions/" + dim.id + ".json?fields=:all,items[id,displayName]" ) );
 			} );
 			
 			$.when.apply( $, rx ).done( function() {
@@ -107,7 +107,7 @@
 						dim.items.sort( dhis2.util.nameSort );
 						
 						$.each( dim.items, function( idx, option ) {
-							html += '<option value="' + option.id + '">' + option.name + '</option>';
+							html += '<option value="' + option.id + '">' + option.displayName + '</option>';
 						} );
 						
 						html += '</select>';