[Dhis2-devs] individual records paginate seem outside

2014-10-28 Thread rin.channara
 






hi all dev,

after I record many individual records, the number of paginate seem outside box___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17298: ER option code/name support implemented.

2014-10-28 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 17298 [merge]
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Tue 2014-10-28 11:22:06 +0100
message:
  ER option code/name support implemented.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-23 09:11:36 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-27 14:40:23 +
@@ -6335,86 +6335,135 @@
 
 map['aggregated_values'] = function() {
 	var xLayout,
+xResponse,
 		xColAxis,
 		xRowAxis,
 		table,
-		getHtml,
-		getXLayout = service.layout.getExtendedLayout,
-		getSXLayout = service.layout.getSyncronizedXLayout,
-		getXResponse = service.response.aggregate.getExtendedResponse,
-		getXAxis = service.layout.getExtendedAxis;
-
+		getSXLayout,
+		getXResponse,
+getTable;
+
+getTable = function() {
+var getHtml = function(xLayout, xResponse) {
+xColAxis = service.layout.getExtendedAxis(xLayout, 'col');
+xRowAxis = service.layout.getExtendedAxis(xLayout, 'row');
+
+return web.report.aggregate.getHtml(xLayout, xResponse, xColAxis, xRowAxis);
+};
+
+table = getHtml(xLayout, xResponse);
+
+if (table.tdCount > 2 || (layout.hideEmptyRows && table.tdCount > 1)) {
+alert('Table has too many cells. Please reduce the table and try again.');
+web.mask.hide(ns.app.centerRegion);
+return;
+}
+
+if (layout.sorting) {
+xResponse = web.report.aggregate.sort(xLayout, xResponse, xColAxis);
+xLayout = service.layout.getSyncronizedXLayout(layout, xLayout, xResponse);
+table = getHtml(xLayout, xResponse);
+}
+
+web.mask.show(ns.app.centerRegion, 'Rendering table..');
+
+// timing
+ns.app.dateRender = new Date();
+
+ns.app.centerRegion.removeAll(true);
+ns.app.centerRegion.update(table.html);
+
+// timing
+ns.app.dateTotal = new Date();
+
+// after render
+ns.app.layout = layout;
+ns.app.xLayout = xLayout;
+ns.app.response = response;
+ns.app.xResponse = xResponse;
+ns.app.xColAxis = xColAxis;
+ns.app.xRowAxis = xRowAxis;
+ns.app.uuidDimUuidsMap = table.uuidDimUuidsMap;
+ns.app.uuidObjectMap = Ext.applyIf((xColAxis ? xColAxis.uuidObjectMap : {}), (xRowAxis ? xRowAxis.uuidObjectMap : {}));
+
+if (NS.isSessionStorage) {
+//web.events.setValueMouseHandlers(layout, response || xResponse, ns.app.uuidDimUuidsMap, ns.app.uuidObjectMap);
+web.events.setColumnHeaderMouseHandlers(layout, response, xResponse);
+web.storage.session.set(layout, 'eventtable');
+}
+
+ns.app.accordion.setGui(layout, xLayout, response, isUpdateGui, table);
+
+web.mask.hide(ns.app.centerRegion);
+
+if (NS.isDebug) {
+console.log("Number of cells", table.tdCount);
+console.log("DATA", (ns.app.dateCreate - ns.app.dateData) / 1000);
+console.log("CREATE", (ns.app.dateRender - ns.app.dateCreate) / 1000);
+console.log("RENDER", (ns.app.dateTotal - ns.app.dateRender) / 1000);
+console.log("TOTAL", (ns.app.dateTotal - ns.app.dateData) / 1000);
+console.log("layout", layout);
+console.log("response", response);
+console.log("xResponse", xResponse);
+conso

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17299: Data set report. Accepting multiple dimension items for dimensions.

2014-10-28 Thread noreply

revno: 17299
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2014-10-28 06:29:40 -0400
message:
  Data set report. Accepting multiple dimension items for dimensions.
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportService.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportStore.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/impl/DefaultDataSetReportService.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/jdbc/AnalyticsDataSetReportStore.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextUtils.java
  
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateDataSetReportAction.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/datasetreport/DataSetReportService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportService.java	2014-03-18 08:10:10 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportService.java	2014-10-28 10:29:40 +
@@ -29,7 +29,7 @@
  */
 
 import java.util.List;
-import java.util.Map;
+import java.util.Set;
 
 import org.hisp.dhis.common.Grid;
 import org.hisp.dhis.dataset.DataSet;
@@ -55,7 +55,7 @@
  * @param format the i18n format.
  * @return
  */
-String getCustomDataSetReport( DataSet dataSet, Period period, OrganisationUnit unit, Map dimensions, boolean selectedUnitOnly, I18nFormat format );
+String getCustomDataSetReport( DataSet dataSet, Period period, OrganisationUnit unit, Set dimensions, boolean selectedUnitOnly, I18nFormat format );
 
 /**
  * Generates a list of Grids based on the HTML code for a custom data set report.
@@ -68,7 +68,7 @@
  * @param format the i18n format.
  * @return a list of Grids.
  */
-List getCustomDataSetReportAsGrid( DataSet dataSet, Period period, OrganisationUnit unit, Map dimensions,
+List getCustomDataSetReportAsGrid( DataSet dataSet, Period period, OrganisationUnit unit, Set dimensions,
 boolean selectedUnitOnly, I18nFormat format );
 
 /**
@@ -84,7 +84,7 @@
  * @param i18n the i18n object.
  * @return a list of Grids.
  */
-List getDefaultDataSetReport( DataSet dataSet, Period period, OrganisationUnit unit, Map dimensions,  boolean selectedUnitOnly, I18nFormat format, I18n i18n );
+List getDefaultDataSetReport( DataSet dataSet, Period period, OrganisationUnit unit, Set dimensions, boolean selectedUnitOnly, I18nFormat format, I18n i18n );
 
 /**
  * Generates a list of Grids representing a data set report. The data elements
@@ -99,5 +99,5 @@
  * @param i18n the i18n object.
  * @return a Grid.
  */
-List getSectionDataSetReport( DataSet dataSet, Period period, OrganisationUnit unit, Map dimensions, boolean selectedUnitOnly, I18nFormat format, I18n i18n );
+List getSectionDataSetReport( DataSet dataSet, Period period, OrganisationUnit unit, Set dimensions, boolean selectedUnitOnly, I18nFormat format, I18n i18n );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportStore.java	2014-03-18 08:10:10 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportStore.java	2014-10-28 10:29:40 +
@@ -29,6 +29,7 @@
  */
 
 import java.util.Map;
+import java.util.Set;
 
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -41,11 +42,11 @@
 {
 final String SEPARATOR = "-";
 
-Map getAggregatedValues( DataSet dataSet, Period period, OrganisationUnit unit, Map dimensions, boolean rawData );
+Map getAggregatedValues( DataSet dataSet, Period period, OrganisationUnit unit, Set dimensions, boolean rawData );
 
-Map getAggregatedSubTotals( DataSet dataSet, Period period, OrganisationUnit unit, Map dimensions );
-
-Map getAggregatedTotals( DataSet dataSet, Period period, OrganisationUnit unit, Map dimensions );
-
-Map getAggregatedIndicatorValues( DataSet dataSet, Period period, OrganisationUnit unit, Map dimensions );
+Map getAggregatedSubTotals( DataSet dataSet, Period period, OrganisationUnit unit, Set dimensions );
+
+Map getAggregatedTotals( DataSet dataSet, Period period, OrganisationUnit unit, Set dimensions );
+
+Map getAggregatedIndicatorValues( DataSet dataSet, Period period, OrganisationUnit unit, Set dimensions );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-repo

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17300: ER minor fixes

2014-10-28 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 17300 [merge]
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Tue 2014-10-28 12:14:06 +0100
message:
  ER minor fixes
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-27 14:40:23 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-28 11:13:01 +
@@ -7446,25 +7446,12 @@
 url = '',
 callbacks = 0,
 checkOptionSet,
-updateStore,
-createStorage;
-
-createStorage = function() {
-store.getAll('optionSets').done( function(array) {
-for (var i = 0, optionSet; i < array.length; i++) {
-optionSet = array[i];
-
-init.optionSetStorage[optionSet.id] = optionSet;
-}
-
-fn();
-});
-};
+updateStore;
 
 updateStore = function() {
 if (++callbacks === optionSets.length) {
 if (!ids.length) {
-createStorage();
+fn();
 return;
 }
 
@@ -7477,7 +7464,7 @@
 success: function(r) {
 var sets = Ext.decode(r.responseText).optionSets;
 
-store.setAll('optionSets', sets).done(createStorage);
+store.setAll('optionSets', sets).done(fn);
 }
 });
 }

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2014-10-27 15:13:59 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2014-10-28 11:13:01 +
@@ -1754,6 +1754,7 @@
 ouHierarchy = response.metaData.ouHierarchy,
 names = response.metaData.names;
 names[emptyId] = emptyId;
+response.metaData.optionNames = {};
 
 response.nameHeaderMap = {};
 response.idValueMap = {};

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] individual records paginate seem outside

2014-10-28 Thread Abyot Gizaw
Hi,

Would it be possible for you to use tracker capture app instead? Is there
anything particular that you need in Individual record module, but not
available in tracker capture app?

---
Thank you,
Abyot.

On Tue, Oct 28, 2014 at 10:02 AM,  wrote:

>
>
> hi all dev,
> after I record many individual records, the number of paginate seem
> outside box
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17301: ER option bug fixed.

2014-10-28 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 17301 [merge]
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Tue 2014-10-28 13:50:34 +0100
message:
  ER option bug fixed.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-28 11:13:01 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-28 12:49:51 +
@@ -6433,6 +6433,7 @@
 if (optionSetHeaders.length) {
 var callbacks = 0,
 optionMap = {},
+getOptions,
 fn;
 
 fn = function() {
@@ -6443,16 +6444,20 @@
 }
 };
 
+getOptions = function(optionSetId, dataElementId) {
+dhis2.er.store.get('optionSets', optionSetId).done( function(obj) {
+Ext.apply(optionMap, support.prototype.array.getObjectMap(obj.options, 'code', 'name', dataElementId));
+fn();
+});
+};
+
 // execute
-for (var i = 0, header; i < optionSetHeaders.length; i++) {
+for (var i = 0, header, optionSetId, dataElementId; i < optionSetHeaders.length; i++) {
 header = optionSetHeaders[i];
 optionSetId = header.optionSet;
 dataElementId = header.name;
 
-dhis2.er.store.get('optionSets', optionSetId).done( function(obj) {
-Ext.apply(optionMap, support.prototype.array.getObjectMap(obj.options, 'code', 'name', dataElementId));
-fn();
-});
+getOptions(optionSetId, dataElementId);
 }
 }
 else {

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2014-10-28 11:13:01 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2014-10-28 12:49:51 +
@@ -744,7 +744,7 @@
 for (var i = 0, obj; i < array.length; i++) {
 obj = array[i];
 
-o[namePrefix + obj[idProperty]] = obj[nameProperty] + " WORKS";
+o[namePrefix + obj[idProperty]] = obj[nameProperty];
 }
 
 return o;
@@ -971,7 +971,7 @@
 	return name;
 }
 
-name += metaData.names[id] || metaData.optionNames[id];
+name += metaData.optionNames[id] || metaData.names[id];
 
 return name;
 			};
@@ -1754,8 +1754,8 @@
 ouHierarchy = response.metaData.ouHierarchy,
 names = response.metaData.names;
 names[emptyId] = emptyId;
+
 response.metaData.optionNames = {};
-
 response.nameHeaderMap = {};
 response.idValueMap = {};
 

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17302: Data entry, invalid markup

2014-10-28 Thread noreply

revno: 17302
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2014-10-28 10:29:47 -0400
message:
  Data entry, invalid markup
modified:
  
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm


--
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/webapp/dhis-web-dataentry/select.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2014-10-26 17:46:02 +
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2014-10-28 14:29:47 +
@@ -69,7 +69,7 @@
 	
 
 
-  
+
 
 
 
@@ -106,7 +106,7 @@
 
 
 
-|
+|
 
 
 

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17303: ER option filtering improved.

2014-10-28 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 17303 [merge]
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Tue 2014-10-28 15:45:24 +0100
message:
  ER option filtering improved.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-28 12:49:51 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-28 14:44:03 +
@@ -483,7 +483,7 @@
 });
 
 this.searchStore = Ext.create('Ext.data.Store', {
-	fields: [idProperty, 'name'],
+	fields: [idProperty, nameProperty],
 	data: [],
 	loadOptionSet: function(optionSetId, key, pageSize) {
 		var store = this;
@@ -493,8 +493,31 @@
 
 dhis2.er.store.get('optionSets', optionSetId).done( function(obj) {
 if (Ext.isObject(obj) && Ext.isArray(obj.options) && obj.options.length) {
+var data = [];
+
+if (key) {
+var re = new RegExp(key, 'gi');
+
+for (var i = 0, name, match; i < obj.options.length; i++) {
+name = obj.options[i].name;
+match = name.match(re);
+
+if (Ext.isArray(match) && match.length) {
+data.push(obj.options[i]);
+
+if (data.length === pageSize) {
+break;
+}
+}
+}
+}
+else {
+data = obj.options;
+}
+
 store.removeAll();
-store.loadData(obj.options.slice(0, pageSize));
+store.loadData(data.slice(0, pageSize));
+
 }
 });
 	},
@@ -526,11 +549,10 @@
 valueField: idProperty,
 displayField: nameProperty,
 hideTrigger: true,
-delimiter: '; ',
 enableKeyEvents: true,
 queryMode: 'local',
 listConfig: {
-minWidth: 304
+minWidth: 346
 },
 store: this.searchStore,
 listeners: {
@@ -603,6 +625,7 @@
 store: container.valueStore,
 queryMode: 'local',
 listConfig: {
+minWidth: 266,
 cls: 'optionselector'
 },
 setOptionValues: function(optionArray) {

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17304: ER option code/name for individual cases.

2014-10-28 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 17304 [merge]
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Tue 2014-10-28 16:23:41 +0100
message:
  ER option code/name for individual cases.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-28 14:44:03 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-28 15:22:45 +
@@ -6354,7 +6354,51 @@
 			};
 
 			web.report.createReport = function(layout, response, isUpdateGui) {
-var map = {};
+var map = {},
+getOptionSets;
+
+getOptionSets = function(xResponse, callbackFn) {
+var optionSetHeaders = [];
+
+for (var i = 0; i < xResponse.headers.length; i++) {
+if (Ext.isString(xResponse.headers[i].optionSet)) {
+optionSetHeaders.push(xResponse.headers[i]);
+}
+}
+
+if (optionSetHeaders.length) {
+var callbacks = 0,
+optionMap = {},
+getOptions,
+fn;
+
+fn = function() {
+if (++callbacks === optionSetHeaders.length) {
+xResponse.metaData.optionNames = optionMap;
+callbackFn();
+}
+};
+
+getOptions = function(optionSetId, dataElementId) {
+dhis2.er.store.get('optionSets', optionSetId).done( function(obj) {
+Ext.apply(optionMap, support.prototype.array.getObjectMap(obj.options, 'code', 'name', dataElementId));
+fn();
+});
+};
+
+// execute
+for (var i = 0, header, optionSetId, dataElementId; i < optionSetHeaders.length; i++) {
+header = optionSetHeaders[i];
+optionSetId = header.optionSet;
+dataElementId = header.name;
+
+getOptions(optionSetId, dataElementId);
+}
+}
+else {
+callbackFn();
+}
+};
 
 map['aggregated_values'] = function() {
 	var xLayout,
@@ -6444,48 +6488,7 @@
 xLayout = service.layout.getExtendedLayout(layout);
 xResponse = service.response.aggregate.getExtendedResponse(xLayout, response);
 
-//get option sets
-var optionSetHeaders = [];
-
-for (var i = 0; i < xResponse.headers.length; i++) {
-if (Ext.isString(xResponse.headers[i].optionSet)) {
-optionSetHeaders.push(xResponse.headers[i]);
-}
-}
-
-if (optionSetHeaders.length) {
-var callbacks = 0,
-optionMap = {},
-getOptions,
-fn;
-
-fn = function() {
-if (++callbacks === optionSetHeaders.length) {
-//Ext.apply(xResponse.metaData.names, optionMap);
-xResponse.metaData.optionNames = optionMap;
-getSXLayout();
-}
-};
-
-getOptions = function(optionSetId, dataElementId) {
-dhis2.er.store.get('optionSets', optionSetId).done( function(obj) {
-Ext.apply(optionMap, support.prototype.array.getObjectMap(obj.options, 'code', 'name', dataElementId));
-fn();
-});
-};
-
-// execute
-for (var i = 0, header, optionSetId, dataElementId; i < opt

[Dhis2-devs] creating and deleting user groups

2014-10-28 Thread Juan Manuel Alcantara Acosta
Hi Devs
I have couple of problems in user groups.
1. Deleting: After creating a user group, sharing an dashboard with it and then 
deleting the dashboard the system won't let me delete the group.
2. Creating a group: After deleting a group, if you try to create a new group 
and include any of the users that were part of the deleted group an exception 
occurs.

I tested this in https://apps.dhis2.org/demo

Any ideas on how to solve this?

Best regards,
JM
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17305: Data entry, better checks for option set versions

2014-10-28 Thread noreply

revno: 17305
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2014-10-28 12:22:52 -0400
message:
  Data entry, better checks for option set versions
modified:
  
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.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-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2014-10-26 18:21:11 +
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2014-10-28 16:22:52 +
@@ -2760,7 +2760,7 @@
 {
 if ( window.DAO !== undefined && window.DAO.store !== undefined ) {
 DAO.store.get( 'optionSets', uid ).done( function ( obj ) {
-if ( obj ) {
+if ( obj && obj.optionSet ) {
 var options = [];
 
 if ( query == null || query == '' ) {
@@ -2838,14 +2838,14 @@
 _.each( options, function ( item, idx ) {
 if ( uids.indexOf( item.uid ) == -1 ) {
 DAO.store.get( 'optionSets', item.uid ).done( function( obj ) {
-if( !obj || obj.optionSet.version !== item.v ) {
+if( !obj || !obj.optionSet || !obj.optionSet.version || !item.v || obj.optionSet.version !== item.v ) {
 promise = promise.then( function () {
 return $.ajax( {
 url: '../api/optionSets/' + item.uid + '.json?links=false',
 type: 'GET',
 cache: false
 } ).done( function ( data ) {
-  console.log( 'Successfully stored optionSet: ' + item.uid );
+console.log( 'Successfully stored optionSet: ' + item.uid );
 
 var obj = {};
 obj.id = item.uid;

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17306: Data dictionary, data element details, added field for approve data

2014-10-28 Thread noreply

revno: 17306
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2014-10-28 18:36:19 -0400
message:
  Data dictionary, data element details, added field for approve data
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.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-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2014-09-24 07:43:19 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2014-10-28 22:36:19 +
@@ -338,6 +338,24 @@
 
 return dataSet != null ? dataSet.getPeriodType() : null;
 }
+
+/**
+ * Indicates whether this data element requires approval of data. Returns true
+ * if only one of the data sets associated with this data element requires
+ * approval.
+ */
+public boolean isApproveData()
+{
+for ( DataSet dataSet : dataSets )
+{
+if ( dataSet != null && dataSet.isApproveData() )
+{
+return true;
+}
+}
+
+return false;
+}
 
 /**
  * Returns the frequency order for the PeriodType of this DataElement. If no

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm	2014-07-13 07:53:57 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm	2014-10-28 22:36:19 +
@@ -14,6 +14,7 @@
 	"categoryCombo": "$!encoder.xmlEncode( ${dataElement.categoryCombo.name} )",
 	"url": "$!encoder.xmlEncode( ${dataElement.url} )",
 	"lastUpdated": "$!format.formatDate( ${dataElement.lastUpdated} )",
+	"approveData": "$!{dataElement.approveData}",
 	
 	#set( $size = ${dataElement.dataSets.size()} )
 	"dataSets": [

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties	2014-10-15 04:17:05 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties	2014-10-28 22:36:19 +
@@ -235,4 +235,5 @@
 category_option_combo = Category Option Combo
 intro_category_option_combo = View and edit data element category option combos. Category Option Combo are fine-grained break-downs of catagory.
 edit_data_element_category_option_combo = Edit data element category option combo
-average_sum_in_org_unit_hierarchy=Average (sum in org unit hierarchy)
\ No newline at end of file
+average_sum_in_org_unit_hierarchy=Average (sum in org unit hierarchy)
+approve_data=Approve data
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm	2014-07-16 15:41:33 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm	2014-10-28 22:36:19 +
@@ -104,6 +104,7 @@
 $i18n.getString( "category_combination" ):
 $i18n.getString( "url" ):
 $i18n.getString( "last_updated" ):
+$i18n.getString( "approve_data" ):
 $i18n.getString( "data_sets" ):
 $i18n.getString( "id" ):
 			

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js	2014-10-15 04:17:05 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-da

[Dhis2-devs] Reporting rates - open/closed

2014-10-28 Thread buttsworthm
Dear Developers,
We have been implementing the DHIS2 in Vanuatu with the MoH and we are 
certainly pleased with the progress thus far - so thank you.
I have been searching the threads for a solution to a problem we face and came 
across the following:

https://lists.launchpad.net/dhis2-devs/msg30951.html

I am wondering the progress on addressing this issue - i.e. reflecting the 
open/closed facilities in the reporting rate summaries (and/or the pivot 
tables). At the moment, the system appears to calculate the rates for all open 
and closed facilities.

As you know, the system is only as good as the data in it - if we don't have 
high coverage of facilities then we can't rely on the data to be representative.
Calculating reporting rates was an important function that we used in our 
previous database because we would share these rates with managers every month 
to help drive the facilities to complete and return the forms.

I would be grateful if someone could tell me the status of this upgrade, when 
it might be completed, or if there is an alternative for calculating accurate 
reporting rates that I am unaware of.

Thanks & kind regards,
Michael


Michael Buttsworth
Health Information Systems Technical Officer
Office of the WHO Country Liaison Officer in Vanuatu
World Health Organization | Regional Office for the Western Pacific | Manila, 
Philippines
Mail address: PO Box 177, Port Vila, Vanuatu | Tel: +678 27683 ext. 83207
Mob: +678 5388052 | E-mail: 
buttswor...@wpro.who.int | Web: 
http://www.wpro.who.int
[cid:image001.jpg@01CFF35B.2FB8AFC0]






This message was scanned for viruses with Trend Micro ScanMail, GFI 
MailSecurity and  GFI MailEssentials by the World Health Organization Regional 
Office for the Western Pacific.  However, the recipient is advised to scan this 
e-mail and any attached files for viruses.

Disclaimer:

This e-mail, together with any attachments, is intended for the named 
recipients only and is confidential. It may also be privileged or otherwise 
protected by law.

If you have received it in error, please notify the sender immediately by reply 
e-mail and delete it and any attachments from your system. You may not copy or 
disclose its contents to anyone.

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17307: DV comp fix for IE9/10.

2014-10-28 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 17307 [merge]
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Wed 2014-10-29 00:54:15 +0100
message:
  DV comp fix for IE9/10.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.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-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js	2014-10-21 16:30:56 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js	2014-10-28 23:49:56 +
@@ -2356,17 +2356,19 @@
 return function() {
 if (this.items) {
 var title = this.items[0],
+titleWidth = Ext.isIE ? title.el.dom.scrollWidth : title.el.getWidth(),
+titleXFallback = 10,
 legend = this.legend,
 legendCenterX,
 titleX;
-
+
 if (this.legend.position === 'top') {
 legendCenterX = legend.x + (legend.width / 2);
-titleX = legendCenterX - (title.el.getWidth() / 2);
+titleX = titleWidth ? legendCenterX - (titleWidth / 2) : titleXFallback;
 }
 else {
 var legendWidth = legend ? legend.width : 0;
-titleX = (this.width / 2) - (title.el.getWidth() / 2);
+titleX = titleWidth ? (this.width / 2) - (titleWidth / 2) : titleXFallback;
 }
 
 title.setAttributes({

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17308: DV include IE11 in isIE test.

2014-10-28 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 17308 [merge]
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Wed 2014-10-29 01:38:24 +0100
message:
  DV include IE11 in isIE test.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.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-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js	2014-10-28 23:49:56 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js	2014-10-29 00:37:18 +
@@ -10,6 +10,10 @@
 }
 });
 
+Ext.isIE = function() {
+return /trident/.test(Ext.userAgent);
+}();
+
 	// namespace
 	DV = {};
 	NS = DV;

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Mydatamart import metadata problem.

2014-10-28 Thread rin.channara
Hi all Dev,

mydatamart is important to download raw data from DHIS2 for conduce pivot table 
and can manipulate data for offline.

Every I download metadata. it always has error like:

Popup message: Problem importing metadata near "case": syntax error

or

try many time:

Popup message: Problem importing metadata cannot start a transaction within a 
transaction


and the status displaying text take long time: importing metadata


and console(F2):

--

[Wed Oct 29 10:49:39 +0800 2014] [dhisweb] [debug] 'in loginCallback'
[Wed Oct 29 10:49:39 +0800 2014] [dhisweb] [debug] 'login success'
[Wed Oct 29 10:49:39 +0800 2014] [main] [debug] 'login status: LSUCCESS'
[Wed Oct 29 10:49:39 +0800 2014] [main] [debug] 'dhis(status) = Logged in'
[Wed Oct 29 10:49:41 +0800 2014] [main] [debug] 'dhis(status) = No orgunit data 
- you need to download metadata'
[Wed Oct 29 10:49:44 +0800 2014] [main] [debug] 'dhis(status) = Logging in to 
http://localhost:8090/flagship'
[Wed Oct 29 10:49:44 +0800 2014] [dhisweb] [debug] '{Using sock656 for 
localhost:8090} {}'
[Wed Oct 29 10:49:44 +0800 2014] [main] [debug] 'Persisting url'
[Wed Oct 29 10:49:44 +0800 2014] [main] [debug] 'Persisting username'
[Wed Oct 29 10:49:44 +0800 2014] [dhisweb] [debug] '{Closing socket sock656 (no 
connection info)}'
[Wed Oct 29 10:49:44 +0800 2014] [dhisweb] [debug] 'in loginCallback'
[Wed Oct 29 10:49:44 +0800 2014] [dhisweb] [debug] 'login success'
[Wed Oct 29 10:49:44 +0800 2014] [main] [debug] 'login status: LSUCCESS'
[Wed Oct 29 10:49:44 +0800 2014] [main] [debug] 'dhis(status) = Logged in'
[Wed Oct 29 10:49:45 +0800 2014] [main] [debug] 'dhis(status) = No orgunit data 
- you need to download metadata'
[Wed Oct 29 10:49:47 +0800 2014] [main] [debug] 'dhis(status) = Logging in to 
http://localhost:8090/flagship'
[Wed Oct 29 10:49:47 +0800 2014] [dhisweb] [debug] '{Using sock960 for 
localhost:8090} {}'
[Wed Oct 29 10:49:47 +0800 2014] [main] [debug] 'Persisting url'
[Wed Oct 29 10:49:47 +0800 2014] [main] [debug] 'Persisting username'
[Wed Oct 29 10:49:47 +0800 2014] [dhisweb] [debug] '{Closing socket sock960 (no 
connection info)}'
[Wed Oct 29 10:49:47 +0800 2014] [dhisweb] [debug] 'in loginCallback'
[Wed Oct 29 10:49:47 +0800 2014] [dhisweb] [debug] 'login success'
[Wed Oct 29 10:49:47 +0800 2014] [main] [debug] 'login status: LSUCCESS'
[Wed Oct 29 10:49:47 +0800 2014] [main] [debug] 'dhis(status) = Logged in'
[Wed Oct 29 10:53:39 +0800 2014] [dhisweb] [debug] 'fetching metadata'
[Wed Oct 29 10:53:39 +0800 2014] [dhisweb] [debug] '{Using sock988 for 
localhost:8090} {}'
finally
[Wed Oct 29 10:53:39 +0800 2014] [main] [debug] 'dhis(status) = Downloading 
metadata'
[Wed Oct 29 10:53:41 +0800 2014] [dhisweb] [debug] '{final chunk part}'
[Wed Oct 29 10:53:41 +0800 2014] [main] [debug] 'Metadata download success'
[Wed Oct 29 10:53:41 +0800 2014] [main] [debug] 'extracting zip'
[Wed Oct 29 10:53:41 +0800 2014] [main] [debug] 'transforming metadata'
[Wed Oct 29 10:53:41 +0800 2014] [main] [debug] 'dhis(status) = Transforming 
metadata'
[Wed Oct 29 10:53:41 +0800 2014] [dhisweb] [debug] '{Closing socket sock988 (no 
connection info)}'
[Wed Oct 29 10:53:41 +0800 2014] [dhisweb] [debug] 'Metadata download done: 
HTTP/1.1 200 OK'
[Wed Oct 29 10:53:42 +0800 2014] [main] [debug] 'transform: Done'
[Wed Oct 29 10:53:42 +0800 2014] [main] [debug] 'Transform metadata done'
[Wed Oct 29 10:53:42 +0800 2014] [main] [debug] 'dhis(status) = Importing 
metadata'
[Wed Oct 29 11:00:09 +0800 2014] [dhisweb] [debug] 'fetching metadata'
[Wed Oct 29 11:00:09 +0800 2014] [dhisweb] [debug] '{Using sock1208 for 
localhost:8090} {}'
finally
[Wed Oct 29 11:00:09 +0800 2014] [main] [debug] 'dhis(status) = Downloading 
metadata'
[Wed Oct 29 11:00:11 +0800 2014] [dhisweb] [debug] '{final chunk part}'
[Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'Metadata download success'
[Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'extracting zip'
[Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'transforming metadata'
[Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'dhis(status) = Transforming 
metadata'
[Wed Oct 29 11:00:11 +0800 2014] [dhisweb] [debug] '{Closing socket sock1208 
(no connection info)}'
[Wed Oct 29 11:00:11 +0800 2014] [dhisweb] [debug] 'Metadata download done: 
HTTP/1.1 200 OK'
[Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'transform: Done'
[Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'Transform metadata done'
[Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'dhis(status) = Importing 
metadata'
[Wed Oct 29 11:00:46 +0800 2014] [dhisweb] [debug] 'fetching metadata'
[Wed Oct 29 11:00:46 +0800 2014] [dhisweb] [debug] '{Using sock680 for 
localhost:8090} {}'
finally
[Wed Oct 29 11:00:46 +0800 2014] [main] [debug] 'dhis(status) = Downloading 
metadata'
[Wed Oct 29 11:00:47 +0800 2014] [dhisweb] [debug] '{final chunk part}'
[Wed Oct 29 11:00:47 +0800 2014] [main] [debug] 'Metadata download suc

Re: [Dhis2-devs] Mydatamart import metadata problem.

2014-10-28 Thread Knut Staring
You can do similar things from the pivot table module now.
On Oct 29, 2014 3:04 AM,  wrote:

>  Hi all Dev,
> mydatamart is important to download raw data from DHIS2 for conduce pivot
> table and can manipulate data for offline.
> Every I download metadata. it always has error like:
> Popup message: Problem importing metadata near "case": syntax error
> or
> try many time:
> Popup message: Problem importing metadata cannot start a transaction
> within a transaction
>
> and the status displaying text take long time: importing metadata
>
> and console(F2):
>
> --
> [Wed Oct 29 10:49:39 +0800 2014] [dhisweb] [debug] 'in loginCallback'
> [Wed Oct 29 10:49:39 +0800 2014] [dhisweb] [debug] 'login success'
> [Wed Oct 29 10:49:39 +0800 2014] [main] [debug] 'login status: LSUCCESS'
> [Wed Oct 29 10:49:39 +0800 2014] [main] [debug] 'dhis(status) = Logged in'
> [Wed Oct 29 10:49:41 +0800 2014] [main] [debug] 'dhis(status) = No orgunit
> data - you need to download metadata'
> [Wed Oct 29 10:49:44 +0800 2014] [main] [debug] 'dhis(status) = Logging in
> to http://localhost:8090/flagship'
> [Wed Oct 29 10:49:44 +0800 2014] [dhisweb] [debug] '{Using sock656 for
> localhost:8090} {}'
> [Wed Oct 29 10:49:44 +0800 2014] [main] [debug] 'Persisting url'
> [Wed Oct 29 10:49:44 +0800 2014] [main] [debug] 'Persisting username'
> [Wed Oct 29 10:49:44 +0800 2014] [dhisweb] [debug] '{Closing socket
> sock656 (no connection info)}'
> [Wed Oct 29 10:49:44 +0800 2014] [dhisweb] [debug] 'in loginCallback'
> [Wed Oct 29 10:49:44 +0800 2014] [dhisweb] [debug] 'login success'
> [Wed Oct 29 10:49:44 +0800 2014] [main] [debug] 'login status: LSUCCESS'
> [Wed Oct 29 10:49:44 +0800 2014] [main] [debug] 'dhis(status) = Logged in'
> [Wed Oct 29 10:49:45 +0800 2014] [main] [debug] 'dhis(status) = No orgunit
> data - you need to download metadata'
> [Wed Oct 29 10:49:47 +0800 2014] [main] [debug] 'dhis(status) = Logging in
> to http://localhost:8090/flagship'
> [Wed Oct 29 10:49:47 +0800 2014] [dhisweb] [debug] '{Using sock960 for
> localhost:8090} {}'
> [Wed Oct 29 10:49:47 +0800 2014] [main] [debug] 'Persisting url'
> [Wed Oct 29 10:49:47 +0800 2014] [main] [debug] 'Persisting username'
> [Wed Oct 29 10:49:47 +0800 2014] [dhisweb] [debug] '{Closing socket
> sock960 (no connection info)}'
> [Wed Oct 29 10:49:47 +0800 2014] [dhisweb] [debug] 'in loginCallback'
> [Wed Oct 29 10:49:47 +0800 2014] [dhisweb] [debug] 'login success'
> [Wed Oct 29 10:49:47 +0800 2014] [main] [debug] 'login status: LSUCCESS'
> [Wed Oct 29 10:49:47 +0800 2014] [main] [debug] 'dhis(status) = Logged in'
> [Wed Oct 29 10:53:39 +0800 2014] [dhisweb] [debug] 'fetching metadata'
> [Wed Oct 29 10:53:39 +0800 2014] [dhisweb] [debug] '{Using sock988 for
> localhost:8090} {}'
> finally
> [Wed Oct 29 10:53:39 +0800 2014] [main] [debug] 'dhis(status) =
> Downloading metadata'
> [Wed Oct 29 10:53:41 +0800 2014] [dhisweb] [debug] '{final chunk part}'
> [Wed Oct 29 10:53:41 +0800 2014] [main] [debug] 'Metadata download success'
> [Wed Oct 29 10:53:41 +0800 2014] [main] [debug] 'extracting zip'
> [Wed Oct 29 10:53:41 +0800 2014] [main] [debug] 'transforming metadata'
> [Wed Oct 29 10:53:41 +0800 2014] [main] [debug] 'dhis(status) =
> Transforming metadata'
> [Wed Oct 29 10:53:41 +0800 2014] [dhisweb] [debug] '{Closing socket
> sock988 (no connection info)}'
> [Wed Oct 29 10:53:41 +0800 2014] [dhisweb] [debug] 'Metadata download
> done: HTTP/1.1 200 OK'
> [Wed Oct 29 10:53:42 +0800 2014] [main] [debug] 'transform: Done'
> [Wed Oct 29 10:53:42 +0800 2014] [main] [debug] 'Transform metadata done'
> [Wed Oct 29 10:53:42 +0800 2014] [main] [debug] 'dhis(status) = Importing
> metadata'
> [Wed Oct 29 11:00:09 +0800 2014] [dhisweb] [debug] 'fetching metadata'
> [Wed Oct 29 11:00:09 +0800 2014] [dhisweb] [debug] '{Using sock1208 for
> localhost:8090} {}'
> finally
> [Wed Oct 29 11:00:09 +0800 2014] [main] [debug] 'dhis(status) =
> Downloading metadata'
> [Wed Oct 29 11:00:11 +0800 2014] [dhisweb] [debug] '{final chunk part}'
> [Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'Metadata download success'
> [Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'extracting zip'
> [Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'transforming metadata'
> [Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'dhis(status) =
> Transforming metadata'
> [Wed Oct 29 11:00:11 +0800 2014] [dhisweb] [debug] '{Closing socket
> sock1208 (no connection info)}'
> [Wed Oct 29 11:00:11 +0800 2014] [dhisweb] [debug] 'Metadata download
> done: HTTP/1.1 200 OK'
> [Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'transform: Done'
> [Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'Transform metadata done'
> [Wed Oct 29 11:00:11 +0800 2014] [main] [debug] 'dhis(status) = Importing
> metadata'
> [Wed Oct 29 11:00:46 +0800 2014] [dhisweb] [debug] 'fetching metadata'
> [Wed Oct 29 11:00:46 +0800 2014] [dhisweb] [debug] '{Using sock680 for
> localhost:8090} {}

Re: [Dhis2-devs] Reporting rates - open/closed

2014-10-28 Thread Jason Pickering
Hi Michael,

I have seen this request in a couple of different places. Right now, it is
not fixed, but it is possible to develop custom reports/analysis to take
this into account. Part of the challenge is that facilities tend to open
and close in some places, and in DHIS2, you only get one opening and
closing date, so there is no way to record when then facility actually was
open/closed over time. Of course, you could consider implementing more
exotic ways of recording this with a separate dataset.

I suspect this will be fixed at some point in time in the core of DHIS2,
but you may need to consider developing a custom solution to support this
for now.

Regards,
Jason


On Wed, Oct 29, 2014 at 1:00 AM,  wrote:

>  Dear Developers,
>
> We have been implementing the DHIS2 in Vanuatu with the MoH and we are
> certainly pleased with the progress thus far - so thank you.
>
> I have been searching the threads for a solution to a problem we face and
> came across the following:
>
>
>
> https://lists.launchpad.net/dhis2-devs/msg30951.html
>
>
>
> I am wondering the progress on addressing this issue – i.e. reflecting the
> open/closed facilities in the reporting rate summaries (and/or the pivot
> tables). At the moment, the system appears to calculate the rates for all
> open and closed facilities.
>
>
>
> As you know, the system is only as good as the data in it – if we don’t
> have high coverage of facilities then we can’t rely on the data to be
> representative.
>
> Calculating reporting rates was an important function that we used in our
> previous database because we would share these rates with managers every
> month to help drive the facilities to complete and return the forms.
>
>
>
> I would be grateful if someone could tell me the status of this upgrade,
> when it might be completed, or if there is an alternative for calculating
> accurate reporting rates that I am unaware of.
>
>
>
> Thanks & kind regards,
>
> Michael
>
>
>
>
>
> *Michael Buttsworth*
> Health Information Systems Technical Officer
> Office of the WHO Country Liaison Officer in Vanuatu
>
> World Health Organization | Regional Office for the Western Pacific |
> Manila, Philippines
>
> Mail address: PO Box 177, Port Vila, Vanuatu | Tel: +678 27683 ext. 83207
> Mob: +678 5388052 | E-mail: buttswor...@wpro.who.int | Web:
> http://www.wpro.who.int
>
>
>
>
>
>
>
>  --
>
> This message was scanned for viruses with Trend Micro ScanMail, GFI
> MailSecurity and GFI MailEssentials by the World Health Organization
> Regional Office for the Western Pacific. However, the recipient is advised
> to scan this e-mail and any attached files for viruses.
>
> Disclaimer:
>
> This e-mail, together with any attachments, is intended for the named
> recipients only and is confidential. It may also be privileged or otherwise
> protected by law.
>
> If you have received it in error, please notify the sender immediately by
> reply e-mail and delete it and any attachments from your system. You may
> not copy or disclose its contents to anyone.
>  <#14958fd20c951905_>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+46764147049
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Getting org unit children through /api/metadata

2014-10-28 Thread Morten Olav Hansen
Hi

The metadata endpoint is mainly for doing complete dumps. If you want
advanced filtering etc, you will need to use /api/organisationUnits

--
Morten

On Wed, Oct 29, 2014 at 1:02 PM, Mahendra Kariya <
mahendra.kar...@thoughtworks.com> wrote:

> Hi Morten,
>
> We are trying to get the entire metadata, along with the org unit
> children. We tried GETting
> http://localhost:8080/api/metadata?fields=organisationUnits=[:all,children],:all,
> but org unit object doesn't include children. Could you please help us
> correct the filters in this API so that we can get org units with children.
>
>
>
> Thanks,
> Mahendra
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17310: add code field to geoFeature

2014-10-28 Thread noreply

revno: 17310
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2014-10-29 13:11:10 +0700
message:
  add code field to geoFeature
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/GeoFeature.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-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java	2014-10-14 11:20:24 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java	2014-10-29 06:11:10 +
@@ -122,6 +122,7 @@
 {
 GeoFeature feature = new GeoFeature();
 feature.setId( unit.getUid() );
+feature.setCode( unit.getCode() );
 feature.setHcd( unit.hasChildrenWithCoordinates() );
 feature.setHcu( unit.hasCoordinatesUp() );
 feature.setLe( unit.getLevel() );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/GeoFeature.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/GeoFeature.java	2014-08-15 07:40:20 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/GeoFeature.java	2014-10-29 06:11:10 +
@@ -45,7 +45,12 @@
  * Identifier.
  */
 private String id;
-
+
+/**
+ * Code identifier.
+ */
+private String code;
+
 /**
  * Name.
  */
@@ -116,6 +121,17 @@
 }
 
 @JsonProperty
+public String getCode()
+{
+return code;
+}
+
+public void setCode( String code )
+{
+this.code = code;
+}
+
+@JsonProperty
 public String getNa()
 {
 return na;

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp