[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20176: Digit group separator upgrade in TableAlteror.

2015-09-15 Thread noreply

revno: 20176
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Wed 2015-09-16 01:00:44 +0200
message:
  Digit group separator upgrade in TableAlteror.
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.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-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-15 11:43:48 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-15 23:00:44 +
@@ -940,6 +940,14 @@
 executeSql( "update eventreport set fontsize='LARGE' where fontsize='large'" );
 executeSql( "update eventreport set fontsize='NORMAL' where fontsize='normal'" );
 executeSql( "update eventreport set fontsize='SMALL' where fontsize='small'" );
+
+executeSql( "update reporttable set digitgroupseparator='NONE' where displaydensity='none'" );
+executeSql( "update reporttable set digitgroupseparator='SPACE' where displaydensity='space'" );
+executeSql( "update reporttable set digitgroupseparator='COMMA' where displaydensity='comma'" );
+
+executeSql( "update eventreport set digitgroupseparator='NONE' where displaydensity='none'" );
+executeSql( "update eventreport set digitgroupseparator='SPACE' where displaydensity='space'" );
+executeSql( "update eventreport set digitgroupseparator='COMMA' where displaydensity='comma'" );
 
 executeSql( "update eventreport set datatype='AGGREGATED_VALUES' where datatype='aggregated_values'" );
 executeSql( "update eventreport set datatype='EVENTS' where datatype='individual_cases'" );

___
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 20177: PT plugin updated.

2015-09-15 Thread noreply

revno: 20177
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Wed 2015-09-16 01:16:55 +0200
message:
  PT plugin updated.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/table.js
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/table.js
  
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.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-pivot/scripts/table.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/table.js	2015-09-15 22:59:55 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/table.js	2015-09-15 23:16:55 +
@@ -3469,57 +3469,72 @@
 			web.pivot.getData = function(layout, isUpdateGui) {
 var xLayout,
 	paramString,
-success,
-failure,
-config = {};
+sortedParamString,
+onFailure;
 
 if (!layout) {
 	return;
 }
 
+onFailure = function(r) {
+if (!appConfig.skipMask) {
+web.mask.hide(ns.app.centerRegion);
+}
+};
+
 xLayout = service.layout.getExtendedLayout(layout);
-paramString = web.analytics.getParamString(xLayout, true);
+paramString = web.analytics.getParamString(xLayout) + '=true';
+sortedParamString = web.analytics.getParamString(xLayout, true) + '=true';
 
 // mask
 if (!appConfig.skipMask) {
 web.mask.show(ns.app.centerRegion);
 }
 
-success = function(r) {
-var response = api.response.Response((r.responseText ? Ext.decode(r.responseText) : r));
-
-if (!response) {
-web.mask.hide(ns.app.centerRegion);
-return;
-}
-
-// sync xLayout with response
-//xLayout = service.layout.getSyncronizedXLayout(xLayout, response);
-
-//if (!xLayout) {
-//web.mask.hide(ns.app.centerRegion);
-//return;
-//}
-
-ns.app.paramString = paramString;
-
-web.pivot.createTable(layout, response, null, isUpdateGui);
-};
-
-failure = function(r) {
-if (!appConfig.skipMask) {
-web.mask.hide(ns.app.centerRegion);
-}
-};
-
-config.url = init.contextPath + '/api/analytics.' + type + paramString;
-config.disableCaching = false;
-config.timeout = 6;
-config.headers = headers;
-config.success = success;
-config.failure = failure;
-
-ns.ajax(config, ns);
+ns.ajax({
+	url: init.contextPath + '/api/analytics.json' + paramString,
+	timeout: 6,
+	headers: {
+		'Content-Type': 'application/json',
+		'Accepts': 'application/json'
+	},
+	disableCaching: false,
+	failure: function(r) {
+onFailure(r);
+	},
+	success: function(r) {
+var metaData = Ext.decode(r.responseText).metaData;
+
+Ext.Ajax.request({
+url: init.contextPath + '/api/analytics.json' + sortedParamString,
+timeout: 6,
+headers: {
+'Content-Type': 'application/json',
+'Accepts': 'application/json'
+},
+disableCaching: false,
+failure: function(r) {
+onFailure(r);
+},
+success: function(r) {
+ns.app.dateCreate = new Date();
+
+var response = api.response.Response(Ext.decode(r.responseText));
+
+if (!response) {
+onFailure();
+return;
+}
+
+response.metaData = metaData;
+
+ns.app.paramString = sortedParamString;
+
+web.pivot.createTable(layout, response, null, isUpdateGui);
+

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20178: Digit group separator upgrade in TableAlteror.

2015-09-15 Thread noreply

revno: 20178
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Wed 2015-09-16 01:17:42 +0200
message:
  Digit group separator upgrade in TableAlteror.
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.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-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-15 23:00:44 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-15 23:17:42 +
@@ -941,13 +941,13 @@
 executeSql( "update eventreport set fontsize='NORMAL' where fontsize='normal'" );
 executeSql( "update eventreport set fontsize='SMALL' where fontsize='small'" );
 
-executeSql( "update reporttable set digitgroupseparator='NONE' where displaydensity='none'" );
-executeSql( "update reporttable set digitgroupseparator='SPACE' where displaydensity='space'" );
-executeSql( "update reporttable set digitgroupseparator='COMMA' where displaydensity='comma'" );
+executeSql( "update reporttable set digitgroupseparator='NONE' where digitgroupseparator='none'" );
+executeSql( "update reporttable set digitgroupseparator='SPACE' where digitgroupseparator='space'" );
+executeSql( "update reporttable set digitgroupseparator='COMMA' where digitgroupseparator='comma'" );
 
-executeSql( "update eventreport set digitgroupseparator='NONE' where displaydensity='none'" );
-executeSql( "update eventreport set digitgroupseparator='SPACE' where displaydensity='space'" );
-executeSql( "update eventreport set digitgroupseparator='COMMA' where displaydensity='comma'" );
+executeSql( "update eventreport set digitgroupseparator='NONE' where digitgroupseparator='none'" );
+executeSql( "update eventreport set digitgroupseparator='SPACE' where digitgroupseparator='space'" );
+executeSql( "update eventreport set digitgroupseparator='COMMA' where digitgroupseparator='comma'" );
 
 executeSql( "update eventreport set datatype='AGGREGATED_VALUES' where datatype='aggregated_values'" );
 executeSql( "update eventreport set datatype='EVENTS' where datatype='individual_cases'" );

___
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 20179: DV plugin updated.

2015-09-15 Thread noreply

revno: 20179
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Wed 2015-09-16 01:25:51 +0200
message:
  DV plugin updated.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/plugin.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js
  
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.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/plugin.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/plugin.html	2015-09-11 22:00:37 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/plugin.html	2015-09-15 23:25:51 +
@@ -24,8 +24,7 @@
 el: 'chart1',
 uid: 'vIlITOVLOjI',
 crossDomain: false,
-dashboard: true,
-userOrgUnit: 'qhqAxPSTUXp'
+dashboard: true
 			});
 
 			//DHIS.getChart({

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js	2015-09-11 22:00:37 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js	2015-09-15 23:25:51 +
@@ -4299,62 +4299,116 @@
 			web.chart.getData = function(layout, isUpdateGui) {
 var xLayout,
 	paramString,
-success,
-failure,
-config = {};
+sortedParamString,
+onFailure;
 
 if (!layout) {
 	return;
 }
 
+onFailure = function(r) {
+if (!ns.skipMask) {
+web.mask.hide(ns.app.centerRegion);
+}
+};
+
 xLayout = service.layout.getExtendedLayout(layout);
-paramString = web.analytics.getParamString(xLayout, true);
+paramString = web.analytics.getParamString(xLayout) + '=true';
+sortedParamString = web.analytics.getParamString(xLayout, true) + '=true';
 
 // mask
 if (!ns.skipMask) {
 web.mask.show(ns.app.centerRegion);
 }
 
-success = function(r) {
-var response = api.response.Response((r.responseText ? Ext.decode(r.responseText) : r));
-
-if (!response) {
-web.mask.hide(ns.app.centerRegion);
-return;
-}
-
-// sync xLayout with response
-xLayout = service.layout.getSyncronizedXLayout(xLayout, response);
-
-if (!xLayout) {
-web.mask.hide(ns.app.centerRegion);
-return;
-}
-
-ns.app.paramString = paramString;
-
-web.chart.getChart(layout, xLayout, response, isUpdateGui);
-};
-
-failure = function(r) {
-if (!ns.skipMask) {
-web.mask.hide(ns.app.centerRegion);
-}
-};
-
-config.url = init.contextPath + '/api/analytics.' + type + paramString;
-config.disableCaching = false;
-config.timeout = 6;
-config.headers = headers;
-config.success = success;
-config.failure = failure;
-
-if (type === 'jsonp') {
-Ext.data.JsonP.request(config);
-}
-else {
-Ext.Ajax.request(config);
-}
+ns.ajax({
+	url: init.contextPath + '/api/analytics.json' + paramString,
+	timeout: 6,
+	headers: {
+		'Content-Type': 'application/json',
+		'Accepts': 'application/json'
+	},
+	disableCaching: false,
+	failure: function(r) {
+onFailure(r);
+	},
+	success: function(r) {
+var metaData = Ext.decode(r.responseText).metaData;
+
+ns.ajax({
+url: init.contextPath + '/api/analytics.json' + sortedParamString,
+timeout: 6,
+headers: {
+'Content-Type': 'application/json',
+'Accepts': 'application/json'
+},
+

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20175: PT enums.

2015-09-15 Thread noreply

revno: 20175
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Wed 2015-09-16 00:59:55 +0200
message:
  PT enums.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/plugin.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/table.js
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/table.js
  
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.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-pivot/plugin.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/plugin.html	2015-09-11 18:29:34 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/plugin.html	2015-09-15 22:59:55 +
@@ -23,9 +23,8 @@
 username: username,
 password: password,
 el: 'table1',
-uid: 'tWg9OiyV7mu',
-showDimensionLabels: true,
-displayDensity: 'compact'
+uid: 'MwnpKMaxcPh',
+showDimensionLabels: true
 			});
 
 DHIS.getTable({

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2015-09-15 19:42:00 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2015-09-15 22:59:55 +
@@ -583,11 +583,11 @@
 			queryMode: 'local',
 			valueField: 'id',
 			editable: false,
-			value: 'DEFAULT',
+			value: finalsStyleConf.default_,
 			store: Ext.create('Ext.data.Store', {
 fields: ['id', 'text'],
 data: [
-	{id: 'DEFAULT', text: NS.i18n.by_data_element},
+	{id: finalsStyleConf.default_, text: NS.i18n.by_data_element},
 	{id: 'COUNT', text: NS.i18n.count},
 	{id: 'SUM', text: NS.i18n.sum},
 	{id: 'STDDEV', text: NS.i18n.stddev},
@@ -610,11 +610,11 @@
 			displayField: 'name',
 			editable: false,
 			hidden: !(ns.core.init.systemInfo.hideUnapprovedDataInAnalytics && ns.core.init.user.viewUnapprovedData),
-			value: 'DEFAULT',
+			value: finalsStyleConf.default_,
 			store: Ext.create('Ext.data.Store', {
 fields: ['id', 'name'],
 data: function() {
-	var data = [{id: 'DEFAULT', name: NS.i18n.show_all_data}],
+	var data = [{id: finalsStyleConf.default_, name: NS.i18n.show_all_data}],
 		levels = ns.core.init.dataApprovalLevels;
 
 	for (var i = 0; i < levels.length; i++) {

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js	2015-09-15 19:42:00 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js	2015-09-15 22:59:55 +
@@ -160,7 +160,7 @@
 'space': 'SPACE',
 'comma': 'COMMA',
 'none': 'NONE',
-'default': 'DEFAULT'
+'default_': 'DEFAULT'
 }
 			};
 
@@ -524,7 +524,7 @@
 	}
 
 // in and aggregation type
-if (objectNameDimensionMap[dimConf.indicator.objectName] && config.aggregationType !== 'DEFAULT') {
+if (objectNameDimensionMap[dimConf.indicator.objectName] && config.aggregationType !== conf.finals.style.default_) {
 webAlert('Indicators and aggregation types cannot be specified together', true);
 return;
 }
@@ -588,16 +588,16 @@
 	layout.showRowSubTotals = Ext.isBoolean(config.rowSubTotals) ? config.rowSubTotals : (Ext.isBoolean(config.showRowSubTotals) ? config.showRowSubTotals : true);
 	layout.showDimensionLabels = Ext.isBoolean(config.showDimensionLabels) ? config.showDimensionLabels : (Ext.isBoolean(config.showDimensionLabels) ? config.showDimensionLabels : true);
 	layout.hideEmptyRows = Ext.isBoolean(config.hideEmptyRows) ? config.hideEmptyRows : false;
-layout.aggregationType = Ext.isString(config.aggregationType) ? config.aggregationType : 'DEFAULT';
+layout.aggregationType = Ext.isString(config.aggregationType) ? config.aggregationType : conf.finals.style.default_;
 	layout.dataApprovalLevel = Ext.isObject(config.dataApprovalLevel) && Ext.isString(config.dataApprovalLevel.id) ? config.dataApprovalLevel : null;
 
 	layout.showHierarchy = 

[Dhis2-devs] Issue with date varibales for Sql View of type allows for variables

2015-09-15 Thread Bharath
Hi,

I have created a sample sql view which has 2 variable parameters namely
startDate and endDate. My sql view looks like:


*SELECT dv.* from datavalue dv inner join period p on dv.periodid =
p.periodid where p.periodtypeid = 8 and p.startdate >= '${startDate}' and
p.enddate <='${endDate}' limit 500;*

I am trying to pass these 2 date values from api url, but getting below
error message:

URI:
https://apps.dhis2.org/demo/api/sqlViews/Eod3B6ET3dw/data.json?var=startDate:2015-01-01=endDate:2015-03-31

Response:
{

   - httpStatus: "Conflict",
   - httpStatusCode: 409,
   - status: "ERROR",
   - message: "SQL query contains variables which were not supplied in
   request: [endDate, startDate]"

}

If I place these date values inside sqlview then I am able to get the
result.

Can you please help me to find where I am doing mistake. Thanks.




-- 

Regards,
Bharath Kumar. Ch
___
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] Issue with date varibales for Sql View of type allows for variables

2015-09-15 Thread Knut Staring
The dates should be like this: 20150101 and 20151231. Actually, the manual
is confusing on this point, as it starts with dashes:

https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s04.html

On Tue, Sep 15, 2015 at 8:26 AM, Bharath  wrote:

> Hi,
>
> I have created a sample sql view which has 2 variable parameters namely
> startDate and endDate. My sql view looks like:
>
>
> *SELECT dv.* from datavalue dv inner join period p on dv.periodid =
> p.periodid where p.periodtypeid = 8 and p.startdate >= '${startDate}' and
> p.enddate <='${endDate}' limit 500;*
>
> I am trying to pass these 2 date values from api url, but getting below
> error message:
>
> URI:
>
> https://apps.dhis2.org/demo/api/sqlViews/Eod3B6ET3dw/data.json?var=startDate:2015-01-01=endDate:2015-03-31
>
> Response:
> {
>
>- httpStatus: "Conflict",
>- httpStatusCode: 409,
>- status: "ERROR",
>- message: "SQL query contains variables which were not supplied in
>request: [endDate, startDate]"
>
> }
>
> If I place these date values inside sqlview then I am able to get the
> result.
>
> Can you please help me to find where I am doing mistake. Thanks.
>
>
>
>
> --
>
> Regards,
> Bharath Kumar. Ch
>
> ___
> 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
>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org
___
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 20155: minor fix

2015-09-15 Thread noreply

revno: 20155
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-15 14:17:41 +0700
message:
  minor fix
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.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-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-09-15 07:13:04 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-09-15 07:17:41 +
@@ -28,7 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.google.common.collect.Lists;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.analytics.AggregationType;
@@ -71,8 +70,6 @@
 import static org.hisp.dhis.common.DimensionalObject.*;
 import static org.hisp.dhis.common.IdentifiableObjectUtils.getUids;
 import static org.hisp.dhis.common.NameableObjectUtils.asTypedList;
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE;
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
 
 /**
  * @author Lars Helge Overland
@@ -82,8 +79,6 @@
 {
 private static final Log log = LogFactory.getLog( DefaultQueryPlanner.class );
 
-private static final List AVERAGE_AGG_OPERATORS = Lists.newArrayList( AGGREGATION_OPERATOR_AVERAGE_SUM, AGGREGATION_OPERATOR_AVERAGE );
-
 @Autowired
 private OrganisationUnitService organisationUnitService;
 

___
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 20156: SQL view, fixed bug with validation

2015-09-15 Thread noreply

revno: 20156
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 09:52:33 +0200
message:
  SQL view, fixed bug with validation
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/sqlView.js
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateSqlViewForm.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-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/sqlView.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/sqlView.js	2015-07-14 14:50:19 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/sqlView.js	2015-09-15 07:52:33 +
@@ -3,7 +3,7 @@
 function validateAddUpdateSqlView( mode ) {
   var name = $("#name").val();
   var sqlquery = $("#sqlquery").val();
-  var query = $("#query").val();
+  var query = !!( $("#type").val() == "QUERY" );
 
   $.ajax( {
 url: "validateAddUpdateSqlView.action",

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateSqlViewForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateSqlViewForm.vm	2015-07-31 12:46:03 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateSqlViewForm.vm	2015-09-15 07:52:33 +
@@ -16,6 +16,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 20154: use aggregation type directly in DefaultQueryPlanner

2015-09-15 Thread noreply

revno: 20154
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-15 14:13:04 +0700
message:
  use aggregation type directly in DefaultQueryPlanner
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroup.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.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/analytics/AggregationType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java	2015-09-15 05:39:53 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java	2015-09-15 07:13:04 +
@@ -33,11 +33,11 @@
  */
 public enum AggregationType
 {
-SUM( "sum" ), 
+SUM( "sum" ),
 AVERAGE( "avg" ),
 AVERAGE_SUM_ORG_UNIT( "avg_sum_org_unit" ),
-COUNT( "count" ), 
-STDDEV( "stddev" ), 
+COUNT( "count" ),
+STDDEV( "stddev" ),
 VARIANCE( "variance" ),
 MIN( "min" ),
 MAX( "max" ),
@@ -46,7 +46,7 @@
 CUSTOM( "custom" ),
 
 // Internal types
-
+
 AVERAGE_SUM_INT( "avg_sum_int" ), // Sum in organisation unit hierarchy
 AVERAGE_SUM_INT_DISAGGREGATION( "avg_sum_int_disaggregation" ), // Sum in organisation unit hierarchy
 AVERAGE_INT( "avg_int" ),
@@ -64,7 +64,12 @@
 {
 return value;
 }
-
+
+public boolean isAverage()
+{
+return this == AVERAGE_SUM_ORG_UNIT || this == AVERAGE;
+}
+
 public static AggregationType fromValue( String value )
 {
 for ( AggregationType type : AggregationType.values() )

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroup.java	2015-08-31 07:42:50 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroup.java	2015-09-15 07:13:04 +
@@ -34,6 +34,7 @@
 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.analytics.AggregationType;
 import org.hisp.dhis.attribute.AttributeValue;
 import org.hisp.dhis.common.BaseIdentifiableObject;
 import org.hisp.dhis.common.BaseNameableObject;
@@ -137,12 +138,12 @@
 }
 
 /**
- * Returns the aggregation operator of the data elements in this group. Uses
+ * Returns the aggregation type of the data elements in this group. Uses
  * an arbitrary member to determine the aggregation operator.
  */
-public String getAggregationOperator()
+public AggregationType getAggregationType()
 {
-return members != null && !members.isEmpty() ? members.iterator().next().getAggregationOperator() : null;
+return members != null && !members.isEmpty() ? members.iterator().next().getAggregationType() : null;
 }
 
 /**

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-09-15 06:55:31 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-09-15 07:13:04 +
@@ -56,7 +56,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.program.ProgramIndicatorService;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.filter.AggregatableDataElementFilter;
 import org.hisp.dhis.system.util.MathUtils;
@@ -616,7 +615,7 @@
 if ( deg != null && !deg.getMembers().isEmpty() )
 {
 PeriodType periodType = PeriodType.getPeriodTypeByName( params.getPeriodType() );
-query.setAggregationType( getAggregationType( deg.getValueType(), deg.getAggregationOperator(), periodType, deg.getPeriodType() ) );
+query.setAggregationType( getAggregationType( deg.getValueType(), deg.getAggregationType(), periodType, deg.getPeriodType() ) );
 }
 else
 {
@@ -765,7 +764,7 @@
 {
 DataElement de = (DataElement) element;
 
-AggregationType aggregationType = getAggregationType( de.getValueType(), de.getAggregationOperator(), aggregationPeriodType, de.getPeriodType() );
+ 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20153: remove unused parameter to isDisaggregation

2015-09-15 Thread noreply

revno: 20153
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-15 13:55:31 +0700
message:
  remove unused parameter to isDisaggregation
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.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-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-09-15 05:08:23 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-09-15 06:55:31 +
@@ -800,9 +800,9 @@
 private AggregationType getAggregationType( ValueType valueType, String aggregationOperator,
 PeriodType aggregationPeriodType, PeriodType dataPeriodType )
 {
-AggregationType aggregationType = null;
+AggregationType aggregationType;
 
-boolean disaggregation = isDisaggregation( aggregationOperator, aggregationPeriodType, dataPeriodType );
+boolean disaggregation = isDisaggregation( aggregationPeriodType, dataPeriodType );
 boolean number = valueType.isNumeric();
 
 if ( AVERAGE_AGG_OPERATORS.contains( aggregationOperator ) && ValueType.BOOLEAN == valueType )
@@ -836,7 +836,7 @@
 /**
  * Indicates whether disaggregation is allowed for the given input.
  */
-private boolean isDisaggregation( String aggregationOperator, PeriodType aggregationPeriodType, PeriodType dataPeriodType )
+private boolean isDisaggregation( PeriodType aggregationPeriodType, PeriodType dataPeriodType )
 {
 return dataPeriodType != null && aggregationPeriodType != null && aggregationPeriodType.getFrequencyOrder() < dataPeriodType.getFrequencyOrder();
 }

___
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 20157: tracker-capture: pick right enrollment for the selected TEI

2015-09-15 Thread noreply

revno: 20157
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Tue 2015-09-15 10:10:51 +0200
message:
  tracker-capture: pick right enrollment for the selected TEI
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.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-tracker-capture/components/dashboard/dashboard-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js	2015-09-11 15:16:03 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js	2015-09-15 08:10:51 +
@@ -161,14 +161,28 @@
 //get enrollments for the selected tei
 EnrollmentService.getByEntity($scope.selectedTeiId).then(function(response){
 var enrollments = angular.isObject(response) && response.enrollments ? response.enrollments : [];
-var selectedEnrollment = null;
-if(enrollments.length === 1 && enrollments[0].status === 'ACTIVE'){
-selectedEnrollment = enrollments[0];
+var selectedEnrollment = null, backupSelectedEnrollment = null;
+if(enrollments.length === 1 ){
+selectedEnrollment = enrollments[0];   
 }
-
+else{
+if( $scope.selectedProgramId ){
+angular.forEach(enrollments, function(en){
+if( en.program === $scope.selectedProgramId ){
+if( en.status === 'ACTIVE'){
+selectedEnrollment = en;
+}
+else{
+backupSelectedEnrollment = en;
+}
+}
+});
+}
+}
+selectedEnrollment = selectedEnrollment ? selectedEnrollment : backupSelectedEnrollment;
+
 ProgramFactory.getAll().then(function(programs){
 $scope.programs = [];
-
 $scope.programNames = [];  
 $scope.programStageNames = [];
 

___
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 20170: minor

2015-09-15 Thread noreply

revno: 20170
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Tue 2015-09-15 19:16:30 +0200
message:
  minor
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html


--
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-tracker-capture/components/dashboard/dashboard.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html	2015-09-15 16:03:55 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html	2015-09-15 17:16:30 +
@@ -49,7 +49,7 @@
 
 

-
+
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-09-14 14:10:12 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-09-15 17:16:30 +
@@ -7,6 +7,7 @@
 $filter,
 $log,
 $timeout,
+$translate,
 Paginator,
 DateUtils,
 EventUtils,
@@ -40,6 +41,11 @@
 $scope.warningMessages = {};
 $scope.tableMaxNumberOfDataElements = 10;
 
+//Labels
+$scope.dataElementLabel = $translate.instant('data_element');
+$scope.valueLabel = $translate.instant('value');
+$scope.providedElsewhereLabel = $translate.instant('provided_elsewhere');
+
 
 var userProfile = SessionStorageService.get('USER_PROFILE');
 var storedBy = userProfile && userProfile.username ? userProfile.username : '';

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-09-15 16:03:55 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-09-15 17:16:30 +
@@ -3,21 +3,17 @@
 
 
 
-
-{{'data_element'| translate}}
-
-
-{{'value'| translate}}
-
-
-{{'provided_elsewhere'| translate}}
+
+
+
+
+
 
 
 
 
 
-
-{{prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.name}}
+
 
 
 {{prStDe.dataElement.description}}
@@ -225,24 +221,20 @@
  
 
 
-
+
 
-
-{{'data_element'| translate}}
-
-
-{{'value'| translate}}
-
-
-{{'provided_elsewhere'| translate}}
-
-
+
+
+
+
+
+
+
 

 
 
-
-{{prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName : prStDes[de.dataElement.id].dataElement.name}}
+
 
 
 {{prStDes[de.dataElement.id].dataElement.description}}


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20171: About, added info about last analytics table generation runtime

2015-09-15 Thread noreply

revno: 20171
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 19:28:41 +0200
message:
  About, added info about last analytics table generation runtime
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/scheduling/AnalyticsTableTask.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/SystemInfo.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.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-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2015-09-15 16:57:32 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2015-09-15 17:28:41 +
@@ -99,6 +99,7 @@
 final String KEY_DATABASE_SERVER_CPUS = "keyDatabaseServerCpus";
 final String KEY_LAST_SUCCESSFUL_DATA_SYNC = "keyLastSuccessfulDataSynch";
 final String KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE = "keyLastSuccessfulAnalyticsTablesUpdate";
+final String KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME = "keyLastSuccessfulAnalyticsTablesRuntime";
 final String KEY_LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE = "keyLastSuccessfulResourceTablesUpdate";
 final String KEY_LAST_SUCCESSFUL_MONITORING = "keyLastSuccessfulMonitoring";
 final String KEY_HELP_PAGE_LINK = "helpPageLink";

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/scheduling/AnalyticsTableTask.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/scheduling/AnalyticsTableTask.java	2015-09-10 10:35:39 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/scheduling/AnalyticsTableTask.java	2015-09-15 17:28:41 +
@@ -30,6 +30,7 @@
 
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_TITLE;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE;
+import static org.hisp.dhis.setting.SystemSettingManager.KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME;
 import static org.hisp.dhis.system.notification.NotificationLevel.ERROR;
 import static org.hisp.dhis.system.notification.NotificationLevel.INFO;
 
@@ -48,6 +49,7 @@
 import org.hisp.dhis.security.NoSecurityContextRunnable;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.notification.Notifier;
+import org.hisp.dhis.system.util.DateUtils;
 import org.joda.time.DateTime;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -179,5 +181,6 @@
 }
 
 systemSettingManager.saveSystemSetting( KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE, startTime );
+systemSettingManager.saveSystemSetting( KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME, DateUtils.getPrettyInterval( clock.getSplitTime() ) );
 }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java	2015-06-15 13:44:20 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java	2015-09-15 17:28:41 +
@@ -29,6 +29,7 @@
  */
 
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE;
+import static org.hisp.dhis.setting.SystemSettingManager.KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME;
 
 import java.io.File;
 import java.io.IOException;
@@ -95,6 +96,8 @@
 // -
 
 Date lastAnalyticsTableSuccess = (Date) systemSettingManager.getSystemSetting( KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE );
+String lastAnalyticsTableRuntime = (String) systemSettingManager.getSystemSetting( KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME );
+
 Date now = new Date();
 
 SystemInfo info = systemInfo.instance();
@@ -104,6 +107,7 @@
 info.setServerDate( new Date() );
 info.setLastAnalyticsTableSuccess( lastAnalyticsTableSuccess );
 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20169: Added info about last successful data monitoring task run

2015-09-15 Thread noreply

revno: 20169
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 18:57:32 +0200
message:
  Added info about last successful data monitoring task run
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/scheduling/MonitoringTask.java
  
dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/ExpressionUtils.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/scheduling/ScheduleTasksAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/viewScheduledTasks.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-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2015-09-09 19:29:50 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2015-09-15 16:57:32 +
@@ -100,6 +100,7 @@
 final String KEY_LAST_SUCCESSFUL_DATA_SYNC = "keyLastSuccessfulDataSynch";
 final String KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE = "keyLastSuccessfulAnalyticsTablesUpdate";
 final String KEY_LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE = "keyLastSuccessfulResourceTablesUpdate";
+final String KEY_LAST_SUCCESSFUL_MONITORING = "keyLastSuccessfulMonitoring";
 final String KEY_HELP_PAGE_LINK = "helpPageLink";
 final String KEY_ACCEPTANCE_REQUIRED_FOR_APPROVAL = "keyAcceptanceRequiredForApproval";
 final String KEY_SYSTEM_NOTIFICATIONS_EMAIL = "keySystemNotificationsEmail";

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/scheduling/MonitoringTask.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/scheduling/MonitoringTask.java	2015-06-15 13:44:20 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/scheduling/MonitoringTask.java	2015-09-15 16:57:32 +
@@ -28,11 +28,15 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.setting.SystemSettingManager.KEY_LAST_SUCCESSFUL_MONITORING;
 import static org.hisp.dhis.system.notification.NotificationLevel.ERROR;
 import static org.hisp.dhis.system.notification.NotificationLevel.INFO;
 
+import java.util.Date;
+
 import org.hisp.dhis.message.MessageService;
 import org.hisp.dhis.scheduling.TaskId;
+import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.notification.Notifier;
 import org.hisp.dhis.commons.util.DebugUtils;
 import org.hisp.dhis.validation.ValidationRuleService;
@@ -54,6 +58,9 @@
 
 @Autowired
 private MessageService messageService;
+
+@Autowired
+private SystemSettingManager systemSettingManager;
 
 private TaskId taskId;
 
@@ -69,6 +76,8 @@
 @Override
 public void run()
 {
+final Date startTime = new Date();
+
 notifier.clear( taskId ).notify( taskId, "Monitoring data" );
 
 try
@@ -89,5 +98,7 @@
 
 throw ex;
 }
+
+systemSettingManager.saveSystemSetting( KEY_LAST_SUCCESSFUL_MONITORING, startTime );
 }
 }

=== modified file 'dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/ExpressionUtils.java'
--- dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/ExpressionUtils.java	2015-08-27 22:22:39 +
+++ dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/ExpressionUtils.java	2015-09-15 16:57:32 +
@@ -54,7 +54,7 @@
 
 private static final Pattern NUMERIC_PATTERN = Pattern.compile( "^(-?0|-?[1-9]\\d*)(\\.\\d+)?(E(-)?\\d+)?$" );
 
-static 
+static
 {
 Map functions = new HashMap<>();
 functions.put( ExpressionFunctions.NAMESPACE, ExpressionFunctions.class );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/scheduling/ScheduleTasksAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/scheduling/ScheduleTasksAction.java	2015-08-30 14:21:41 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/scheduling/ScheduleTasksAction.java	2015-09-15 16:57:32 +
@@ -36,6 +36,7 @@
 import static 

[Dhis2-devs] A way to exclude current week

2015-09-15 Thread Raheel Ayaz
Dear all,

In pivot table and data visualizer of DHIS2 when a table or a graph is
generated for last four weeks then why current week is included in the
table or graph. Is a way to exclude current week from the report to have
the output data for last four weeks.

Same query is applicable to monthly or quarterly selection as well.

Best regards,
Raheel
___
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 20172: Analytics tables, logging

2015-09-15 Thread noreply

revno: 20172
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 20:37:01 +0200
message:
  Analytics tables, logging
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.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-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java	2015-07-02 23:34:24 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java	2015-09-15 18:37:01 +
@@ -145,9 +145,9 @@
 clock.logTime( "Vacuumed tables" );
 notifier.notify( taskId, "Swapping analytics tables" );
 
-swapTables( tables );
+swapTables( tables, clock, taskId );
 
-clock.logTime( "Partition tables: " + tables + ", last years: " + lastYears );
+clock.logTime( "Swapped tables" );
 notifier.notify( taskId, "Clearing caches" );
 
 partitionManager.clearCaches();
@@ -285,14 +285,20 @@
 ConcurrentUtils.waitForCompletion( futures );
 }
 
-private void swapTables( List tables )
+private void swapTables( List tables, Clock clock, TaskId taskId )
 {
 resourceTableService.dropAllSqlViews();
 
+clock.logTime( "Dropped SQL views"  );
+notifier.notify( taskId, "Swapping tables" );
+
 for ( AnalyticsTable table : tables )
 {
 tableManager.swapTable( table );
 }
+
+clock.logTime( "Swapped tables"  );
+notifier.notify( taskId, "Creating SQL views" );
 
 resourceTableService.createAllSqlViews();
 }

___
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] DHIS 2 Documentation in French?

2015-09-15 Thread Lorill Crees
Hi Matthieu,

Thanks for your response. We have recently rolled out a DHIS 2 instance in
Mali where staff will be using a custom standalone application we have
built to import survey (program and program stage) data, as well as
aggregate data (datasets) into DHIS 2. They will then use DHIS 2 to do
analysis on the data.

Prior to this rollout the users have had no exposure to DHIS 2 except for a
3-5 day training course. A translated User Manual would be invaluable to
them as they get more comfortable using DHIS 2.

Thanks again for your help.

Lorill

On Mon, Sep 14, 2015 at 12:00 PM, Matthieu Pinard 
wrote:

> Dear Lorill,
>
> thank you for you message. Yes we plan to get up to speed with French
> Guides (implementation and User Manual). Could you describe a bit more your
> need, so that we can see we have available content already.
>
> Cheers,
> Matthieu
>
> Matthieu Pinard
> DHIS 2 Academy & Community Coordinator | University of Oslo
>
> On 14 September 2015 at 21:43, Lorill Crees  wrote:
>
>> Hi,
>>
>> We have some French DHIS 2 Users and are wondering if there are plans to
>> have the DHIS 2 User Manual translated into French? The users are currently
>> using version 2.20.
>>
>> The only French documentation we see is for the DHIS 2 Implementation
>> Guide (which is outdated to 2.17).
>>
>> Thanks,
>>
>> Lorill
>>
>> ___
>> 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 20173: Analytics tables, only vacuuming if aggregation levels for data elements exist

2015-09-15 Thread noreply

revno: 20173
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 21:13:33 +0200
message:
  Analytics tables, only vacuuming if aggregation levels for data elements exist
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.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-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java	2015-09-15 18:37:01 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java	2015-09-15 19:13:33 +
@@ -138,11 +138,6 @@
 createIndexes( tables );
 
 clock.logTime( "Created indexes" );
-notifier.notify( taskId, "Vacuuming tables" );
-
-vacuumTables( tables );
-
-clock.logTime( "Vacuumed tables" );
 notifier.notify( taskId, "Swapping analytics tables" );
 
 swapTables( tables, clock, taskId );
@@ -215,11 +210,13 @@
 
 ConcurrentUtils.waitForCompletion( futures );
 }
-
+
 private void applyAggregationLevels( List tables )
 {
 int maxLevels = organisationUnitService.getMaxOfOrganisationUnitLevels();
 
+boolean hasAggLevels = false;
+
 levelLoop : for ( int i = 0; i < maxLevels; i++ )
 {
 int level = maxLevels - i;
@@ -231,7 +228,9 @@
 {
 continue levelLoop;
 }
-
+
+hasAggLevels = true;
+
 ConcurrentLinkedQueue tableQ = new ConcurrentLinkedQueue<>( tables );
 
 List futures = new ArrayList<>();
@@ -243,6 +242,27 @@
 
 ConcurrentUtils.waitForCompletion( futures );
 }
+
+if ( hasAggLevels )
+{
+vacuumTables( tables );
+
+log.info( "Vacuumed tables" );
+}
+}
+
+private void vacuumTables( List tables )
+{
+ConcurrentLinkedQueue tableQ = new ConcurrentLinkedQueue<>( tables );
+
+List futures = new ArrayList<>();
+
+for ( int i = 0; i < getProcessNo(); i++ )
+{
+tableManager.vacuumTablesAsync( tableQ );
+}
+
+ConcurrentUtils.waitForCompletion( futures );
 }
 
 private void createIndexes( List tables )
@@ -271,20 +291,6 @@
 ConcurrentUtils.waitForCompletion( futures );
 }
 
-private void vacuumTables( List tables )
-{
-ConcurrentLinkedQueue tableQ = new ConcurrentLinkedQueue<>( tables );
-
-List futures = new ArrayList<>();
-
-for ( int i = 0; i < getProcessNo(); i++ )
-{
-tableManager.vacuumTablesAsync( tableQ );
-}
-
-ConcurrentUtils.waitForCompletion( futures );
-}
-
 private void swapTables( List tables, Clock clock, TaskId taskId )
 {
 resourceTableService.dropAllSqlViews();

___
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 20159: replace aggregationOperator with AggregationType, wip

2015-09-15 Thread noreply

revno: 20159
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-15 16:54:24 +0700
message:
  replace aggregationOperator with AggregationType, wip
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementStore.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/DataQueryGroupsTest.java
  
dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/QueryPlannerTest.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/minmax/MinMaxDataElementStoreTest.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java
  
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/typehandler/AggregationOperatorTypeHandler.java
  
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14ExpressionConverter.java
  
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java
  
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java
  
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/DataElementImporter.java
  
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java
  
dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ReflectionUtilsTest.java
  
dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ValidationUtilsTest.java
  
dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java
  
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/jsonDataElements.vm
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElements.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/AddDataElementAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java
  
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/dataElementForm.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	2015-09-15 05:08:23 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-15 09:54:24 +
@@ -35,7 +35,6 @@
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import com.google.common.collect.Sets;
-import org.hisp.dhis.analytics.AggregationType;
 import org.hisp.dhis.attribute.AttributeValue;
 import org.hisp.dhis.common.BaseDimensionalObject;
 import 

[Dhis2-devs] Error: switching calendars seems buggy

2015-09-15 Thread Knut Staring
During the training I am currently running using 2.20, all users have been
given admin access to the (initially empty) database.

Someone then went ahead and changed to Ethiopian calendar. This seems to
have tripped up both generation of resource tables and analytics. We ended
up with two different definitions of the 8th month of 2015, one with 30
days  (Ethiopian) and one with 31 days.

This then caused an error complaining about duplicate periods when trying
to run Analytics.

-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org
___
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 20158: Sql view. Allowing underscore and dash in variables. Proper feedback in response for invalid quer...

2015-09-15 Thread noreply

revno: 20158
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 11:43:39 +0200
message:
  Sql view. Allowing underscore and dash in variables. Proper feedback in 
response for invalid query values.
added:
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/sqlview/
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/sqlview/SqlViewTest.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java
  
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.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/sqlview/SqlView.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java	2015-08-03 11:33:39 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java	2015-09-15 09:43:39 +
@@ -28,11 +28,13 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonView;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-import com.google.common.collect.Sets;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Pattern;
+
 import org.apache.commons.lang3.StringUtils;
 import org.hisp.dhis.common.BaseIdentifiableObject;
 import org.hisp.dhis.common.DxfNamespaces;
@@ -44,10 +46,11 @@
 import org.hisp.dhis.common.view.ExportView;
 import org.hisp.dhis.schema.annotation.PropertyRange;
 
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Pattern;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonView;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import com.google.common.collect.Sets;
 
 /**
  * @author Dang Duy Hieu
@@ -68,6 +71,8 @@
 private static final String CRITERIA_SEP = ":";
 private static final String REGEX_SEP = "|";
 
+private static final String QUERY_VALUE_REGEX = "^[\\w\\s\\-]*$";
+
 // -
 // Properties
 // -
@@ -130,11 +135,8 @@
 String[] criteria = param.split( CRITERIA_SEP );
 String filter = criteria[0];
 String value = criteria[1];
-
-if ( StringUtils.isAlphanumericSpace( filter ) && StringUtils.isAlphanumericSpace( value ) )
-{
-map.put( filter, value );
-}
+
+map.put( filter, value );
 }
 }
 }
@@ -142,6 +144,52 @@
 return map;
 }
 
+public static Set getInvalidQueryParams( Set params )
+{
+Set invalid = new HashSet<>();
+
+for ( String param : params )
+{
+if ( !isValidQueryParam( param ) )
+{
+invalid.add( param );
+}
+}
+
+return invalid;
+}
+
+/**
+ * Indicates whether the given query parameter is valid.
+ */
+public static final boolean isValidQueryParam( String param )
+{
+return StringUtils.isAlphanumeric( param );
+}
+
+public static Set getInvalidQueryValues( Collection values )
+{
+Set invalid = new HashSet<>();
+
+for ( String value : values )
+{
+if ( !isValidQueryValue( value ) )
+{
+invalid.add( value );
+}
+}
+
+return invalid;
+}
+
+/**
+ * Indicates whether the given query value is valid.
+ */
+public static final boolean isValidQueryValue( String value )
+{
+return value != null && value.matches( QUERY_VALUE_REGEX );
+}
+
 public static String getProtectedTablesRegex()
 {
 StringBuffer regex = new StringBuffer( "^.*?(\"|'|`|\\s|^)(" );

=== added directory 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/sqlview'
=== added file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/sqlview/SqlViewTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/sqlview/SqlViewTest.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/sqlview/SqlViewTest.java	2015-09-15 09:43:39 +

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20160: DashboardItem, using enum for getType()

2015-09-15 Thread noreply

revno: 20160
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 12:15:00 +0200
message:
  DashboardItem, using enum for getType()
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItemType.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/Dashboard.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItem.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardService.java
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/dashboard/DashboardTest.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/impl/DefaultDashboardService.java
  
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardServiceTest.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DashboardController.java
  
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.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/dashboard/Dashboard.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/Dashboard.java	2015-02-05 06:53:38 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/Dashboard.java	2015-09-15 10:15:00 +
@@ -130,7 +130,7 @@
  * @param type the type of content to return.
  * @return an item.
  */
-public DashboardItem getAvailableItemByType( String type )
+public DashboardItem getAvailableItemByType( DashboardItemType type )
 {
 for ( DashboardItem item : items )
 {

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItem.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItem.java	2015-07-13 12:34:39 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItem.java	2015-09-15 10:15:00 +
@@ -66,17 +66,6 @@
 {
 public static final int MAX_CONTENT = 8;
 
-public static final String TYPE_CHART = "chart"; //TODO use enum
-public static final String TYPE_EVENT_CHART = "eventChart"; //TODO use enum
-public static final String TYPE_MAP = "map";
-public static final String TYPE_REPORT_TABLE = "reportTable";
-public static final String TYPE_EVENT_REPORT = "eventReport";
-public static final String TYPE_USERS = "users";
-public static final String TYPE_REPORT_TABLES = "reportTables";
-public static final String TYPE_REPORTS = "reports";
-public static final String TYPE_RESOURCES = "resources";
-public static final String TYPE_MESSAGES = "messages";
-
 public static final String SHAPE_NORMAL = "normal";
 public static final String SHAPE_DOUBLE_WIDTH = "double_width";
 public static final String SHAPE_FULL_WIDTH = "full_width";
@@ -124,43 +113,43 @@
 
 @JsonProperty
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
-public String getType()
+public DashboardItemType getType()
 {
 if ( chart != null )
 {
-return TYPE_CHART;
+return DashboardItemType.CHART;
 }
 else if ( eventChart != null )
 {
-return TYPE_EVENT_CHART;
+return DashboardItemType.EVENT_CHART;
 }
 else if ( map != null )
 {
-return TYPE_MAP;
+return DashboardItemType.MAP;
 }
 else if ( reportTable != null )
 {
-return TYPE_REPORT_TABLE;
+return DashboardItemType.REPORT_TABLE;
 }
 else if ( eventReport != null )
 {
-return TYPE_EVENT_REPORT;
+return DashboardItemType.EVENT_REPORT;
 }
 else if ( !users.isEmpty() )
 {
-return TYPE_USERS;
+return DashboardItemType.USERS;
 }
 else if ( !reports.isEmpty() )
 {
-return TYPE_REPORTS;
+return DashboardItemType.REPORTS;
 }
 else if ( !resources.isEmpty() )
 {
-return TYPE_RESOURCES;
+return DashboardItemType.RESOURCES;
 }
 else if ( messages != null )
 {
-return TYPE_MESSAGES;
+return DashboardItemType.MESSAGES;
 }
 
 return null;

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItemType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItemType.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItemType.java	2015-09-15 10:15:00 +
@@ -0,0 +1,39 @@
+package org.hisp.dhis.dashboard;
+
+/*
+ * 

Re: [Dhis2-devs] Issue with date varibales for Sql View of type allows for variables

2015-09-15 Thread Bharath
Thanks Knut. without dashes I am able to get the data.

On Tue, Sep 15, 2015 at 1:18 PM, Knut Staring  wrote:

> The dates should be like this: 20150101 and 20151231. Actually, the manual
> is confusing on this point, as it starts with dashes:
>
> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s04.html
>
> On Tue, Sep 15, 2015 at 8:26 AM, Bharath  wrote:
>
>> Hi,
>>
>> I have created a sample sql view which has 2 variable parameters namely
>> startDate and endDate. My sql view looks like:
>>
>>
>> *SELECT dv.* from datavalue dv inner join period p on dv.periodid =
>> p.periodid where p.periodtypeid = 8 and p.startdate >= '${startDate}' and
>> p.enddate <='${endDate}' limit 500;*
>>
>> I am trying to pass these 2 date values from api url, but getting below
>> error message:
>>
>> URI:
>>
>> https://apps.dhis2.org/demo/api/sqlViews/Eod3B6ET3dw/data.json?var=startDate:2015-01-01=endDate:2015-03-31
>>
>> Response:
>> {
>>
>>- httpStatus: "Conflict",
>>- httpStatusCode: 409,
>>- status: "ERROR",
>>- message: "SQL query contains variables which were not supplied in
>>request: [endDate, startDate]"
>>
>> }
>>
>> If I place these date values inside sqlview then I am able to get the
>> result.
>>
>> Can you please help me to find where I am doing mistake. Thanks.
>>
>>
>>
>>
>> --
>>
>> Regards,
>> Bharath Kumar. Ch
>>
>> ___
>> 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
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>



-- 

Regards,
Bharath Kumar. Ch
___
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] Issue with date varibales for Sql View of type allows for variables

2015-09-15 Thread Lars Helge Øverland
Hi Bharath,

sorry I know this is a bit unclear. For security purposes we have strict
checks on the URL variables to prevent malicious values from being executed
as SQL. We are currently only allowing alphanumeric values so it stopped
your dates since they have dashes inside. I have made two changes and
backported them to 2.20 now:

- For variable values we now allow characters, numbers, dash, underscore
and space.

- I have implemented better feedback so that the API will tell you which
variables are invalid in the response.

- I have also updated the docs to reflect this.

Please try again with latest 2.20.

regards,

Lars


On Tue, Sep 15, 2015 at 11:10 AM, Bharath  wrote:

> Thanks Knut. without dashes I am able to get the data.
>
> On Tue, Sep 15, 2015 at 1:18 PM, Knut Staring  wrote:
>
>> The dates should be like this: 20150101 and 20151231. Actually, the
>> manual is confusing on this point, as it starts with dashes:
>>
>> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s04.html
>>
>> On Tue, Sep 15, 2015 at 8:26 AM, Bharath  wrote:
>>
>>> Hi,
>>>
>>> I have created a sample sql view which has 2 variable parameters namely
>>> startDate and endDate. My sql view looks like:
>>>
>>>
>>> *SELECT dv.* from datavalue dv inner join period p on dv.periodid =
>>> p.periodid where p.periodtypeid = 8 and p.startdate >= '${startDate}' and
>>> p.enddate <='${endDate}' limit 500;*
>>>
>>> I am trying to pass these 2 date values from api url, but getting below
>>> error message:
>>>
>>> URI:
>>>
>>> https://apps.dhis2.org/demo/api/sqlViews/Eod3B6ET3dw/data.json?var=startDate:2015-01-01=endDate:2015-03-31
>>>
>>> Response:
>>> {
>>>
>>>- httpStatus: "Conflict",
>>>- httpStatusCode: 409,
>>>- status: "ERROR",
>>>- message: "SQL query contains variables which were not supplied in
>>>request: [endDate, startDate]"
>>>
>>> }
>>>
>>> If I place these date values inside sqlview then I am able to get the
>>> result.
>>>
>>> Can you please help me to find where I am doing mistake. Thanks.
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Regards,
>>> Bharath Kumar. Ch
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>
>
>
> --
>
> Regards,
> Bharath Kumar. Ch
>
> ___
> 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
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.dhis2.org 
___
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] Error: switching calendars seems buggy

2015-09-15 Thread Morten Olav Hansen
Hi

Actually, there is only one point where you can switch the calendar, and
that is at the very start of a fresh database. We should probably make this
more obvious (maybe a big warning or something).

--
Morten

On Tue, Sep 15, 2015 at 4:55 PM, Knut Staring  wrote:

> During the training I am currently running using 2.20, all users have been
> given admin access to the (initially empty) database.
>
> Someone then went ahead and changed to Ethiopian calendar. This seems to
> have tripped up both generation of resource tables and analytics. We ended
> up with two different definitions of the 8th month of 2015, one with 30
> days  (Ethiopian) and one with 31 days.
>
> This then caused an error complaining about duplicate periods when trying
> to run Analytics.
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>
> ___
> 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] Data Collection App or Tool

2015-09-15 Thread gerald thomas
Dear All,
In Sierra Leone, every district (13) has a DHMT who received
aggregated data report from the facilities (PHUs). During my
assessment i found a very big gap between data collection and data
entry which i am sure is affecting the quality of data in Sierra
Leone.

Firstly, Stock out of Data Entry Forms (paper based forms).

Secondly, Data Entry Clerks can't question information from the Data
Collectors neither will the HMIS Staff question the Data Entry Clerks;
because they are only entering what is on the paper base records they
received from their various PHUs.

In light of this, how can we closed this gap using an application
running on a very basic protocol (SMS or syncing).

Copy in this mail is someone who is willing to help us with partners
who might fund such a project.

Thanks in advance for your cooperation.

-- 
Regards,

Gerald

___
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 20168: tracker-capture: more view filters replaced by controller side logic

2015-09-15 Thread noreply

revno: 20168
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Tue 2015-09-15 18:03:55 +0200
message:
  tracker-capture: more view filters replaced by controller side logic
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/activeprograms/active-programs.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/notes/notes.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/tei-report.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/selected/selected.html


--
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-tracker-capture/components/activeprograms/active-programs.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/activeprograms/active-programs.html	2015-09-11 15:16:03 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/activeprograms/active-programs.html	2015-09-15 16:03:55 +
@@ -3,10 +3,10 @@
 {{activeProgramsWidget.title| translate}}
 
 
-
-
+
+
 
-
+
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js	2015-09-15 08:10:51 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js	2015-09-15 16:03:55 +
@@ -31,6 +31,16 @@
 $scope.userAuthority = AuthorityService.getUserAuthorities(SessionStorageService.get('USER_ROLES'));
 $scope.sortedTeiIds = CurrentSelection.getSortedTeiIds();
 
+//Labels
+$scope.removeLabel = $translate.instant('remove');
+$scope.expandLabel = $translate.instant('expand');
+$scope.collapseLabel = $translate.instant('collapse');
+$scope.noDataReportLabel = $translate.instant('no_data_report');
+$scope.noRelationshipLabel = $translate.instant('no_relationship');
+$scope.settingsLabel = $translate.instant('settings');
+$scope.showHideWidgetsLabel = $translate.instant('show_hide_widgets');
+$scope.notEnrolledLabel = $translate.instant('not_yet_enrolled_data_entry');
+
 $scope.previousTeiExists = false;
 $scope.nextTeiExists = false;
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html	2015-09-11 15:53:57 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html	2015-09-15 16:03:55 +
@@ -21,11 +21,11 @@
 
 
 
-
+
 
 
 
-{{'show_hide_widgets'| translate}}
+{{showHideWidgetsLabel}}
  

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20161: DashboardItem. Using enum for shape.

2015-09-15 Thread noreply

revno: 20161
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 12:26:47 +0200
message:
  DashboardItem. Using enum for shape.
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItemShape.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItem.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardItem.hbm.xml
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DashboardItemController.java
  
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.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/dashboard/DashboardItem.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItem.java	2015-09-15 10:15:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItem.java	2015-09-15 10:26:47 +
@@ -66,10 +66,6 @@
 {
 public static final int MAX_CONTENT = 8;
 
-public static final String SHAPE_NORMAL = "normal";
-public static final String SHAPE_DOUBLE_WIDTH = "double_width";
-public static final String SHAPE_FULL_WIDTH = "full_width";
-
 private Chart chart;
 
 private EventChart eventChart;
@@ -91,7 +87,7 @@
 
 private Boolean messages;
 
-private String shape;
+private DashboardItemShape shape;
 
 // -
 // Constructors
@@ -398,12 +394,12 @@
 @JsonProperty
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
-public String getShape()
+public DashboardItemShape getShape()
 {
 return shape;
 }
 
-public void setShape( String shape )
+public void setShape( DashboardItemShape shape )
 {
 this.shape = shape;
 }

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItemShape.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItemShape.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItemShape.java	2015-09-15 10:26:47 +
@@ -0,0 +1,37 @@
+package org.hisp.dhis.dashboard;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @author Lars Helge Overland
+ */
+public enum DashboardItemShape
+{
+NORMAL, DOUBLE_WIDTH, FULL_WIDTH;
+}

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-14 13:27:40 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-15 10:26:47 +
@@ -874,6 +874,10 @@
 executeSql( "update report set type='JASPER_REPORT_TABLE' where type='jasperReportTable'" );
 executeSql( "update report set type='JASPER_JDBC' where type='jasperJdbc'" 

[Dhis2-devs] (no subject)

2015-09-15 Thread moses mwale
Hello Devs, when uploading data using a csv format which is shown below.
how do I include a category combination e.g. gender

name,uid,code,shortname,description,formname,domaintype,type,numbertype,texttype,aggregationoperator,categorycombo,url,zero
"undergoing HIV testing",,"x3,"undergoing HIV testing",,"",,"",,"",,
how do I separate them
___
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] data set in the version 2.18

2015-09-15 Thread KOFFI Martial
Hello PapaYou had a solution in relation to your problem?because I meet the 
same problem
Merci
 Martial KOFFI 


 Le Vendredi 10 juillet 2015 10h15, papa alioune Sokhna 
 a écrit :
   

 How to associate a given organizational unit of 2.18. Since the update 2.18, 
when a user with a data entry privilege log in he see the orgUnit but the data 
set is not displayed.

-- 
Papa Alioune SOKHNAInformaticien Spécialité: développement d'application web, 
mobile et logiciels sursTel: +221 77 442 16 22 
___
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 20165: Data entry form, using enum for style

2015-09-15 Thread noreply

revno: 20165
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 13:43:48 +0200
message:
  Data entry form, using enum for style
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DisplayDensity.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryForm.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataentryform/hibernate/DataEntryForm.hbm.xml
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/eventchart/EventChart.hbm.xml
  
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/AutoSaveDataEntryFormAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/SaveDataEntryFormAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.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-api/src/main/java/org/hisp/dhis/common/DisplayDensity.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DisplayDensity.java	2015-09-15 10:40:23 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DisplayDensity.java	2015-09-15 11:43:48 +
@@ -33,5 +33,5 @@
  */
 public enum DisplayDensity
 {
-COMFORTABLE, NORMAL, COMPACT;
+COMFORTABLE, NORMAL, COMPACT, NONE;
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryForm.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryForm.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryForm.java	2015-09-15 11:43:48 +
@@ -31,6 +31,7 @@
 import java.io.Serializable;
 import java.util.regex.Pattern;
 
+import org.hisp.dhis.common.DisplayDensity;
 import org.hisp.dhis.common.DxfNamespaces;
 import org.hisp.dhis.common.ImportableObject;
 import org.hisp.dhis.common.view.DetailedView;
@@ -48,11 +49,6 @@
 public class DataEntryForm
 implements Serializable, ImportableObject
 {
-public static final String STYLE_COMFORTABLE = "comfortable";
-public static final String STYLE_REGULAR = "regular";
-public static final String STYLE_COMPACT = "compact";
-public static final String STYLE_NONE = "none";
-
 public static final int CURRENT_FORMAT = 2;
 
 /**
@@ -77,7 +73,7 @@
 /**
  * The display style to use to render the form.
  */
-private String style;
+private DisplayDensity style;
 
 /**
  * HTML Code of DataEntryForm
@@ -108,7 +104,7 @@
 this.htmlCode = htmlCode;
 }
 
-public DataEntryForm( String name, String style, String htmlCode )
+public DataEntryForm( String name, DisplayDensity style, String htmlCode )
 {
 this.name = name;
 this.style = style;
@@ -197,12 +193,12 @@
 @JsonProperty
 @JsonView({ DetailedView.class, ExportView.class })
 @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
-public String getStyle()
+public DisplayDensity getStyle()
 {
 return style;
 }
 
-public void setStyle( String style )
+public void setStyle( DisplayDensity style )
 {
 this.style = style;
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-15 11:21:39 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-15 11:43:48 +
@@ -967,6 +967,11 @@
 executeSql( "update eventchart set type='PIE' where type='pie'" );
 executeSql( "update eventchart set type='RADAR' where type='radar'" );
 executeSql( "update eventchart set type='GAUGE' where type='gauge'" );
+
+executeSql( "update dataentryform set style='COMFORTABLE' where style='comfortable'" );
+executeSql( "update dataentryform set style='NORMAL' where style='regular'" );
+executeSql( "update dataentryform set style='COMPACT' where style='compact'" );
+

Re: [Dhis2-devs] Issue with date varibales for Sql View of type allows for variables

2015-09-15 Thread Bharath
Thanks Lars, I am updating my local 2.20 copy, will test it.

On Tue, Sep 15, 2015 at 3:15 PM, Lars Helge Øverland 
wrote:

> Hi Bharath,
>
> sorry I know this is a bit unclear. For security purposes we have strict
> checks on the URL variables to prevent malicious values from being executed
> as SQL. We are currently only allowing alphanumeric values so it stopped
> your dates since they have dashes inside. I have made two changes and
> backported them to 2.20 now:
>
> - For variable values we now allow characters, numbers, dash, underscore
> and space.
>
> - I have implemented better feedback so that the API will tell you which
> variables are invalid in the response.
>
> - I have also updated the docs to reflect this.
>
> Please try again with latest 2.20.
>
> regards,
>
> Lars
>
>
> On Tue, Sep 15, 2015 at 11:10 AM, Bharath  wrote:
>
>> Thanks Knut. without dashes I am able to get the data.
>>
>> On Tue, Sep 15, 2015 at 1:18 PM, Knut Staring  wrote:
>>
>>> The dates should be like this: 20150101 and 20151231. Actually, the
>>> manual is confusing on this point, as it starts with dashes:
>>>
>>> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s04.html
>>>
>>> On Tue, Sep 15, 2015 at 8:26 AM, Bharath  wrote:
>>>
 Hi,

 I have created a sample sql view which has 2 variable parameters namely
 startDate and endDate. My sql view looks like:


 *SELECT dv.* from datavalue dv inner join period p on dv.periodid =
 p.periodid where p.periodtypeid = 8 and p.startdate >= '${startDate}' and
 p.enddate <='${endDate}' limit 500;*

 I am trying to pass these 2 date values from api url, but getting below
 error message:

 URI:

 https://apps.dhis2.org/demo/api/sqlViews/Eod3B6ET3dw/data.json?var=startDate:2015-01-01=endDate:2015-03-31

 Response:
 {

- httpStatus: "Conflict",
- httpStatusCode: 409,
- status: "ERROR",
- message: "SQL query contains variables which were not supplied in
request: [endDate, startDate]"

 }

 If I place these date values inside sqlview then I am able to get the
 result.

 Can you please help me to find where I am doing mistake. Thanks.




 --

 Regards,
 Bharath Kumar. Ch

 ___
 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


>>>
>>>
>>> --
>>> Knut Staring
>>> Dept. of Informatics, University of Oslo
>>> Norway: +4791880522
>>> Skype: knutstar
>>> http://dhis2.org
>>>
>>
>>
>>
>> --
>>
>> Regards,
>> Bharath Kumar. Ch
>>
>> ___
>> 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
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
>


-- 

Regards,
Bharath Kumar. Ch
___
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 20162: ReportTable, enums for displayDensity and fontSize

2015-09-15 Thread noreply

revno: 20162
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 12:40:23 +0200
message:
  ReportTable, enums for displayDensity and fontSize
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DisplayDensity.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/FontSize.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml
  
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml


--
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
=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DisplayDensity.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DisplayDensity.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DisplayDensity.java	2015-09-15 10:40:23 +
@@ -0,0 +1,37 @@
+package org.hisp.dhis.common;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @author Lars Helge Overland
+ */
+public enum DisplayDensity
+{
+COMFORTABLE, NORMAL, COMPACT;
+}

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/FontSize.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/FontSize.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/FontSize.java	2015-09-15 10:40:23 +
@@ -0,0 +1,37 @@
+package org.hisp.dhis.common;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20163: Event report, enum for dataType

2015-09-15 Thread noreply

revno: 20163
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 13:02:35 +0200
message:
  Event report, enum for dataType
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/eventreport/EventReportServiceTest.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml


--
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/eventreport/EventReport.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java	2015-09-15 10:40:23 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java	2015-09-15 11:02:35 +
@@ -32,6 +32,7 @@
 import java.util.Date;
 import java.util.List;
 
+import org.hisp.dhis.analytics.EventDataType;
 import org.hisp.dhis.analytics.EventOutputType;
 import org.hisp.dhis.common.BaseAnalyticalObject;
 import org.hisp.dhis.common.BaseDimensionalObject;
@@ -107,7 +108,7 @@
 /**
  * Type of data, can be aggregated values and individual cases.
  */
-private String dataType;
+private EventDataType dataType;
 
 /**
  * Dimensions to crosstabulate / use as columns.
@@ -335,12 +336,12 @@
 @JsonProperty
 @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
-public String getDataType()
+public EventDataType getDataType()
 {
 return dataType;
 }
 
-public void setDataType( String dataType )
+public void setDataType( EventDataType dataType )
 {
 this.dataType = dataType;
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-15 10:40:23 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-15 11:02:35 +
@@ -887,13 +887,16 @@
 executeSql( "update eventreport set displaydensity='NORMAL' where displaydensity='normal'" );
 executeSql( "update eventreport set displaydensity='COMPACT' where displaydensity='compact'" );
 
-executeSql( "update reporttable set fontsize='LARGE' where displaydensity='large'" );
-executeSql( "update reporttable set fontsize='NORMAL' where displaydensity='normal'" );
-executeSql( "update reporttable set fontsize='SMALL' where displaydensity='small'" );
-
-executeSql( "update eventreport set fontsize='LARGE' where displaydensity='large'" );
-executeSql( "update eventreport set fontsize='NORMAL' where displaydensity='normal'" );
-executeSql( "update eventreport set fontsize='SMALL' where displaydensity='small'" );
+executeSql( "update reporttable set fontsize='LARGE' where fontsize='large'" );
+executeSql( "update reporttable set fontsize='NORMAL' where fontsize='normal'" );
+executeSql( "update reporttable set fontsize='SMALL' where fontsize='small'" );
+
+executeSql( "update eventreport set fontsize='LARGE' where fontsize='large'" );
+executeSql( "update eventreport set fontsize='NORMAL' where fontsize='normal'" );
+executeSql( "update eventreport set fontsize='SMALL' where fontsize='small'" );
+
+executeSql( "update eventreport set datatype='AGGREGATED_VALUES' where datatype='aggregated_values'" );
+executeSql( "update eventreport set datatype='EVENTS' where datatype='individual_cases'" );
 
 oauth2();
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml	2015-09-15 10:40:23 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml	2015-09-15 11:02:35 +
@@ -104,7 +104,12 @@
 
 
 	
-
+
+  
+org.hisp.dhis.analytics.EventDataType
+12
+   
+
 
 
   
@@ -142,10 +147,10 @@
 
 
 
-		
-			org.hisp.dhis.analytics.EventOutputType
-			12
-		 
+	  
+org.hisp.dhis.analytics.EventOutputType
+12
+   
 	
 
 	
@@ -155,18 +160,18 @@
 
 
 
-		
-			org.hisp.dhis.common.DisplayDensity
-			

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20164: Event chart, chart, enum for type

2015-09-15 Thread noreply

revno: 20164
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 13:21:39 +0200
message:
  Event chart, chart, enum for type
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/EventDataType.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/ChartType.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/BaseChart.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/eventchart/EventChart.hbm.xml
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/eventchart/EventChartServiceTest.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml
  
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/chart/ChartServiceTest.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
=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/EventDataType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/EventDataType.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/EventDataType.java	2015-09-15 11:21:39 +
@@ -0,0 +1,37 @@
+package org.hisp.dhis.analytics;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @author Lars Helge Overland
+ */
+public enum EventDataType
+{
+AGGREGATED_VALUES, EVENTS
+}

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/BaseChart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/BaseChart.java	2015-09-14 10:39:44 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/BaseChart.java	2015-09-15 11:21:39 +
@@ -63,22 +63,12 @@
 @JacksonXmlRootElement( localName = "baseChart", namespace = DxfNamespaces.DXF_2_0 )
 public abstract class BaseChart
 extends BaseAnalyticalObject
-{
-public static final String TYPE_COLUMN = "column";
-public static final String TYPE_STACKED_COLUMN = "stackedcolumn";
-public static final String TYPE_BAR = "bar";
-public static final String TYPE_STACKED_BAR = "stackedbar";
-public static final String TYPE_LINE = "line";
-public static final String TYPE_AREA = "area";
-public static final String TYPE_PIE = "pie";
-public static final String TYPE_RADAR = "radar";
-public static final String TYPE_METER = "gauge";
-
+{
 protected String domainAxisLabel;
 
 protected String rangeAxisLabel;
 
-protected String type;
+protected ChartType type;
 
 protected boolean hideLegend;
 
@@ -146,9 +136,9 @@
 // Logic
 // -
 
-public boolean isType( String type )
+public boolean isType( ChartType type )
 {
-return this.type != null && this.type.equalsIgnoreCase( type );
+return this.type != null && this.type.equals( type );
 }
 
 public boolean isTargetLine()
@@ -279,12 +269,12 @@
 @JsonProperty
 @JsonView( { DetailedView.class, 

Re: [Dhis2-devs] Adding a dataset to an OrgUnit using the Web API (2.19)

2015-09-15 Thread Mark Polak
Hey Jose,

This has been made quite a bit easier (since a while ago)

If you're just looking to add it to the collection
https://www.dhis2.org/doc/snapshot/en/developer/html/dhis2_developer_manual_full.html#d5094e731

So a POST request to
http://localhost:8080/dhis/api/organisationUnits/Oe3de1oAjGV/dataSets/Paf2o4Yx79Z
should do it :)

For removing you can just simply send a DELETE request to the same url

Regards,

Mark

On Tue, Sep 15, 2015 at 1:09 PM, Jose Garcia Muñoz 
wrote:

>
> Hi Morten,
>
> I am trying to add a dataset to one org. unit using the Web API. So far, I
> am using the following API call:
>
> curl -X PATCH -d @c:\dataset.json -H "Content-Type: application/json" -u
> myuser:mypass
> http://localhost:8080/dhis/api/organisationUnits/Oe3de1oAjGV/dataSets
>
> The payload is:
>
> {"dataSets":[
> {
> "id": "Paf2o4Yx79Z",
> "created": "2015-04-23T10:16:44.809+",
> "name": "Vaccination Staff 3",
> "lastUpdated": "2015-09-15T09:58:06.990+",
> "code": "DS_VST_3",
> "href": "http://localhost:8080/dhis/api/dataSets/Paf2o4Yx79Z;
> }
> ]}
>
> I get a succesful message:
>
>
> {"status":"SUCCESS","importCount":{"imported":0,"updated":1,"ignored":0,"deleted":0},"type":"OrganisationUnit","lastImported":"Oe3de1oAjGV"}
>
> But nothing really happens.
>
> Any ideas? I am using the 2.19 version
>
> Thanks
> Jose
>
>
> ___
> 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


Re: [Dhis2-devs] Adding a dataset to an OrgUnit using the Web API (2.19)

2015-09-15 Thread Jose Garcia Muñoz
ops! Yes, much more easier! (and it works too :) ). Thanks Mark!

Regards
Jose

On Tue, Sep 15, 2015 at 1:23 PM, Mark Polak  wrote:

> Hey Jose,
>
> This has been made quite a bit easier (since a while ago)
>
> If you're just looking to add it to the collection
>
> https://www.dhis2.org/doc/snapshot/en/developer/html/dhis2_developer_manual_full.html#d5094e731
>
> So a POST request to
> http://localhost:8080/dhis/api/organisationUnits/Oe3de1oAjGV/dataSets/Paf2o4Yx79Z
> should do it :)
>
> For removing you can just simply send a DELETE request to the same url
>
> Regards,
>
> Mark
>
> On Tue, Sep 15, 2015 at 1:09 PM, Jose Garcia Muñoz 
> wrote:
>
>>
>> Hi Morten,
>>
>> I am trying to add a dataset to one org. unit using the Web API. So far,
>> I am using the following API call:
>>
>> curl -X PATCH -d @c:\dataset.json -H "Content-Type: application/json" -u
>> myuser:mypass
>> http://localhost:8080/dhis/api/organisationUnits/Oe3de1oAjGV/dataSets
>>
>> The payload is:
>>
>> {"dataSets":[
>> {
>> "id": "Paf2o4Yx79Z",
>> "created": "2015-04-23T10:16:44.809+",
>> "name": "Vaccination Staff 3",
>> "lastUpdated": "2015-09-15T09:58:06.990+",
>> "code": "DS_VST_3",
>> "href": "http://localhost:8080/dhis/api/dataSets/Paf2o4Yx79Z;
>> }
>> ]}
>>
>> I get a succesful message:
>>
>>
>> {"status":"SUCCESS","importCount":{"imported":0,"updated":1,"ignored":0,"deleted":0},"type":"OrganisationUnit","lastImported":"Oe3de1oAjGV"}
>>
>> But nothing really happens.
>>
>> Any ideas? I am using the 2.19 version
>>
>> Thanks
>> Jose
>>
>>
>> ___
>> 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 20174: PT enums.

2015-09-15 Thread noreply

revno: 20174
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 21:42:00 +0200
message:
  PT enums.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/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-pivot/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties	2015-09-10 20:26:24 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties	2015-09-15 19:42:00 +
@@ -202,3 +202,5 @@
 completed_only=Completed only
 events=Events
 include_only_completed_events_only=Include only completed events
+comma=Comma
+space=Space

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2015-09-10 20:26:24 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2015-09-15 19:42:00 +
@@ -11,6 +11,8 @@
 		extendCore,
 		createViewport,
 		dimConf,
+styleConf,
+finalsStyleConf,
 
 		ns = {
 			core: {},
@@ -647,13 +649,13 @@
 			queryMode: 'local',
 			valueField: 'id',
 			editable: false,
-			value: 'normal',
+value: finalsStyleConf.normal,
 			store: Ext.create('Ext.data.Store', {
 fields: ['id', 'text'],
 data: [
-	{id: 'comfortable', text: NS.i18n.comfortable},
-	{id: 'normal', text: NS.i18n.normal},
-	{id: 'compact', text: NS.i18n.compact}
+	{id: finalsStyleConf.compact, text: NS.i18n.compact},
+	{id: finalsStyleConf.normal, text: NS.i18n.normal},
+	{id: finalsStyleConf.comfortable, text: NS.i18n.comfortable}
 ]
 			})
 		});
@@ -668,13 +670,13 @@
 			queryMode: 'local',
 			valueField: 'id',
 			editable: false,
-			value: 'normal',
+			value: finalsStyleConf.normal,
 			store: Ext.create('Ext.data.Store', {
 fields: ['id', 'text'],
 data: [
-	{id: 'large', text: NS.i18n.large},
-	{id: 'normal', text: NS.i18n.normal},
-	{id: 'small', text: NS.i18n.small_}
+	{id: finalsStyleConf.large, text: NS.i18n.large},
+	{id: finalsStyleConf.normal, text: NS.i18n.normal},
+	{id: finalsStyleConf.small, text: NS.i18n.small_}
 ]
 			})
 		});
@@ -689,13 +691,13 @@
 			queryMode: 'local',
 			valueField: 'id',
 			editable: false,
-			value: 'space',
+			value: finalsStyleConf.space,
 			store: Ext.create('Ext.data.Store', {
 fields: ['id', 'text'],
 data: [
-	{id: 'comma', text: 'Comma'},
-	{id: 'space', text: 'Space'},
-	{id: 'none', text: 'None'}
+	{id: finalsStyleConf.none, text: NS.i18n.none},
+	{id: finalsStyleConf.space, text: NS.i18n.space},
+	{id: finalsStyleConf.comma, text: NS.i18n.comma}
 ]
 			})
 		});
@@ -881,13 +883,13 @@
 showRowSubTotals.setValue(Ext.isBoolean(layout.showRowSubTotals) ? layout.showRowSubTotals : true);
 showDimensionLabels.setValue(Ext.isBoolean(layout.showDimensionLabels) ? layout.showDimensionLabels : true);
 hideEmptyRows.setValue(Ext.isBoolean(layout.hideEmptyRows) ? layout.hideEmptyRows : false);
-aggregationType.setValue(Ext.isString(layout.aggregationType) ? layout.aggregationType : 'DEFAULT');
-dataApprovalLevel.setValue(Ext.isObject(layout.dataApprovalLevel) && Ext.isString(layout.dataApprovalLevel.id) ? layout.dataApprovalLevel.id : 'DEFAULT');
+aggregationType.setValue(Ext.isString(layout.aggregationType) ? layout.aggregationType : finalsStyleConf.default_);
+dataApprovalLevel.setValue(Ext.isObject(layout.dataApprovalLevel) && Ext.isString(layout.dataApprovalLevel.id) ? layout.dataApprovalLevel.id : finalsStyleConf.default_);
 showHierarchy.setValue(Ext.isBoolean(layout.showHierarchy) ? layout.showHierarchy : false);
 completedOnly.setValue(Ext.isBoolean(layout.completedOnly) ? layout.completedOnly : false);
-displayDensity.setValue(Ext.isString(layout.displayDensity) ? layout.displayDensity : 'normal');
-fontSize.setValue(Ext.isString(layout.fontSize) ? layout.fontSize : 'normal');
-digitGroupSeparator.setValue(Ext.isString(layout.digitGroupSeparator) ? layout.digitGroupSeparator : 'space');
+displayDensity.setValue(Ext.isString(layout.displayDensity) ? layout.displayDensity : finalsStyleConf.normal);
+fontSize.setValue(Ext.isString(layout.fontSize) ? layout.fontSize : finalsStyleConf.normal);
+

Re: [Dhis2-devs] DHIS 2 Documentation in French?

2015-09-15 Thread Lorill Crees
Hi Calle,

Yes - we are working on making it available. It's a standalone Grails
application that would require server installation and configuration, so we
are currently investigating options that would be the easiest for others to
make use of it.

I'll definitely contact the dev list when it is available.

Cheers,

Lorill

On Tue, Sep 15, 2015 at 12:35 PM, Calle Hedberg 
wrote:

> Lorill,
>
> That custom app seems interesting - are you willing to make it available
> via the app store (or just open source it)?
>
> Regards
> Calle
>
> On 15 September 2015 at 21:51, Lorill Crees  wrote:
>
>> Hi Matthieu,
>>
>> Thanks for your response. We have recently rolled out a DHIS 2 instance
>> in Mali where staff will be using a custom standalone application we have
>> built to import survey (program and program stage) data, as well as
>> aggregate data (datasets) into DHIS 2. They will then use DHIS 2 to do
>> analysis on the data.
>>
>> Prior to this rollout the users have had no exposure to DHIS 2 except for
>> a 3-5 day training course. A translated User Manual would be invaluable to
>> them as they get more comfortable using DHIS 2.
>>
>> Thanks again for your help.
>>
>> Lorill
>>
>> On Mon, Sep 14, 2015 at 12:00 PM, Matthieu Pinard 
>> wrote:
>>
>>> Dear Lorill,
>>>
>>> thank you for you message. Yes we plan to get up to speed with French
>>> Guides (implementation and User Manual). Could you describe a bit more your
>>> need, so that we can see we have available content already.
>>>
>>> Cheers,
>>> Matthieu
>>>
>>> Matthieu Pinard
>>> DHIS 2 Academy & Community Coordinator | University of Oslo
>>>
>>> On 14 September 2015 at 21:43, Lorill Crees  wrote:
>>>
 Hi,

 We have some French DHIS 2 Users and are wondering if there are plans
 to have the DHIS 2 User Manual translated into French? The users are
 currently using version 2.20.

 The only French documentation we see is for the DHIS 2 Implementation
 Guide (which is outdated to 2.17).

 Thanks,

 Lorill

 ___
 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
>>
>>
>
>
> --
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19119
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
>
___
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] Bulk Deletion of Data

2015-09-15 Thread Lorill Crees
Hi,

I seem to remember a prior thread on this but I can't seem to find it. We
want to be able to programatically bulk delete data values (both aggregate
and program/program stage data) via the Web API. Is there a way to achieve
this?

We don't want to have to do this on a sql level directly via the database,
nor do we want to have to loop through individual data points in order to
delete them.

Thanks,

Lorill
___
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] A way to exclude current week

2015-09-15 Thread Calle Hedberg
Raheel,

The dev team is working on a more generic fix for this in 2.21 - it will be
possible to specify an "anchor period/date" which will determine all the
other relative reporting periods.

Seems it will only be available in 2.21, not 2.20 or earlier.

Regards
Calle

On 15 September 2015 at 20:06, Raheel Ayaz  wrote:

> Dear all,
>
> In pivot table and data visualizer of DHIS2 when a table or a graph is
> generated for last four weeks then why current week is included in the
> table or graph. Is a way to exclude current week from the report to have
> the output data for last four weeks.
>
> Same query is applicable to monthly or quarterly selection as well.
>
> Best regards,
> Raheel
>
> ___
> 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
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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] DHIS 2 Documentation in French?

2015-09-15 Thread Calle Hedberg
Lorill,

That custom app seems interesting - are you willing to make it available
via the app store (or just open source it)?

Regards
Calle

On 15 September 2015 at 21:51, Lorill Crees  wrote:

> Hi Matthieu,
>
> Thanks for your response. We have recently rolled out a DHIS 2 instance in
> Mali where staff will be using a custom standalone application we have
> built to import survey (program and program stage) data, as well as
> aggregate data (datasets) into DHIS 2. They will then use DHIS 2 to do
> analysis on the data.
>
> Prior to this rollout the users have had no exposure to DHIS 2 except for
> a 3-5 day training course. A translated User Manual would be invaluable to
> them as they get more comfortable using DHIS 2.
>
> Thanks again for your help.
>
> Lorill
>
> On Mon, Sep 14, 2015 at 12:00 PM, Matthieu Pinard 
> wrote:
>
>> Dear Lorill,
>>
>> thank you for you message. Yes we plan to get up to speed with French
>> Guides (implementation and User Manual). Could you describe a bit more your
>> need, so that we can see we have available content already.
>>
>> Cheers,
>> Matthieu
>>
>> Matthieu Pinard
>> DHIS 2 Academy & Community Coordinator | University of Oslo
>>
>> On 14 September 2015 at 21:43, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> We have some French DHIS 2 Users and are wondering if there are plans to
>>> have the DHIS 2 User Manual translated into French? The users are currently
>>> using version 2.20.
>>>
>>> The only French documentation we see is for the DHIS 2 Implementation
>>> Guide (which is outdated to 2.17).
>>>
>>> Thanks,
>>>
>>> Lorill
>>>
>>> ___
>>> 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
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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] Pluriannual pivot table

2015-09-15 Thread Guy Ekani
Hello everyone,
Please how can we build a pluriannual pivot table like the one below ? In DHIS 
2.18 with a aggregated dataelement
Sincerely,
Dataelement | January | February    | March   
|+++-+2015        |       1 
|               2|  7 |2014        |       4 |               5| 
 5 |2013        |       7 |        7|  2 |2012  
      |       7 |        8|  0 | 
= EKANI Guy 
 



___
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] Error: switching calendars seems buggy

2015-09-15 Thread Lars Helge Øverland
We can start with a warning label in the settings UI.

LArs

On Tue, Sep 15, 2015 at 12:18 PM, Knut Staring  wrote:

> I thought so - and confirmed it the hard way. I guess it is not feasible
> to lock it? Because I dont know how to fix this database now...tried to
> delete the period, but then it complains about it not existing anymore...
>
> On Tue, Sep 15, 2015 at 12:11 PM, Morten Olav Hansen 
> wrote:
>
>> Hi
>>
>> Actually, there is only one point where you can switch the calendar, and
>> that is at the very start of a fresh database. We should probably make this
>> more obvious (maybe a big warning or something).
>>
>> --
>> Morten
>>
>> On Tue, Sep 15, 2015 at 4:55 PM, Knut Staring  wrote:
>>
>>> During the training I am currently running using 2.20, all users have
>>> been given admin access to the (initially empty) database.
>>>
>>> Someone then went ahead and changed to Ethiopian calendar. This seems to
>>> have tripped up both generation of resource tables and analytics. We ended
>>> up with two different definitions of the 8th month of 2015, one with 30
>>> days  (Ethiopian) and one with 31 days.
>>>
>>> This then caused an error complaining about duplicate periods when
>>> trying to run Analytics.
>>>
>>> --
>>> Knut Staring
>>> Dept. of Informatics, University of Oslo
>>> Norway: +4791880522
>>> Skype: knutstar
>>> http://dhis2.org
>>>
>>> ___
>>> 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
>>>
>>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>
> ___
> 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
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.dhis2.org 
___
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] Error: switching calendars seems buggy

2015-09-15 Thread Knut Staring
I thought so - and confirmed it the hard way. I guess it is not feasible to
lock it? Because I dont know how to fix this database now...tried to delete
the period, but then it complains about it not existing anymore...

On Tue, Sep 15, 2015 at 12:11 PM, Morten Olav Hansen 
wrote:

> Hi
>
> Actually, there is only one point where you can switch the calendar, and
> that is at the very start of a fresh database. We should probably make this
> more obvious (maybe a big warning or something).
>
> --
> Morten
>
> On Tue, Sep 15, 2015 at 4:55 PM, Knut Staring  wrote:
>
>> During the training I am currently running using 2.20, all users have
>> been given admin access to the (initially empty) database.
>>
>> Someone then went ahead and changed to Ethiopian calendar. This seems to
>> have tripped up both generation of resource tables and analytics. We ended
>> up with two different definitions of the 8th month of 2015, one with 30
>> days  (Ethiopian) and one with 31 days.
>>
>> This then caused an error complaining about duplicate periods when trying
>> to run Analytics.
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>> ___
>> 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
>>
>>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org
___
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] Issue with date varibales for Sql View of type allows for variables

2015-09-15 Thread Lars Helge Øverland
Thanks.

On Tue, Sep 15, 2015 at 12:26 PM, Bharath  wrote:

> Thanks Lars, I am updating my local 2.20 copy, will test it.
>
> On Tue, Sep 15, 2015 at 3:15 PM, Lars Helge Øverland 
> wrote:
>
>> Hi Bharath,
>>
>> sorry I know this is a bit unclear. For security purposes we have strict
>> checks on the URL variables to prevent malicious values from being executed
>> as SQL. We are currently only allowing alphanumeric values so it stopped
>> your dates since they have dashes inside. I have made two changes and
>> backported them to 2.20 now:
>>
>> - For variable values we now allow characters, numbers, dash, underscore
>> and space.
>>
>> - I have implemented better feedback so that the API will tell you which
>> variables are invalid in the response.
>>
>> - I have also updated the docs to reflect this.
>>
>> Please try again with latest 2.20.
>>
>> regards,
>>
>> Lars
>>
>>
>> On Tue, Sep 15, 2015 at 11:10 AM, Bharath  wrote:
>>
>>> Thanks Knut. without dashes I am able to get the data.
>>>
>>> On Tue, Sep 15, 2015 at 1:18 PM, Knut Staring  wrote:
>>>
 The dates should be like this: 20150101 and 20151231. Actually, the
 manual is confusing on this point, as it starts with dashes:

 https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s04.html

 On Tue, Sep 15, 2015 at 8:26 AM, Bharath  wrote:

> Hi,
>
> I have created a sample sql view which has 2 variable parameters
> namely startDate and endDate. My sql view looks like:
>
>
> *SELECT dv.* from datavalue dv inner join period p on dv.periodid =
> p.periodid where p.periodtypeid = 8 and p.startdate >= '${startDate}' and
> p.enddate <='${endDate}' limit 500;*
>
> I am trying to pass these 2 date values from api url, but getting
> below error message:
>
> URI:
>
> https://apps.dhis2.org/demo/api/sqlViews/Eod3B6ET3dw/data.json?var=startDate:2015-01-01=endDate:2015-03-31
>
> Response:
> {
>
>- httpStatus: "Conflict",
>- httpStatusCode: 409,
>- status: "ERROR",
>- message: "SQL query contains variables which were not supplied
>in request: [endDate, startDate]"
>
> }
>
> If I place these date values inside sqlview then I am able to get the
> result.
>
> Can you please help me to find where I am doing mistake. Thanks.
>
>
>
>
> --
>
> Regards,
> Bharath Kumar. Ch
>
> ___
> 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
>
>


 --
 Knut Staring
 Dept. of Informatics, University of Oslo
 Norway: +4791880522
 Skype: knutstar
 http://dhis2.org

>>>
>>>
>>>
>>> --
>>>
>>> Regards,
>>> Bharath Kumar. Ch
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> http://www.dhis2.org 
>>
>>
>
>
> --
>
> Regards,
> Bharath Kumar. Ch
>



-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.dhis2.org 
___
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] [Bug 1471118] Re: Filter/Search with data element details in Pivot tables

2015-09-15 Thread Timothy Harding
Here is the same exact pivot table with 'Totals' instead of 'Details'.
This is what the table in the previous comment is expected to look like.
Thanks and let me know if I should submit a new bug report for this one.

-Timothy Harding

** Attachment added: "Screen Shot 2015-09-15 at 8.16.14 AM.png"
   
https://bugs.launchpad.net/dhis2/+bug/1471118/+attachment/4464961/+files/Screen%20Shot%202015-09-15%20at%208.16.14%20AM.png

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1471118

Title:
  Filter/Search with data element details in Pivot tables

Status in DHIS:
  Fix Committed

Bug description:
  In the data elements dimension in pivot tables, when you switch from
  totals to details, the filter or search option returns nothing based.

  Click on data elements
  Switch to details
  Use the filter options and search any data elements

  No results will be returned and yet they data elements together with
  their categories are available.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1471118/+subscriptions

___
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] [Bug 1471118] Re: Filter/Search with data element details in Pivot tables

2015-09-15 Thread Timothy Harding
Hello Morten and Devs,

I just made a pivot table on the SL demo site (2.20), used data element
details, put data in the 'filter' position in the layout, and it returns
zero results. Is this the same issue reported in this bug, or something
new? I included a screenshot as an attachment.

-Timothy Harding


** Attachment added: "Screen Shot 2015-09-15 at 8.16.32 AM.png"
   
https://bugs.launchpad.net/dhis2/+bug/1471118/+attachment/4464960/+files/Screen%20Shot%202015-09-15%20at%208.16.32%20AM.png

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1471118

Title:
  Filter/Search with data element details in Pivot tables

Status in DHIS:
  Fix Committed

Bug description:
  In the data elements dimension in pivot tables, when you switch from
  totals to details, the filter or search option returns nothing based.

  Click on data elements
  Switch to details
  Use the filter options and search any data elements

  No results will be returned and yet they data elements together with
  their categories are available.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1471118/+subscriptions

___
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] Adding a dataset to an OrgUnit using the Web API (2.19)

2015-09-15 Thread Jose Garcia Muñoz
Hi Morten,

I am trying to add a dataset to one org. unit using the Web API. So far, I
am using the following API call:

curl -X PATCH -d @c:\dataset.json -H "Content-Type: application/json" -u
myuser:mypass
http://localhost:8080/dhis/api/organisationUnits/Oe3de1oAjGV/dataSets

The payload is:

{"dataSets":[
{
"id": "Paf2o4Yx79Z",
"created": "2015-04-23T10:16:44.809+",
"name": "Vaccination Staff 3",
"lastUpdated": "2015-09-15T09:58:06.990+",
"code": "DS_VST_3",
"href": "http://localhost:8080/dhis/api/dataSets/Paf2o4Yx79Z;
}
]}

I get a succesful message:

{"status":"SUCCESS","importCount":{"imported":0,"updated":1,"ignored":0,"deleted":0},"type":"OrganisationUnit","lastImported":"Oe3de1oAjGV"}

But nothing really happens.

Any ideas? I am using the 2.19 version

Thanks
Jose
___
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] (no subject)

2015-09-15 Thread Jason Pickering
Hi Moses,

Just put the  UID for the categorycombo "Gender" from your system in the
correct column (third from the last).

name,uid,code,shortname,description,formname,domaintype,type,numbertype,
texttype,aggregationoperator,categorycombo,url,zero
"undergoing HIV testing",,"x3,"undergoing HIV testing",,"",,"",,"",,,
,X,,

Regards,
Jason


On Tue, Sep 15, 2015 at 1:31 PM, moses mwale  wrote:

> Hello Devs, when uploading data using a csv format which is shown below.
> how do I include a category combination e.g. gender
>
>
> name,uid,code,shortname,description,formname,domaintype,type,numbertype,texttype,aggregationoperator,categorycombo,url,zero
> "undergoing HIV testing",,"x3,"undergoing HIV testing",,"",,"",,"",,
> how do I separate them
>
> ___
> 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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20167: tracker-capture: minized filter usage, it helps in improving performance

2015-09-15 Thread noreply

revno: 20167
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Tue 2015-09-15 15:51:19 +0200
message:
  tracker-capture: minized filter usage, it helps in improving performance
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/advanced-search.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/search-ou-tree.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/tei.html
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.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-tracker-capture/components/relationship/search.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html	2015-09-14 15:51:56 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html	2015-09-15 13:51:19 +
@@ -2,7 +2,7 @@
 
 
 
-{{'org_unit'| translate}}
+{{orgUnitLabel}}
 
  {{'SELECTED'| translate}}
  {{'CHILDREN'| translate}}

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html	2015-04-27 08:24:30 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html	2015-09-15 13:51:19 +
@@ -38,7 +38,7 @@
 
 
 
-{{'org_unit'| translate}}
+{{orgUnitLabel}}
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html	2015-09-11 15:16:03 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html	2015-09-15 13:51:19 +
@@ -66,7 +66,7 @@
 {{'name'| translate}}:{{dhis2Event.name}}
 
 
-{{'org_unit'| translate}}: {{dhis2Event.orgUnitName}}
+{{orgUnitLabel}}: {{dhis2Event.orgUnitName}}
 
 
 {{dhis2Event.eventDate ? 'event_date' : 'due_date'| translate}}:{{dhis2Event.eventDate ? dhis2Event.eventDate : dhis2Event.dueDate}}

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html	2015-04-21 07:42:41 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html	2015-09-15 13:51:19 +
@@ -2,7 +2,7 @@
 
 
 
-{{'org_unit'| translate}}
+{{orgUnitLabel}}
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html	2015-04-27 08:24:30 +
+++ 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20166: Test fix

2015-09-15 Thread noreply

revno: 20166
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-15 14:25:44 +0200
message:
  Test fix
modified:
  
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardServiceTest.java
  
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/interpretation/InterpretationServiceTest.java
  
dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.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-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardServiceTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardServiceTest.java	2015-09-15 10:15:00 +
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardServiceTest.java	2015-09-15 12:25:44 +
@@ -64,8 +64,8 @@
 @Override
 public void setUpTest()
 {
-chartA = new Chart( "A" );
-chartB = new Chart( "B" );
+chartA = createChart( 'A' );
+chartB = createChart( 'B' );
 
 chartService.addChart( chartA );
 chartService.addChart( chartB );

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/interpretation/InterpretationServiceTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/interpretation/InterpretationServiceTest.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/interpretation/InterpretationServiceTest.java	2015-09-15 12:25:44 +
@@ -78,7 +78,7 @@
 
 setDependency( interpretationService, "currentUserService", new MockCurrentUserService( userA ), CurrentUserService.class );
 
-chartA = new Chart( "ChartA" );
+chartA = createChart( 'A' );
 chartService.addChart( chartA );
 
 interpretationA = new Interpretation( chartA, null, "Interpration of chart A" );

=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java	2015-09-15 09:54:24 +
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java	2015-09-15 12:25:44 +
@@ -32,6 +32,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.analytics.AggregationType;
 import org.hisp.dhis.chart.Chart;
+import org.hisp.dhis.chart.ChartType;
 import org.hisp.dhis.common.CodeGenerator;
 import org.hisp.dhis.common.DimensionalObject;
 import org.hisp.dhis.common.ValueType;
@@ -111,6 +112,7 @@
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
+
 import java.io.File;
 import java.io.PrintWriter;
 import java.io.StringReader;
@@ -1075,14 +1077,23 @@
 
 return legendSet;
 }
-
-public static Chart createChart( char uniqueCharacter, List indicators, List periods,
-List units )
+
+public static Chart createChart( char uniqueCharacter )
 {
 Chart chart = new Chart();
 chart.setAutoFields();
-
 chart.setName( "Chart" + uniqueCharacter );
+chart.setType( ChartType.COLUMN );
+
+return chart;
+
+}
+
+public static Chart createChart( char uniqueCharacter, List indicators, List periods,
+List units )
+{
+Chart chart = createChart( uniqueCharacter );
+
 chart.addAllDataDimensionItems( indicators );
 chart.setPeriods( periods );
 chart.setOrganisationUnits( units );

___
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