[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20130: Unused code

2015-09-14 Thread noreply

revno: 20130
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 12:39:44 +0200
message:
  Unused code
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/BaseChart.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java
  
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14ObjectMappingUtil.java
  
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14TypeHandler.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/chart/BaseChart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/BaseChart.java	2015-09-14 10:00:50 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/BaseChart.java	2015-09-14 10:39:44 +
@@ -63,11 +63,7 @@
 @JacksonXmlRootElement( localName = "baseChart", namespace = DxfNamespaces.DXF_2_0 )
 public abstract class BaseChart
 extends BaseAnalyticalObject
-{
-public static final String SIZE_NORMAL = "normal";
-public static final String SIZE_WIDE = "wide";
-public static final String SIZE_TALL = "tall";
-
+{
 public static final String TYPE_COLUMN = "column";
 public static final String TYPE_STACKED_COLUMN = "stackedcolumn";
 public static final String TYPE_BAR = "bar";

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-14 10:15:27 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-14 10:39:44 +
@@ -31,7 +31,6 @@
 import java.util.Date;
 import java.util.List;
 
-import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 
 import com.google.common.collect.Lists;
@@ -72,12 +71,12 @@
 
 private final Class javaClass;
 
-ValueType()
+private ValueType()
 {
 this.javaClass = null;
 }
 
-ValueType( Class javaClass )
+private ValueType( Class javaClass )
 {
 this.javaClass = javaClass;
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14ObjectMappingUtil.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14ObjectMappingUtil.java	2015-09-14 10:15:27 +
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14ObjectMappingUtil.java	2015-09-14 10:39:44 +
@@ -31,7 +31,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.period.DailyPeriodType;
 import org.hisp.dhis.period.MonthlyPeriodType;
 import org.hisp.dhis.period.PeriodType;

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14TypeHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14TypeHandler.java	2015-09-14 10:15:27 +
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14TypeHandler.java	2015-09-14 10:39:44 +
@@ -47,9 +47,11 @@
 private static final String DHIS14_AGGREGATION_OPERATOR_AVERAGE = "Avg";
 private static final String DHIS14_AGGREGATION_OPERATOR_COUNT = "Count";
 
+/*
 private static final String DHIS14_TYPE_INT = "3";
 private static final String DHIS14_TYPE_STRING = "4";
 private static final String DHIS14_TYPE_BOOL = "5";
+*/
 
 // -
 // Yes/No

___
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 20131: Defined order of startup routines

2015-09-14 Thread noreply

revno: 20131
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 13:56:00 +0200
message:
  Defined order of startup routines
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.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/META-INF/dhis/beans.xml
  
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.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/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-14 10:15:27 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-14 11:56:00 +
@@ -543,7 +543,9 @@
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
 public ValueType getValueType()
 {
-return optionSet != null ? optionSet.getValueType() : valueType;
+//TODO
+//return optionSet != null ? optionSet.getValueType() : valueType;
+return valueType;
 }
 
 public void setValueType( ValueType valueType )

=== modified file '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/java/org/hisp/dhis/startup/InitTableAlteror.java	2015-09-11 13:17:50 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java	2015-09-14 11:56:00 +
@@ -92,18 +92,16 @@
 executeSql( "update dataelement set valuetype='INTEGER_ZERO_OR_POSITIVE' where valuetype='int' and numbertype='zeroPositiveInt'" );
 executeSql( "update dataelement set valuetype='PERCENTAGE' where valuetype='int' and numbertype='percentage'" );
 executeSql( "update dataelement set valuetype='UNIT_INTERVAL' where valuetype='int' and numbertype='unitInterval'" );
+executeSql( "update dataelement set valuetype='NUMBER' where valuetype='int' and numbertype is null" );
 
 executeSql( "alter table dataelement drop column numbertype" );
 
-executeSql( "update dataelement set valuetype='NUMBER' where valuetype='int'" );
-
 executeSql( "update dataelement set valuetype='TEXT' where valuetype='string' and texttype='text'" );
 executeSql( "update dataelement set valuetype='LONG_TEXT' where valuetype='string' and texttype='longText'" );
+executeSql( "update dataelement set valuetype='TEXT' where valuetype='string' and texttype is null" );
 
 executeSql( "alter table dataelement drop column texttype" );
 
-executeSql( "update dataelement set valuetype='TEXT' where valuetype='string'" );
-
 executeSql( "update dataelement set valuetype='DATE' where valuetype='date'" );
 executeSql( "update dataelement set valuetype='DATETIME' where valuetype='datetime'" );
 executeSql( "update dataelement set valuetype='BOOLEAN' where valuetype='bool'" );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2015-09-14 09:13:10 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2015-09-14 11:56:00 +
@@ -1317,13 +1317,7 @@
 
 
 
-
-  
-
-  
-
 
-
   
 
   
@@ -1361,67 +1355,6 @@
 optionset
 optionvalue
 validationcriteria
-  
-
-  
-
-  
-
-
-  
-
-  
-
-
-
-
-
-  
-
-  
-
-
-
-  
-
-  
-
-
-
-
-  
-
-  
-
-
-
-  
-
-  
-
-
-
-  
-
-  
-
-
-
-  
-
-  
-
-
-
-
-  
-
-  
-
-
-
-
-  
 trackedentity
 trackedentityinstance
 trackedentityattribute
@@ -1444,6 +1377,63 @@
 
   
 
+  
+
+
+  
+
+  
+
+
+
+  
+
+  
+
+
+
+
+  
+
+  
+
+
+
+
+
+  
+
+  
+
+
+
+  
+
+  
+
+
+
+
+  
+
+  
+
+
+
+  
+
+  
+
+
+
+  
+
+  
+
+
+
+  
+
   
 
 
@@ -1451,15 +1441,14 @@
   
 
   
+  
+  
+  
+  
   
   
   
   
-  
-  
-  
-  
-  
   
   
   

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- 

[Dhis2-devs] help question

2015-09-14 Thread ahmad alelewi
how to make automatical options in  option set by write value in another 
dataelement inn data entry?? 
  ___
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 20129: Report, changed from String type to enum ReportType

2015-09-14 Thread noreply

revno: 20129
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 12:33:55 +0200
message:
  Report, changed from String type to enum ReportType
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/ReportType.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.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/report/hibernate/Report.hbm.xml
  
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/report/ReportStoreTest.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ReportController.java
  
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java
  
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetReportParamsAction.java
  
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportForm.vm
  
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.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/report/Report.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java	2015-08-03 11:33:39 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java	2015-09-14 10:33:55 +
@@ -57,11 +57,7 @@
 
 public static final String TEMPLATE_DIR = "templates";
 
-public static final String TYPE_JASPER_REPORT_TABLE = "jasperReportTable";
-public static final String TYPE_JASPER_JDBC = "jasperJdbc";
-public static final String TYPE_HTML = "html";
-
-private String type;
+private ReportType type;
 
 private String designContent;
 
@@ -81,16 +77,18 @@
 {
 }
 
-public Report( String name, String type, String designContent, ReportTable reportTable )
+public Report( String name, ReportType type, String designContent, ReportTable reportTable )
 {
 this.name = name;
+this.type = type;
 this.designContent = designContent;
 this.reportTable = reportTable;
 }
 
-public Report( String name, String type, String designContent, RelativePeriods relatives, ReportParams reportParams )
+public Report( String name, ReportType type, String designContent, RelativePeriods relatives, ReportParams reportParams )
 {
 this.name = name;
+this.type = type;
 this.designContent = designContent;
 this.relatives = relatives;
 this.reportParams = reportParams;
@@ -102,17 +100,17 @@
 
 public boolean isTypeReportTable()
 {
-return type != null && TYPE_JASPER_REPORT_TABLE.equals( type );
+return type != null && ReportType.JASPER_REPORT_TABLE.equals( type );
 }
 
 public boolean isTypeJdbc()
 {
-return type != null && TYPE_JASPER_JDBC.equals( type );
+return type != null && ReportType.JASPER_JDBC.equals( type );
 }
 
 public boolean isTypeHtml()
 {
-return type != null && TYPE_HTML.equals( type );
+return type != null && ReportType.HTML.equals( type );
 }
 
 public boolean hasReportTable()
@@ -149,12 +147,12 @@
 @JsonProperty
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
-public String getType()
+public ReportType getType()
 {
 return type;
 }
 
-public void setType( String type )
+public void setType( ReportType type )
 {
 this.type = type;
 }

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/ReportType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/ReportType.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/ReportType.java	2015-09-14 10:33:55 +
@@ -0,0 +1,37 @@
+package org.hisp.dhis.report;
+
+/*
+ * 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 

[Dhis2-devs] Question

2015-09-14 Thread ahmad alelewi
how i can get data element value and save it in another data element ??

  ___
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 20133: Added support for displaying V{value_count} and V{zero_pos_value_count} in program indicators. Ad...

2015-09-14 Thread noreply

revno: 20133
committer: Markus Bekken 
branch nick: dhis2
timestamp: Mon 2015-09-14 16:10:12 +0200
message:
  Added support for displaying V{value_count} and V{zero_pos_value_count} in 
program indicators. Added support in program rules for functions count(), 
countifzeropos() and countifvalue().
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleVariableSourceType.java
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleVariableServiceTest.java
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleVariableStoreTest.java
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js
  
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/scripts/services.js
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.filters.js
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.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/programrule/ProgramRuleVariableSourceType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleVariableSourceType.java	2015-05-15 11:08:43 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleVariableSourceType.java	2015-09-14 14:10:12 +
@@ -39,11 +39,9 @@
 DATAELEMENT_NEWEST_EVENT_PROGRAM_STAGE("dataelement_newest_event_program_stage"), 
 DATAELEMENT_NEWEST_EVENT_PROGRAM("dataelement_newest_event_program"), 
 DATAELEMENT_CURRENT_EVENT("dataelement_current_event"), 
-DATAELEMENT_PREVIOUS_EVENT("dataelement_previous_event"), 
-CALCULATED_VALUE("calculated_value"), 
-TEI_ATTRIBUTE("tei_attribute"),
-CONTEXT_VARIABLE("context_variable"),
-NUMBEROFEVENTS_PROGRAMSTAGE("numberofevents_programstage");
+DATAELEMENT_PREVIOUS_EVENT("dataelement_previous_event"),
+CALCULATED_VALUE("calculated_value"),
+TEI_ATTRIBUTE("tei_attribute");
 
 private final String value;
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleVariableServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleVariableServiceTest.java	2015-06-23 15:59:19 +
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleVariableServiceTest.java	2015-09-14 14:10:12 +
@@ -90,12 +90,11 @@
 {
 ProgramRuleVariable variableA = new ProgramRuleVariable( "RuleVariableA", programA, ProgramRuleVariableSourceType.DATAELEMENT_CURRENT_EVENT, null, dataElementA, null );
 ProgramRuleVariable variableB = new ProgramRuleVariable( "RuleVariableB", programA, ProgramRuleVariableSourceType.TEI_ATTRIBUTE, attributeA, null, null );
-ProgramRuleVariable variableC = new ProgramRuleVariable( "RuleVariableC", programA, ProgramRuleVariableSourceType.CALCULATED_VALUE, null, null, null );
+ProgramRuleVariable variableC = new ProgramRuleVariable( "RuleVariableC", programA, ProgramRuleVariableSourceType.DATAELEMENT_NEWEST_EVENT_PROGRAM, null, dataElementA, null );
 
 int idA = variableService.addProgramRuleVariable( variableA );
 int idB = variableService.addProgramRuleVariable( variableB );
 int idC = variableService.addProgramRuleVariable( variableC );
-
 assertEquals( variableA, variableService.getProgramRuleVariable( idA ) );
 assertEquals( variableB, variableService.getProgramRuleVariable( idB ) );
 assertEquals( variableC, variableService.getProgramRuleVariable( idC ) );
@@ -106,9 +105,9 @@
 {
 ProgramRuleVariable variableD = new ProgramRuleVariable( "RuleVariableD", programB, ProgramRuleVariableSourceType.DATAELEMENT_CURRENT_EVENT, null, dataElementA, null );
 ProgramRuleVariable variableE = new ProgramRuleVariable( "RuleVariableE", programB, ProgramRuleVariableSourceType.TEI_ATTRIBUTE, attributeA, null, null );
-ProgramRuleVariable variableF = new ProgramRuleVariable( "RuleVariableF", programB, ProgramRuleVariableSourceType.CALCULATED_VALUE, null, null, null );
+ProgramRuleVariable variableF = new ProgramRuleVariable( "RuleVariableF", programB, ProgramRuleVariableSourceType.DATAELEMENT_NEWEST_EVENT_PROGRAM, null, dataElementA, null );
   

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20136: tracker-capture: relationship now uses main registration controller

2015-09-14 Thread noreply

revno: 20136
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Mon 2015-09-14 17:40:35 +0200
message:
  tracker-capture: relationship now uses main registration controller
removed:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-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
=== removed file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html	2015-09-11 15:16:03 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html	1970-01-01 00:00:00 +
@@ -1,151 +0,0 @@
-
-
-
-
-
-{{'category' | translate}}
- 
-
-
-{{'entity_type' | translate}}
-
-
-
-
-
-   
-
-
-
-
-{{'profile' | translate}}
-
-
-
-{{attribute.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{'no_value' | translate}}   
-
-
-
- {{option.name}}
-
-
-
-
-{{'required'| translate}}
-
-
-
-
-{{'required'| translate}}
-
-
-
-{{'required'| translate}}
-
-
-
-{{'please_select'| translate}}
-{{'no'| translate}}
-{{'yes'| translate}}
-
-{{'required'| translate}}
-
-
-
-{{'required'| translate}}
-
-
-
-{{'required'| translate}}
-
-
-
-{{'required'| translate}}
-
-
-
-
-
-
-
-
-
-{{'enrollment' | translate}}
-
-
-
-{{selectedProgramForRelative.enrollmentDateLabel}}
-
-
-
-{{'required'| translate}}
-
- 
-
-
-{{selectedProgramForRelative.incidentDateLabel}}
-
-
-
-
-
-
-
-
-
-{{'form_is_empty_fill_at_least_one'| translate}} 
-
-
-
-{{'register'| translate}}
-{{'cancel'| translate}}
-
-
-
\ No newline at end of file

=== modified file 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20137: tracker-capture: relationship update send only necessary json properties

2015-09-14 Thread noreply

revno: 20137
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Mon 2015-09-14 17:51:56 +0200
message:
  tracker-capture: relationship update send only necessary json properties
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.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/relationship/relationship-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js	2015-09-14 15:40:35 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js	2015-09-14 15:51:56 +
@@ -103,7 +103,11 @@
 
 if( index !== -1 ){
 $scope.selectedTei.relationships.splice(index,1);
-TEIService.update($scope.selectedTei, $scope.optionSets, $scope.attributesById).then(function(response){
+var trimmedTei = angular.copy($scope.selectedTei);
+angular.forEach(trimmedTei.relationships, function(rel){
+delete rel.relative;
+});
+TEIService.update(trimmedTei, $scope.optionSets, $scope.attributesById).then(function(response){
 if(response.response && response.response.status !== 'SUCCESS'){//update has failed
 var dialogOptions = {
 headerText: 'update_error',
@@ -431,8 +435,8 @@
 var columns = attributes ? angular.copy(attributes) : [];

 //also add extra columns which are not part of attributes (orgunit for example)
-columns.push({id: 'orgUnitName', name: 'Organisation unit', type: 'string', displayInListNoProgram: false});
-columns.push({id: 'created', name: 'Registration date', type: 'string', displayInListNoProgram: false});
+columns.push({id: 'orgUnitName', name: 'Organisation unit', type: 'TEXT', displayInListNoProgram: false});
+columns.push({id: 'created', name: 'Registration date', type: 'TEXT', displayInListNoProgram: false});
 
 //generate grid column for the selected program/attributes
 angular.forEach(columns, function(column){

=== 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-04-17 13:14:21 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html	2015-09-14 15:51:56 +
@@ -43,7 +43,7 @@
 
 
 
-
+
 
 
 
@@ -62,7 +62,7 @@
 
 
 
-
+
 
 
 
@@ -81,7 +81,7 @@
 
  
 
-
+
 
 {{option| translate}}
 

___
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 20134: tracker-capture: attribute inheritance during relationship registration - WIP

2015-09-14 Thread noreply

revno: 20134
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Mon 2015-09-14 17:16:33 +0200
message:
  tracker-capture: attribute inheritance during relationship registration - WIP
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/add-relationship.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-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/registration/registration-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js	2015-09-11 15:16:03 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js	2015-09-14 15:16:33 +
@@ -86,7 +86,6 @@
 $scope.selectedTei = {};
 $scope.tei = {};
 $scope.registrationMode = args.registrationMode;
-$scope.getAttributes($scope.registrationMode);
 
 if($scope.registrationMode !== 'REGISTRATION'){
 $scope.selectedTei = args.selectedTei;
@@ -96,6 +95,15 @@
 if($scope.registrationMode === 'PROFILE'){
 $scope.selectedEnrollment = args.enrollment;
 }
+
+if($scope.registrationMode === 'RELATIONSHIP'){
+$scope.mainTei = args.mainTei;
+$scope.selectedTei = {};
+$scope.tei = {};
+$scope.selectedProgram = args.relativeProgram;
+}
+
+$scope.getAttributes($scope.registrationMode);
 });
 
 $scope.getAttributes = function(_mode){
@@ -112,6 +120,14 @@
 $scope.trackedEntityForm.displayIncidentDate = $scope.selectedProgram.displayIncidentDate;
 $scope.customForm = CustomFormService.getForTrackedEntity($scope.trackedEntityForm, mode);
 }
+
+if(mode === 'RELATIONSHIP'){
+angular.forEach($scope.attributes, function(att){
+if(att.inherit && $scope.mainTei[att.id]){
+$scope.selectedTei[att.id] = $scope.mainTei[att.id];
+}
+});
+}
 });
 }; 
 
@@ -126,8 +142,20 @@
 program: $scope.selectedProgram ? $scope.selectedProgram.id: null});
 }
 else if(destination === 'RELATIONSHIP' ){
-$scope.tei.trackedEntityInstance = teiId;
-$scope.broadCastSelections();
+if($scope.tei){
+angular.forEach($scope.tei.attributes, function(att){
+$scope.tei[att.attribute] = att.value;
+});
+
+$scope.tei.orgUnitName = $scope.selectedOrgUnit.name;
+$scope.tei.created = DateUtils.formatFromApiToUser(new Date());
+
+CurrentSelection.setRelationshipInfo({tei: $scope.tei});
+
+$timeout(function() { 
+$rootScope.$broadcast('relationship', {result: 'SUCCESS'});
+}, 200);
+}
 }
 };
 
@@ -260,19 +288,12 @@
 }
 };
 
-
-$scope.broadCastSelections = function(){
-angular.forEach($scope.tei.attributes, function(att){
-$scope.tei[att.attribute] = att.value;
-});
-
-$scope.tei.orgUnitName = $scope.selectedOrgUnit.name;
-$scope.tei.created = DateUtils.formatFromApiToUser(new Date());
-CurrentSelection.setRelationshipInfo({tei: $scope.tei, src: $scope.selectedRelationshipSource});
+$scope.cancelRelativeRegistration = function(){
 $timeout(function() { 
-$rootScope.$broadcast('relationship', {});
+$rootScope.$broadcast('relationship', {result: 'CANCEL'});
 }, 200);
-};
+};   
+   
 
 var processRuleEffect = function(){
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html	2015-06-02 12:25:03 +
+++ 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20138: tracker-capture: attribute inheritance during relationship assignment is now fully implemented.

2015-09-14 Thread noreply

revno: 20138
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Mon 2015-09-14 18:13:56 +0200
message:
  tracker-capture: attribute inheritance during relationship assignment is now 
fully implemented.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js
  
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/scripts/services.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/tei.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/relationship/relationship-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js	2015-09-14 15:51:56 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js	2015-09-14 16:13:56 +
@@ -203,6 +203,12 @@
 
 $scope.selectedRelationship = {};
 $scope.relationship = {};
+
+var invalidTeis = [];
+invalidTeis.push($scope.selectedTei.trackedEntityInstance);
+angular.forEach($scope.selectedTei.relationships, function(rel){
+invalidTeis.push(rel.trackedEntityInstanceB);
+});
 
 //Selections
 $scope.selectedOrgUnit = SessionStorageService.get('SELECTED_OU');
@@ -374,7 +380,7 @@
 }
 
 //process tei grid
-$scope.trackedEntityList = TEIGridService.format(data,false, $scope.optionSets);
+$scope.trackedEntityList = TEIGridService.format(data,false, $scope.optionSets, invalidTeis);
 $scope.showTrackedEntityDiv = true;
 $scope.teiFetched = true;
 

=== modified file '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/scripts/controllers.js	2015-09-11 15:16:03 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2015-09-14 16:13:56 +
@@ -257,7 +257,7 @@
 }
 
 //process tei grid
-$scope.trackedEntityList = TEIGridService.format(data,false, $scope.optionSets);
+$scope.trackedEntityList = TEIGridService.format(data,false, $scope.optionSets, null);
 $scope.showTrackedEntityDiv = true;
 $scope.teiFetched = true;  
 $scope.doSearch = true;

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js	2015-09-14 14:10:12 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js	2015-09-14 16:13:56 +
@@ -1495,7 +1495,8 @@
 .service('TEIGridService', function(OrgUnitService, OptionSetService, DateUtils, $translate, AttributesFactory){
 
 return {
-format: function(grid, map, optionSets){
+format: function(grid, map, optionSets, invalidTeis){
+invalidTeis = !invalidTeis ? [] : invalidTeis;
 if(!grid || !grid.rows){
 return;
 }
@@ -1519,47 +1520,49 @@
 OrgUnitService.open().then(function(){
 
 angular.forEach(grid.rows, function(row){
-var entity = {};
-var isEmpty = true;
-
-entity.id = row[0];
-entity.created = DateUtils.formatFromApiToUser( row[1] );
-entity.orgUnit = row[3];  
-entity.type = row[4];
-entity.inactive = row[5] !== "" ? row[5] : false;
-
-OrgUnitService.get(row[3]).then(function(ou){
-if(ou){
-entity.orgUnitName = ou.n;
-}   
-});
-
-for(var i=6; i

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20135: minor

2015-09-14 Thread noreply

revno: 20135
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Mon 2015-09-14 17:36:30 +0200
message:
  minor
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.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/registration/registration.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html	2015-09-14 15:16:33 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html	2015-09-14 15:36:30 +
@@ -63,7 +63,7 @@
 
 
 
-{{'save'| translate}}
+{{'save'| translate}}
 {{'cancel'| translate}}
 
 

___
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 20140: CSV event export, should not call close explicitly on httpresponse outputstream

2015-09-14 Thread noreply

revno: 20140
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 19:39:27 +0200
message:
  CSV event export, should not call close explicitly on httpresponse 
outputstream
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/UserSettingController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/EventController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/view/CustomPathExtensionContentNegotiationStrategy.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/UserSettingController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/UserSettingController.java	2015-07-09 06:47:25 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/UserSettingController.java	2015-09-14 17:39:27 +
@@ -151,8 +151,12 @@
 private String getStringValue( String key, Serializable value )
 {
 if ( key.equals( UserSettingService.KEY_UI_LOCALE ) || key.equals( UserSettingService.KEY_DB_LOCALE ) )
+{
 return ((Locale) value).getLanguage();
+}
 else
+{
 return (String) value;
+}
 }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/EventController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/EventController.java	2015-08-30 17:07:42 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/EventController.java	2015-09-14 17:39:27 +
@@ -219,8 +219,6 @@
 }
 
 csvEventService.writeEvents( outputStream, events, !skipHeader );
-response.getOutputStream().flush();
-response.getOutputStream().close();
 }
 
 @RequestMapping( value = "/eventRows", method = RequestMethod.GET )

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/view/CustomPathExtensionContentNegotiationStrategy.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/view/CustomPathExtensionContentNegotiationStrategy.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/view/CustomPathExtensionContentNegotiationStrategy.java	2015-09-14 17:39:27 +
@@ -49,11 +49,11 @@
  */
 public class CustomPathExtensionContentNegotiationStrategy extends PathExtensionContentNegotiationStrategy
 {
-private static final UrlPathHelper urlPathHelper = new UrlPathHelper();
+private static final UrlPathHelper URL_PATH_HELPER = new UrlPathHelper();
 
 static
 {
-urlPathHelper.setUrlDecode( false );
+URL_PATH_HELPER.setUrlDecode( false );
 }
 
 public CustomPathExtensionContentNegotiationStrategy( Map mediaTypes )
@@ -71,7 +71,7 @@
 return null;
 }
 
-String path = urlPathHelper.getLookupPathForRequest( servletRequest );
+String path = URL_PATH_HELPER.getLookupPathForRequest( servletRequest );
 String filename = WebUtils.extractFullFilenameFromUrlPath( path );
 String extension = getFilenameExtension( filename );
 return (StringUtils.hasText( extension )) ? extension.toLowerCase( Locale.ENGLISH ) : null;

___
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 20139: Minor

2015-09-14 Thread noreply

revno: 20139
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 19:35:36 +0200
message:
  Minor
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java	2015-09-03 03:11:47 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java	2015-09-14 17:35:36 +
@@ -179,9 +179,9 @@
 throw new WebMessageException( WebMessageUtils.notFound( "DataSet not found for uid: " + uid ) );
 }
 
-OrganisationUnit ou = null;
+OrganisationUnit ou = manager.get( OrganisationUnit.class, orgUnit );
 
-if ( orgUnit != null && (ou = manager.get( OrganisationUnit.class, orgUnit )) == null )
+if ( ou == null )
 {
 throw new WebMessageException( WebMessageUtils.notFound( "Organisation unit does not exist: " + orgUnit ) );
 }
@@ -207,9 +207,9 @@
 throw new WebMessageException( WebMessageUtils.notFound( "DataSet not found for uid: " + uid ) );
 }
 
-OrganisationUnit ou = null;
+OrganisationUnit ou = manager.get( OrganisationUnit.class, orgUnit );
 
-if ( orgUnit != null && (ou = manager.get( OrganisationUnit.class, orgUnit )) == null )
+if ( ou == null )
 {
 throw new WebMessageException( WebMessageUtils.notFound( "Organisation unit does not exist: " + orgUnit ) );
 }

___
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 20145: Bugfix: display of error and warning messages without use of sections

2015-09-14 Thread noreply

revno: 20145
committer: Markus Bekken 
branch nick: dhis2
timestamp: Mon 2015-09-14 22:10:01 +0200
message:
  Bugfix: display of error and warning messages without use of sections
modified:
  
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/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-03 20:50:06 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-09-14 20:10:01 +
@@ -197,6 +197,7 @@
 
 
  
+
 
 
 {{warningMessages[prStDe.dataElement.id]}}
@@ -205,7 +206,6 @@
 
 {{errorMessages[prStDe.dataElement.id]}}
 
-
 
 
 

___
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 20148: remove unused code in PDFUtils

2015-09-14 Thread noreply

revno: 20148
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-15 11:59:19 +0700
message:
  remove unused code in PDFUtils
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java	2015-09-07 08:51:58 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java	2015-09-15 04:59:19 +
@@ -28,28 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static com.lowagie.text.Element.ALIGN_CENTER;
-import static com.lowagie.text.Element.ALIGN_LEFT;
-
-import java.io.OutputStream;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-import org.hisp.dhis.attribute.AttributeValue;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.expression.ExpressionService;
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.user.User;
-import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.validation.ValidationRule;
-
 import com.lowagie.text.Document;
 import com.lowagie.text.DocumentException;
 import com.lowagie.text.Font;
@@ -61,6 +39,11 @@
 import com.lowagie.text.pdf.PdfPTable;
 import com.lowagie.text.pdf.PdfWriter;
 
+import java.io.OutputStream;
+
+import static com.lowagie.text.Element.ALIGN_CENTER;
+import static com.lowagie.text.Element.ALIGN_LEFT;
+
 /**
  * @author Lars Helge Overland
  * @author Dang Duy Hieu
@@ -84,7 +67,7 @@
  * Creates a document.
  *
  * @param outputStream The output stream to write the document content.
- * @param pageSize the page size.
+ * @param pageSize the page size.
  * @return A Document.
  */
 public static Document openDocument( OutputStream outputStream, Rectangle pageSize )
@@ -120,18 +103,18 @@
  * Creates a table. Specify the columns and widths by providing one
  * float per column with a percentage value. For instance
  * 
- *
+ * 
  * 
  * getPdfPTable( 0.35f, 0.65f )
  * 
- *
+ * 
  * 
  * will give you a table with two columns where the first covers 35 %
  * of the page while the second covers 65 %.
  * 
  *
  * @param keepTogether Indicates whether the table could be broken across
- *multiple pages or should be kept at one page.
+ * multiple pages or should be kept at one page.
  * @param columnWidths The column widths.
  * @return
  */
@@ -149,7 +132,7 @@
  * Adds a table to a document.
  *
  * @param document The document to add the table to.
- * @param table The table to add to the document.
+ * @param tableThe table to add to the document.
  */
 public static void addTableToDocument( Document document, PdfPTable table )
 {
@@ -189,9 +172,9 @@
 /**
  * Creates a cell.
  *
- * @param text The text to include in the cell.
- * @param colspan The column span of the cell.
- * @param font The font of the cell text.
+ * @param textThe text to include in the cell.
+ * @param colspan The column span of the cell.
+ * @param fontThe font of the cell text.
  * @param horizontalAlign The vertical alignment of the text in the cell.
  * @return A PdfCell.
  */
@@ -255,7 +238,7 @@
  * Creates an empty cell.
  *
  * @param colspan The column span of the cell.
- * @param height The height of the column.
+ * @param height  The height of the column.
  * @return A PdfCell.
  */
 public static PdfPCell getEmptyCell( int colSpan, int height )
@@ -300,403 +283,4 @@
 throw new RuntimeException( "Error while creating base font", ex );
 }
 }
-
-// -
-// Domain object methods
-// -
-
-/**
- * Writes a "Data Elements" title in front of page
- *
- * @param dataElementIds the identifier list of Data
- * @param i18n The i18n object
- * @param format The i18nFormat object
- *
- */
-public static void 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20149: remove unused code

2015-09-14 Thread noreply

revno: 20149
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-15 12:08:23 +0700
message:
  remove unused code
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.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/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-15 04:41:36 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-15 05:08:23 +
@@ -97,10 +97,6 @@
 public static final String AGGREGATION_OPERATOR_AVERAGE_SUM = "avg_sum_org_unit"; // Sum in organisation unit
 public static final String AGGREGATION_OPERATOR_AVERAGE = "avg";
 public static final String AGGREGATION_OPERATOR_COUNT = "count";
-public static final String AGGREGATION_OPERATOR_STDDEV = "stddev";
-public static final String AGGREGATION_OPERATOR_VARIANCE = "variance";
-public static final String AGGREGATION_OPERATOR_MIN = "min";
-public static final String AGGREGATION_OPERATOR_MAX = "max";
 public static final String AGGREGATION_OPERATOR_NONE = "none";
 
 /**

=== 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-13 17:49:03 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-09-15 05:08:23 +
@@ -94,9 +94,6 @@
 @Autowired
 private SystemSettingManager systemSettingManager;
 
-@Autowired
-private ProgramIndicatorService programIndicatorService;
-
 // -
 // DefaultQueryPlanner implementation
 // -

___
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 20146: minor fix

2015-09-14 Thread noreply

revno: 20146
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-15 11:41:36 +0700
message:
  minor fix
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.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/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-14 11:56:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-15 04:41:36 +
@@ -529,6 +529,7 @@
 
 @JsonProperty
 @JsonView( { DetailedView.class } )
+@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
 public boolean isOptionSetValue()
 {
 return optionSet != null;

___
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] Issue with tracker capture

2015-09-14 Thread Ese Egerega
Dear All,

There is this issue am experiencing with the tracker capture app. Not sure
if thats how it is supposed to work or if its bug.

When you click on the name of a tracked entity for the first time you get a
blank result and a message that the person is not enrolled for any program
even when the person is enrolled for programs. You have to click on the
back button and then click on the tracked entity the second time for it
work. I think this happens when you open a new browser.

I tested this on the dhis2 demo site (http://apps.dhis2.org/demo) and my
experience was the same.

Am not sure if this is peculiar to my computer or if its a general problem.

Thanks,
Ese
___
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-core] release preparations

2015-09-14 Thread Morten Olav Hansen
And please be aware that we have updated many constant strings to become
enums, and will continue this work for at least one more week. If you see
any strange issues, it might be because of this.

The big one is the removal of data element type/number type/text type,
which was replaced by a value type enum.

--
Morten

On Mon, Sep 14, 2015 at 11:09 PM, Lars Helge Øverland 
wrote:

> Hi devs,
>
> we are 3 weeks away from the release of Oct 2. Remember to keep your
> blueprints updated (ie. add for new stuff or update status on existing
> ones) here:
>
> https://launchpad.net/dhis2/+milestone/2.21
>
> Also remember to test your features as you go so we don't have to start
> testing everything from scratch the last week. For this release I will ask
> all of you to prepare a use-case in the demo database which demonstrates
> (and tests) each new feature where feasible. You can find the demo db on
> github here:
>
> https://github.com/dhis2/dhis2-demo-db
>
> regards,
>
> Lars
>
>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
>
> --
> Mailing list: https://launchpad.net/~dhis2-devs-core
> Post to : dhis2-devs-core@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs-core
> More help   : https://help.launchpad.net/ListHelp
>
>
-- 
Mailing list: https://launchpad.net/~dhis2-devs-core
Post to : dhis2-devs-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs-core
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20147: use aggregation type in DataElementPeriodTypeAllowAverageFilter

2015-09-14 Thread noreply

revno: 20147
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-15 11:53:54 +0700
message:
  use aggregation type in DataElementPeriodTypeAllowAverageFilter
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementPeriodTypeAllowAverageFilter.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementPeriodTypeAllowAverageFilter.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementPeriodTypeAllowAverageFilter.java	2015-05-28 18:21:56 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementPeriodTypeAllowAverageFilter.java	2015-09-15 04:53:54 +
@@ -28,15 +28,16 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.analytics.AggregationType;
+import org.hisp.dhis.commons.filter.Filter;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.commons.filter.Filter;
 
 public class DataElementPeriodTypeAllowAverageFilter
 implements Filter
 {
 private String periodType;
-
+
 public DataElementPeriodTypeAllowAverageFilter( String periodType )
 {
 this.periodType = periodType;
@@ -49,20 +50,20 @@
 {
 return false;
 }
-
+
 final PeriodType type = PeriodType.getPeriodTypeByName( periodType );
-
+
 if ( dataElement.getPeriodType().equals( type ) )
 {
 return true;
 }
-
-if ( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM.equals( dataElement.getAggregationOperator() ) && 
+
+if ( AggregationType.AVERAGE_SUM_ORG_UNIT == dataElement.getAggregationType() &&
 dataElement.getPeriodType().getFrequencyOrder() >= type.getFrequencyOrder() )
 {
 return true;
 }
-
+
 return false;
 }
 }

___
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 tracker capture

2015-09-14 Thread markus . bekken
Dear Ese,
we have seen the same happening in some cases, and there is a bug reported here:
https://bugs.launchpad.net/dhis2/+bug/1490838

It does not appear to be consistently reproduced in the cases we have seen. If 
you have additional info on repro that is welcome.

Regards,
Markus

> Den 15. sep. 2015 kl. 07.36 skrev Ese Egerega :
> 
> Dear All,
> 
> There is this issue am experiencing with the tracker capture app. Not sure if 
> thats how it is supposed to work or if its bug. 
> 
> When you click on the name of a tracked entity for the first time you get a 
> blank result and a message that the person is not enrolled for any program 
> even when the person is enrolled for programs. You have to click on the back 
> button and then click on the tracked entity the second time for it work. I 
> think this happens when you open a new browser.
> 
> I tested this on the dhis2 demo site (http://apps.dhis2.org/demo) and my 
> experience was the same. 
> 
> Am not sure if this is peculiar to my computer or if its a general problem.
> 
> Thanks,
> Ese
> ___
> 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 20152: minor doc fix

2015-09-14 Thread noreply

revno: 20152
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-15 12:52:21 +0700
message:
  minor doc fix
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.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/JdbcAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2015-09-08 16:56:53 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2015-09-15 05:52:21 +
@@ -194,7 +194,7 @@
  * @param table analytics table to populate.
  * @param valueExpression numeric value expression.
  * @param textValueExpression textual value expression.
- * @param valueType data element value type to include data for.
+ * @param valueTypes data element value types to include data for.
  * @param whereClause where clause to constrain data query.
  */
 private void populateTable( AnalyticsTable table, String valueExpression, 

___
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 20151: minor, use AggregationType in ValidationUtils

2015-09-14 Thread noreply

revno: 20151
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-15 12:39:53 +0700
message:
  minor, use AggregationType in ValidationUtils
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.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-08-21 01:47:02 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java	2015-09-15 05:39:53 +
@@ -55,7 +55,7 @@
 
 private final String value;
 
-private AggregationType( String value )
+AggregationType( String value )
 {
 this.value = value;
 }

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java	2015-09-14 18:06:48 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java	2015-09-15 05:39:53 +
@@ -32,6 +32,7 @@
 import org.apache.commons.validator.routines.DateValidator;
 import org.apache.commons.validator.routines.EmailValidator;
 import org.apache.commons.validator.routines.UrlValidator;
+import org.hisp.dhis.analytics.AggregationType;
 import org.hisp.dhis.common.ValueType;
 import org.hisp.dhis.commons.util.TextUtils;
 import org.hisp.dhis.dataelement.DataElement;
@@ -43,8 +44,6 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import static org.hisp.dhis.dataelement.DataElement.*;
-
 /**
  * @author Lars Helge Overland
  */
@@ -388,10 +387,10 @@
  */
 public static boolean dataValueIsZeroAndInsignificant( String value, DataElement dataElement )
 {
-String aggOperator = dataElement.getAggregationOperator();
+AggregationType aggregationType = dataElement.getAggregationType();
 
 return dataElement.getValueType().isNumeric() && MathUtils.isZero( value ) && !dataElement.isZeroIsSignificant() &&
-!(AGGREGATION_OPERATOR_AVERAGE_SUM.equals( aggOperator ) || AGGREGATION_OPERATOR_AVERAGE.equals( aggOperator ));
+!(aggregationType == AggregationType.AVERAGE_SUM_ORG_UNIT || aggregationType == AggregationType.AVERAGE);
 }
 
 /**

___
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 20120: minor, remove some unused classes

2015-09-14 Thread noreply

revno: 20120
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-09-14 14:41:52 +0700
message:
  minor, remove some unused classes
removed:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/comparator/
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/comparator/DataElementIdComparator.java
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/comparator/PeriodStartDateComparator.java
modified:
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/interceptor/XWorkPortalMenuInterceptor.java
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/interceptor/XWorkPortalModuleInterceptor.java
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/interceptor/XWorkPortalParamsInterceptor.java
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/interceptor/XWorkPortalUserInterceptor.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
=== removed directory 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/comparator'
=== removed file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/comparator/DataElementIdComparator.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/comparator/DataElementIdComparator.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/comparator/DataElementIdComparator.java	1970-01-01 00:00:00 +
@@ -1,47 +0,0 @@
-package org.hisp.dhis.util.comparator;
-
-/*
- * 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.
- */
-
-import java.util.Comparator;
-
-import org.hisp.dhis.dataelement.DataElement;
-
-/**
- * @author Torgeir Lorange Ostby
- * @version $Id: DataElementIdComparator.java 2869 2007-02-20 14:26:09Z andegje $
- */
-public class DataElementIdComparator
-implements Comparator
-{
-@Override
-public int compare( DataElement dataElement0, DataElement dataElement1 )
-{
-return dataElement0.getId() - dataElement1.getId();
-}
-}

=== removed file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/comparator/PeriodStartDateComparator.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/comparator/PeriodStartDateComparator.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/comparator/PeriodStartDateComparator.java	1970-01-01 00:00:00 +
@@ -1,47 +0,0 @@
-package org.hisp.dhis.util.comparator;
-
-/*
- * 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 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20118: minor fixes, use j8 stream s in appmanager

2015-09-14 Thread noreply

revno: 20118
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-09-14 14:22:16 +0700
message:
  minor fixes, use j8 stream s in appmanager
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.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/appmanager/DefaultAppManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java	2015-08-18 20:10:50 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java	2015-09-14 07:22:16 +
@@ -47,8 +47,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
+import java.util.stream.Collectors;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 
@@ -98,7 +98,7 @@
 public App getApp( String key )
 {
 List apps = getApps();
-
+
 for ( App app : apps )
 {
 if ( key.equals( app.getKey() ) )
@@ -106,27 +106,14 @@
 return app;
 }
 }
-
+
 return null;
 }
 
 @Override
 public List getAccessibleApps()
 {
-List applications = new ArrayList<>( getApps() );
-Iterator iterator = applications.iterator();
-
-while ( iterator.hasNext() )
-{
-App app = iterator.next();
-
-if ( !isAccessible( app ) )
-{
-iterator.remove();
-}
-}
-
-return applications;
+return getApps().stream().filter( this::isAccessible ).collect( Collectors.toList() );
 }
 
 @Override

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java	2015-09-14 07:22:16 +
@@ -75,9 +75,6 @@
 @Autowired
 private AppManager appManager;
 
-@Autowired
-private CurrentUserService currentUserService;
-
 private ActionAccessResolver actionAccessResolver;
 
 public void setActionAccessResolver( ActionAccessResolver actionAccessResolver )

___
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 20119: more j8 streams in ModuleManager

2015-09-14 Thread noreply

revno: 20119
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-09-14 14:26:55 +0700
message:
  more j8 streams in ModuleManager
modified:
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java	2015-09-14 07:22:16 +
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java	2015-09-14 07:26:55 +
@@ -48,6 +48,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.stream.Collectors;
 
 /**
  * @author Torgeir Lorange Ostby
@@ -151,10 +152,7 @@
 List modules = getAccessibleMenuModules();
 List apps = appManager.getAccessibleApps();
 
-for ( App app : apps )
-{
-modules.add( Module.getModule( app ) );
-}
+modules.addAll( apps.stream().map( Module::getModule ).collect( Collectors.toList() ) );
 
 return modules;
 }
@@ -264,15 +262,9 @@
 
 private List getAccessibleModules( List modules )
 {
-List allowed = new ArrayList<>();
-
-for ( Module module : modules )
-{
-if ( module != null && actionAccessResolver.hasAccess( module.getName(), defaultActionName ) )
-{
-allowed.add( module );
-}
-}
+List allowed = modules.stream()
+.filter( module -> module != null && actionAccessResolver.hasAccess( module.getName(), defaultActionName ) )
+.collect( Collectors.toList() );
 
 if ( modules.size() > allowed.size() )
 {

___
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 20142: Support-system, cleanup

2015-09-14 Thread noreply

revno: 20142
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 20:06:48 +0200
message:
  Support-system, cleanup
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/collection/TaskLocalList.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/collection/TaskLocalMap.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/math/UnaryDoubleFunction.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/notification/InMemoryNotifier.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/process/OpenSessionThread.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/Scheduler.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AnnotationUtils.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java
  
dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/StreamUtilsTest.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/collection/TaskLocalList.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/collection/TaskLocalList.java	2015-06-15 13:44:20 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/collection/TaskLocalList.java	2015-09-14 18:06:48 +
@@ -40,7 +40,7 @@
  */
 public class TaskLocalList
 {
-private Map internalMap;
+private final Map internalMap;
 
 public TaskLocalList()
 {

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/collection/TaskLocalMap.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/collection/TaskLocalMap.java	2015-06-15 13:44:20 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/collection/TaskLocalMap.java	2015-09-14 18:06:48 +
@@ -38,7 +38,7 @@
  */
 public class TaskLocalMap
 {
-private Map> internalMap;
+private final Map> internalMap;
 
 public TaskLocalMap()
 {

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java	2015-01-22 17:53:46 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java	2015-09-14 18:06:48 +
@@ -53,7 +53,7 @@
 private static final String DELETE_METHOD_PREFIX = "delete";
 private static final String ALLOW_METHOD_PREFIX = "allowDelete";
 
-private List handlers = new ArrayList<>();
+private final List handlers = new ArrayList<>();
 
 // -
 // DeletionManager implementation

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java	2015-07-14 07:33:21 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java	2015-09-14 18:06:48 +
@@ -119,7 +119,7 @@
  */
 public abstract class DeletionHandler
 {
-protected final String ERROR = "";
+protected static final String ERROR = "";
 
 // -
 // Abstract methods

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java	2015-09-04 09:29:23 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java	2015-09-14 18:06:48 +
@@ -44,7 +44,7 @@
 {
 public static final 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20141: Web api, cleanup

2015-09-14 Thread noreply

revno: 20141
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 19:57:00 +0200
message:
  Web api, cleanup
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AccountController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AggregationQueryController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AppController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ChartController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/InterpretationController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MessageConversationController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/PdfFormController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SmsConfigurationController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SvgConversionController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/dataelement/DataElementController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/FormUtils.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/PdfDataEntryFormImportUtil.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/view/ClassPathUriResolver.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/view/JacksonJsonView.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/view/JacksonXmlView.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java	2015-09-14 09:13:10 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java	2015-09-14 17:57:00 +
@@ -28,13 +28,19 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.dataformat.xml.XmlMapper;
-import com.google.common.base.Enums;
-import com.google.common.base.Joiner;
-import com.google.common.base.Optional;
-import com.google.common.collect.Lists;
+import java.io.IOException;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import org.hisp.dhis.common.BaseIdentifiableObject;
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.IdentifiableObjectManager;
@@ -44,14 +50,13 @@
 import org.hisp.dhis.dxf2.common.ImportOptions;
 import org.hisp.dhis.dxf2.common.OrderOptions;
 import org.hisp.dhis.dxf2.common.TranslateParams;
-import org.hisp.dhis.fieldfilter.FieldFilterService;
 import org.hisp.dhis.dxf2.importsummary.ImportStatus;
 import org.hisp.dhis.dxf2.metadata.ImportService;
 import org.hisp.dhis.dxf2.metadata.ImportTypeSummary;
-import org.hisp.dhis.objectfilter.ObjectFilterService;
 import org.hisp.dhis.dxf2.render.DefaultRenderService;
 import org.hisp.dhis.dxf2.render.RenderService;
 import org.hisp.dhis.dxf2.webmessage.WebMessageException;
+import org.hisp.dhis.fieldfilter.FieldFilterService;
 import 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20143: Unused code

2015-09-14 Thread noreply

revno: 20143
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 20:12:51 +0200
message:
  Unused code
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.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/program/ProgramInstanceDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java	2015-09-13 21:12:28 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java	2015-09-14 18:12:51 +
@@ -60,13 +60,6 @@
 this.commentService = commentService;
 }
 
-private ProgramStageDataElementService programStageDEService;
-
-public void setProgramStageDEService( ProgramStageDataElementService programStageDEService )
-{
-this.programStageDEService = programStageDEService;
-}
-
 // -
 // Implementation methods
 // -

___
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 20144: Minor

2015-09-14 Thread noreply

revno: 20144
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 20:18:09 +0200
message:
  Minor
modified:
  dhis-2/dhis-support/pom.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-support/pom.xml'
--- dhis-2/dhis-support/pom.xml	2015-07-20 02:01:37 +
+++ dhis-2/dhis-support/pom.xml	2015-09-14 18:18:09 +
@@ -16,10 +16,10 @@
   
 dhis-support-external
 dhis-support-test
+dhis-support-commons
 dhis-support-hibernate
 dhis-support-system
 dhis-support-jdbc
-dhis-support-commons
   
   
 ../

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

2015-09-14 Thread Lorill Crees
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


[Dhis2-devs] Error 415 UNSUPPORTED_MEDIA_TYPE

2015-09-14 Thread moses mwale
Am trying to create a new dataElement using CSV format. this is what am
getting.

curl --data-binary @dataElements.csv "localhost:8082/api/dataElements" -H
"Content-Type:application/csv" -u admin:district -v

*   Trying ::1...
* Connected to localhost (::1) port 8082 (#0)
* Server auth using Basic with user 'admin'
> POST /api/dataElements HTTP/1.1
> Authorization: Basic YWRtaW46ZGlzdHJpY3Q=
> User-Agent: curl/7.40.0
> Host: localhost:8082
> Accept: */*
> Content-Type:application/csv
> Content-Length: 333
>
* upload completely sent off: 333 out of 333 bytes
< HTTP/1.1 415 Unsupported Media Type
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: DENY
< X-Content-Type-Options: nosniff
< Set-Cookie: JSESSIONID=1aaykhq834qennrisui46cx1z;Path=/
< Content-Type: text/html; charset=iso-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 1407
< Server: Jetty(6.1.x)
<



Error 415 UNSUPPORTED_MEDIA_TYPE

HTTP ERROR 415
Problem accessing /api/dataElements. Reason:
UNSUPPORTED_MEDIA_TYPEPowered by
Jetty://
___
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 415 UNSUPPORTED_MEDIA_TYPE

2015-09-14 Thread Morten Olav Hansen
Hi

I will let Lars give you the definitive answer.. but I think its currently
only possible to import CSV metadata through the UI, could you please try
that out and see if it works for you?

--
Morten

On Mon, Sep 14, 2015 at 1:19 PM, moses mwale  wrote:

> Am trying to create a new dataElement using CSV format. this is what am
> getting.
>
> curl --data-binary @dataElements.csv "localhost:8082/api/dataElements" -H
> "Content-Type:application/csv" -u admin:district -v
>
> *   Trying ::1...
> * Connected to localhost (::1) port 8082 (#0)
> * Server auth using Basic with user 'admin'
> > POST /api/dataElements HTTP/1.1
> > Authorization: Basic YWRtaW46ZGlzdHJpY3Q=
> > User-Agent: curl/7.40.0
> > Host: localhost:8082
> > Accept: */*
> > Content-Type:application/csv
> > Content-Length: 333
> >
> * upload completely sent off: 333 out of 333 bytes
> < HTTP/1.1 415 Unsupported Media Type
> < X-XSS-Protection: 1; mode=block
> < X-Frame-Options: DENY
> < X-Content-Type-Options: nosniff
> < Set-Cookie: JSESSIONID=1aaykhq834qennrisui46cx1z;Path=/
> < Content-Type: text/html; charset=iso-8859-1
> < Cache-Control: must-revalidate,no-cache,no-store
> < Content-Length: 1407
> < Server: Jetty(6.1.x)
> <
> 
> 
> 
> Error 415 UNSUPPORTED_MEDIA_TYPE
> 
> HTTP ERROR 415
> Problem accessing /api/dataElements. Reason:
> UNSUPPORTED_MEDIA_TYPEPowered by
> Jetty://
>
> ___
> 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] Error 415 UNSUPPORTED_MEDIA_TYPE

2015-09-14 Thread Lars Helge Øverland
Hi, that is correct. Meta-data CSV can only be imported through UI. It
would be feasible to add CSV to support to /metaData, we can do so later.

regards,

Lars


On Mon, Sep 14, 2015 at 8:29 AM, Morten Olav Hansen 
wrote:

> Hi
>
> I will let Lars give you the definitive answer.. but I think its currently
> only possible to import CSV metadata through the UI, could you please try
> that out and see if it works for you?
>
> --
> Morten
>
> On Mon, Sep 14, 2015 at 1:19 PM, moses mwale 
> wrote:
>
>> Am trying to create a new dataElement using CSV format. this is what am
>> getting.
>>
>> curl --data-binary @dataElements.csv "localhost:8082/api/dataElements" -H
>> "Content-Type:application/csv" -u admin:district -v
>>
>> *   Trying ::1...
>> * Connected to localhost (::1) port 8082 (#0)
>> * Server auth using Basic with user 'admin'
>> > POST /api/dataElements HTTP/1.1
>> > Authorization: Basic YWRtaW46ZGlzdHJpY3Q=
>> > User-Agent: curl/7.40.0
>> > Host: localhost:8082
>> > Accept: */*
>> > Content-Type:application/csv
>> > Content-Length: 333
>> >
>> * upload completely sent off: 333 out of 333 bytes
>> < HTTP/1.1 415 Unsupported Media Type
>> < X-XSS-Protection: 1; mode=block
>> < X-Frame-Options: DENY
>> < X-Content-Type-Options: nosniff
>> < Set-Cookie: JSESSIONID=1aaykhq834qennrisui46cx1z;Path=/
>> < Content-Type: text/html; charset=iso-8859-1
>> < Cache-Control: must-revalidate,no-cache,no-store
>> < Content-Length: 1407
>> < Server: Jetty(6.1.x)
>> <
>> 
>> 
>> 
>> Error 415 UNSUPPORTED_MEDIA_TYPE
>> 
>> HTTP ERROR 415
>> Problem accessing /api/dataElements. Reason:
>> UNSUPPORTED_MEDIA_TYPEPowered by
>> Jetty://
>>
>> ___
>> 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
>
>


-- 
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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20121: moved object/field filter to service-core module, added utility methods for creating nodes from o...

2015-09-14 Thread noreply

revno: 20121
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-09-14 16:13:10 +0700
message:
  moved object/field filter to service-core module, added utility methods for 
creating nodes from object/objects without field filtering
removed:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/FieldFilterService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/FieldMap.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/DefaultObjectFilterService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/FilterOps.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/Filters.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ObjectFilterService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/OpFactory.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/EmptyCollectionOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/EndsWithOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/EqOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/GtOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/GteOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/InOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/LikeOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/LtOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/LteOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/NLikeOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/NeqOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/NnullOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/NullOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/Op.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/OpStatus.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ops/StartsWithOp.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/parser/
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/parser/DefaultParserService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/parser/ParserService.java
added:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/DefaultFieldFilterService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/FieldFilterService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fieldfilter/FieldMap.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/DefaultObjectFilterService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/FilterOps.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/Filters.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/ObjectFilterService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/OpFactory.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/ops/
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/ops/EmptyCollectionOp.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/ops/EndsWithOp.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/ops/EqOp.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/objectfilter/ops/GtOp.java
  

[Dhis2-devs] question

2015-09-14 Thread ahmad alelewi






hi 
i have dhis2 source code and i tried to edit this code but i can't save what i 
edit in the code 
how i can save my new code and run dhis2 again with my edition ?!

  ___
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 20122: Minor

2015-09-14 Thread noreply

revno: 20122
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 11:21:13 +0200
message:
  Minor
modified:
  
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/tasks/DataIntegrityTask.java
  
dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/sqlview/SqlViewServiceTest.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-administration/src/main/java/org/hisp/dhis/dataintegrity/tasks/DataIntegrityTask.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/tasks/DataIntegrityTask.java	2015-05-28 18:21:56 +
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/tasks/DataIntegrityTask.java	2015-09-14 09:21:13 +
@@ -67,7 +67,7 @@
 // -
 // Constructors
 // -
-
+
 public DataIntegrityTask( TaskId taskId, DataIntegrityService dataIntegrityService, Notifier notifier )
 {
 this.taskId = taskId;

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/sqlview/SqlViewServiceTest.java'
--- dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/sqlview/SqlViewServiceTest.java	2015-09-13 22:09:08 +
+++ dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/sqlview/SqlViewServiceTest.java	2015-09-14 09:21:13 +
@@ -53,15 +53,15 @@
 @Autowired
 private SqlViewService sqlViewService;
 
-protected static final String SQL1 = "SELECT   *  FROM _categorystructure;;  ; ;;;  ;; ; ";
-
-protected static final String SQL2 = "SELECT COUNT(_ous.*) AS so_dem FROM _orgunitstructure AS _ous";
-
-protected static final String SQL3 = "SELECT COUNT(_cocn.*) AS so_dem, _icgss.indicatorid AS in_id"
+private String sqlA = "SELECT   *  FROM _categorystructure;;  ; ;;;  ;; ; ";
+
+private String sqlB = "SELECT COUNT(_ous.*) AS so_dem FROM _orgunitstructure AS _ous";
+
+private String sqlC = "SELECT COUNT(_cocn.*) AS so_dem, _icgss.indicatorid AS in_id"
 + "FROM _indicatorgroupsetstructure AS _icgss, _categoryoptioncomboname AS _cocn "
 + "GROUP BY _icgss.indicatorid;";
 
-protected static final String SQL4 = "SELECT de.name, dv.sourceid, dv.value, p.startdate "
+private String sqlD = "SELECT de.name, dv.sourceid, dv.value, p.startdate "
 + "FROM dataelement AS de, datavalue AS dv, period AS p " + "WHERE de.dataelementid=dv.dataelementid "
 + "AND dv.periodid=p.periodid LIMIT 10";
 
@@ -83,8 +83,8 @@
 @Test
 public void testAddSqlView()
 {
-SqlView sqlViewA = createSqlView( 'A', SQL1 );
-SqlView sqlViewB = createSqlView( 'B', SQL2 );
+SqlView sqlViewA = createSqlView( 'A', sqlA );
+SqlView sqlViewB = createSqlView( 'B', sqlB );
 
 int idA = sqlViewService.saveSqlView( sqlViewA );
 int idB = sqlViewService.saveSqlView( sqlViewB );
@@ -93,22 +93,22 @@
 sqlViewB = sqlViewService.getSqlView( idB );
 
 assertEquals( idA, sqlViewA.getId() );
-assertEq( 'A', sqlViewA, SQL1 );
+assertEq( 'A', sqlViewA, sqlA );
 
 assertEquals( idB, sqlViewB.getId() );
-assertEq( 'B', sqlViewB, SQL2 );
+assertEq( 'B', sqlViewB, sqlB );
 }
 
 @Test
 public void testUpdateSqlView()
 {
-SqlView sqlView = createSqlView( 'A', SQL1 );
+SqlView sqlView = createSqlView( 'A', sqlA );
 
 int id = sqlViewService.saveSqlView( sqlView );
 
 sqlView = sqlViewService.getSqlView( id );
 
-assertEq( 'A', sqlView, SQL1 );
+assertEq( 'A', sqlView, sqlA );
 
 sqlView.setName( "SqlViewC" );
 
@@ -118,8 +118,8 @@
 @Test
 public void testGetAndDeleteSqlView()
 {
-SqlView sqlViewA = createSqlView( 'A', SQL3 );
-SqlView sqlViewB = createSqlView( 'B', SQL4 );
+SqlView sqlViewA = createSqlView( 'A', sqlC );
+SqlView sqlViewB = createSqlView( 'B', sqlD );
 
 int idA = sqlViewService.saveSqlView( sqlViewA );
 int idB = sqlViewService.saveSqlView( sqlViewB );
@@ -141,8 +141,8 @@
 @Test
 public void testGetSqlViewByName()
 {
-SqlView sqlViewA = createSqlView( 'A', SQL1 );
-SqlView sqlViewB = createSqlView( 'B', SQL2 );
+SqlView sqlViewA = createSqlView( 'A', sqlA );
+SqlView sqlViewB = createSqlView( 'B', sqlB );
 
 int idA = 

Re: [Dhis2-devs] question

2015-09-14 Thread Knut Staring
Hello, quoting Jason's earlier reply: "After you have made the changes you
wish, just invoke build.sh in the dhis-2 directory. This will build a new
war file, which you can then deploy to Tomcat and your changes should be
visible."



On Mon, Sep 14, 2015 at 11:18 AM, ahmad alelewi 
wrote:

>
>
> --
>
> hi
> i have dhis2 source code and i tried to edit this code but i can't save
> what i edit in the code
> how i can save my new code and run dhis2 again with my edition ?!
>
> ___
> 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] [Dhis2-users] new app in appstore: custom js/css

2015-09-14 Thread riddy ndoma
Great !

2015-09-10 15:33 GMT+01:00 Lars Helge Øverland :

> Hi,
>
> there is a new app on the app store: Custom JS/CSS:
>
> https://www.dhis2.org/appstore
>
> Custom JS/CSS is an app that lets you create and maintain custom
> Javascript and CSS content for your DHIS 2 instance. The Javascript and CSS
> can be used to override existing look or behavior or add new, such as
> modifying the look of the login page. This app is a front-end to the files
> Web API resource.
>
> You can check it out here:
>
> https://apps.dhis2.org/demo/api/apps/customjscss/index.html
>
> Thanks to Victor Garcia for the contribution.
>
> regards,
>
> Lars
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Riddy NDOMA
Software Developer
*Skype:* riddyndoma, *G+:* riddyndoma, *FB:* riddy ndoma
*Twitter:* riddyndoma, *LinkedIn:* riddy ndoma
*Blog:* http://riddyndoma.blogspot.com/
*Vous servir est mon désire (Serving you is my desire)*
___
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 20123: Removed interface

2015-09-14 Thread noreply

revno: 20123
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 12:00:50 +0200
message:
  Removed interface
removed:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/DataMartEngine.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/BaseChart.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/chart/BaseChart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/BaseChart.java	2015-03-31 13:49:41 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/BaseChart.java	2015-09-14 10:00:50 +
@@ -67,6 +67,7 @@
 public static final String SIZE_NORMAL = "normal";
 public static final String SIZE_WIDE = "wide";
 public static final String SIZE_TALL = "tall";
+
 public static final String TYPE_COLUMN = "column";
 public static final String TYPE_STACKED_COLUMN = "stackedcolumn";
 public static final String TYPE_BAR = "bar";

=== removed directory 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart'
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/DataMartEngine.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/DataMartEngine.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/DataMartEngine.java	1970-01-01 00:00:00 +
@@ -1,82 +0,0 @@
-package org.hisp.dhis.datamart;
-
-/*
- * 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.
- */
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.scheduling.TaskId;
-
-/**
- * @author Lars Helge Overland
- */
-public interface DataMartEngine
-{
-final String ID = DataMartEngine.class.getName();
-
-final Set DUMMY_ORG_UNIT_GROUPS = new HashSet()
-{ {
-add( null );
-} };
-
-/**
- * Exports aggregated values to the data mart tables.
- * 
- * @param dataElementIds the data element identifiers.
- * @param indicatorIds the indicator identifiers.
- * @param periodIds the period identifiers.
- * @param organisationUnitIds the organisation unit identifiers.
- * @param processState the state object.
- */
-void export( Collection dataElementIds, Collection indicatorIds,
-Collection periodIds, Collection organisationUnitIds );
-
-/**
- * Exports aggregated values to the data mart tables.
- * 
- * @param periodIds the period identifiers.
- * @param id the task identifier.
- */
-void export( Collection periodIds, TaskId id );
-
-/**
- * Exports aggregated values to the data mart tables.
- * 
- * @param dataElementIds the data element identifiers.
- * @param indicatorIds the indicator identifiers.
- * @param periodIds the period identifiers.
- * @param organisationUnitIds the organisation unit identifiers.
- * @param organisationUnitGroupIds the organisation unit group identifiers.
- * @param id the task identifier.
- */
-void export( Collection dataElementIds, Collection indicatorIds,

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20124: Unused code

2015-09-14 Thread noreply

revno: 20124
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-09-14 12:09:19 +0200
message:
  Unused code
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/Option.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.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/option/Option.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/Option.java	2015-07-13 12:34:39 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/Option.java	2015-09-14 10:09:19 +
@@ -45,7 +45,6 @@
 {
 public Option()
 {
-
 }
 
 public Option( String name, String code )

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-09-13 17:00:06 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-09-14 10:09:19 +
@@ -89,7 +89,7 @@
 public static final String FEATURETYPE_MULTIPOLYGON = "MultiPolygon";
 public static final String FEATURETYPE_POLYGON = "Polygon";
 public static final String FEATURETYPE_POINT = "Point";
-public static final String RESULTTYPE_SYMBOL = "Symbol";
+public static final String FEATURETYPE_SYMBOL = "Symbol";
 
 public static final String KEY_USER_ORGUNIT = "USER_ORGUNIT";
 public static final String KEY_USER_ORGUNIT_CHILDREN = "USER_ORGUNIT_CHILDREN";

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java	2015-09-14 07:26:55 +
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java	2015-09-14 10:09:19 +
@@ -28,17 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.opensymphony.xwork2.config.Configuration;
-import com.opensymphony.xwork2.config.entities.PackageConfig;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.struts2.dispatcher.Dispatcher;
-import org.hisp.dhis.appmanager.App;
-import org.hisp.dhis.appmanager.AppManager;
-import org.hisp.dhis.security.ActionAccessResolver;
-import org.hisp.dhis.user.CurrentUserService;
-import org.springframework.beans.factory.annotation.Autowired;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -50,6 +39,17 @@
 import java.util.Set;
 import java.util.stream.Collectors;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.dispatcher.Dispatcher;
+import org.hisp.dhis.appmanager.App;
+import org.hisp.dhis.appmanager.AppManager;
+import org.hisp.dhis.security.ActionAccessResolver;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.config.Configuration;
+import com.opensymphony.xwork2.config.entities.PackageConfig;
+
 /**
  * @author Torgeir Lorange Ostby
  * @version $Id: DefaultModuleManager.java 4883 2008-04-12 13:12:54Z larshelg $

___
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 20125: tracker-capture: minor refactoring

2015-09-14 Thread noreply

revno: 20125
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Mon 2015-09-14 12:11:37 +0200
message:
  tracker-capture: minor refactoring
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-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/relationship/relationship-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js	2015-09-11 15:16:03 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js	2015-09-14 10:11:37 +
@@ -465,9 +465,6 @@
 
 if($scope.showRegistrationDiv){
 $scope.showTrackedEntityDiv = false;
-/*$timeout(function() { 
-$rootScope.$broadcast('registrationWidget', {registrationMode: 'RELATIONSHIP'});
-}, 100);*/
 }
 else{
 $scope.showTrackedEntityDiv = true;
@@ -562,20 +559,22 @@
 
 var selections = CurrentSelection.get();
 $scope.optionSets = selections.optionSets;
-$scope.programs = selections.prs;
+$scope.programs = selections.prs;
+
+var getProgramAttributes = function(program){
+AttributesFactory.getByProgram(program).then(function(atts){
+$scope.attributes = atts;
+});
+};
   
 if(angular.isObject($scope.programs) && $scope.programs.length === 1){
 $scope.selectedProgramForRelative = $scope.programs[0];
-AttributesFactory.getByProgram($scope.selectedProgramForRelative).then(function(atts){
-$scope.attributes = atts;
-});
+getProgramAttributes($scope.selectedProgramForRelative);
 }  
 
 //watch for selection of program
-$scope.$watch('selectedProgramForRelative', function() {
-AttributesFactory.getByProgram($scope.selectedProgramForRelative).then(function(atts){
-$scope.attributes = atts;
-});
+$scope.$watch('selectedProgramForRelative', function() {
+getProgramAttributes($scope.selectedProgramForRelative);
 }); 
 
 $scope.trackedEntities = {available: []};

___
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 20126: remove value type String constants from DataElement

2015-09-14 Thread noreply

revno: 20126
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-09-14 17:15:27 +0700
message:
  remove value type String constants from DataElement
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/QueryServiceTest.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/util/Dhis14ObjectMappingUtil.java
  
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14TypeHandler.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.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/common/ValueType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-08 17:04:23 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-14 10:15:27 +
@@ -106,73 +106,4 @@
 {
 return this == DATE || this == DATETIME;
 }
-
-// TODO keeping this in for now, legacy reasons
-public static ValueType getFromDataElementTypes( String type, String numberType, String textType )
-{
-if ( DataElement.VALUE_TYPE_STRING.equals( type ) )
-{
-if ( DataElement.VALUE_TYPE_LONG_TEXT.equals( textType ) )
-{
-return ValueType.LONG_TEXT;
-}
-else
-{
-return ValueType.TEXT;
-}
-}
-else if ( DataElement.VALUE_TYPE_INT.equals( type ) )
-{
-if ( DataElement.VALUE_TYPE_UNIT_INTERVAL.equals( numberType ) )
-{
-return ValueType.UNIT_INTERVAL;
-}
-else if ( DataElement.VALUE_TYPE_PERCENTAGE.equals( numberType ) )
-{
-return ValueType.PERCENTAGE;
-}
-else if ( DataElement.VALUE_TYPE_INT.equals( numberType ) )
-{
-return ValueType.INTEGER;
-}
-else if ( DataElement.VALUE_TYPE_POSITIVE_INT.equals( numberType ) )
-{
-return ValueType.INTEGER_POSITIVE;
-}
-else if ( DataElement.VALUE_TYPE_ZERO_OR_POSITIVE_INT.equals( numberType ) )
-{
-return ValueType.INTEGER_ZERO_OR_POSITIVE;
-}
-else if ( DataElement.VALUE_TYPE_NEGATIVE_INT.equals( numberType ) )
-{
-return ValueType.INTEGER_NEGATIVE;
-}
-else
-{
-return ValueType.NUMBER;
-}
-}
-else if ( DataElement.VALUE_TYPE_BOOL.equals( type ) )
-{
-return ValueType.BOOLEAN;
-}
-else if ( DataElement.VALUE_TYPE_TRUE_ONLY.equals( type ) )
-{
-return ValueType.TRUE_ONLY;
-}
-else if ( DataElement.VALUE_TYPE_DATE.equals( type ) )
-{
-return ValueType.DATE;
-}
-else if ( DataElement.VALUE_TYPE_DATETIME.equals( type ) )
-{
-return ValueType.DATETIME;
-}
-else if ( DataElement.VALUE_TYPE_USER_NAME.equals( type ) )
-{
-return ValueType.USERNAME;
-}
-
-return ValueType.TEXT; // Fall back
-}
 }

=== 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-04 10:49:08 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-14 10:15:27 +
@@ -93,23 +93,6 @@
  */
 private static final long serialVersionUID = -713154188046669L;
 
-public static final String VALUE_TYPE_INT = "int";
-public static final String VALUE_TYPE_STRING = "string";
-public static final String VALUE_TYPE_USER_NAME = "username";
-public static final String VALUE_TYPE_BOOL = "bool";
-public static final String VALUE_TYPE_TRUE_ONLY = "trueOnly";
-public static final String VALUE_TYPE_DATE = "date";
-public static final String VALUE_TYPE_DATETIME = "datetime";
-public static final String VALUE_TYPE_UNIT_INTERVAL = "unitInterval";
-public static final String VALUE_TYPE_PERCENTAGE = "percentage";
-
-public static final String VALUE_TYPE_NUMBER = "number";
-public static final String VALUE_TYPE_POSITIVE_INT 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20127: cleanup in excelutils, keeping openWorkbook for now

2015-09-14 Thread noreply

revno: 20127
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-09-14 17:20:41 +0700
message:
  cleanup in excelutils, keeping openWorkbook for now
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java	2015-09-14 10:15:27 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java	2015-09-14 10:20:41 +
@@ -30,266 +30,16 @@
 
 import jxl.Workbook;
 import jxl.WorkbookSettings;
-import jxl.format.Colour;
-import jxl.format.UnderlineStyle;
-import jxl.write.Label;
-import jxl.write.WritableCellFormat;
-import jxl.write.WritableFont;
-import jxl.write.WritableSheet;
 import jxl.write.WritableWorkbook;
-import jxl.write.WriteException;
-import jxl.write.biff.RowsExceededException;
-import org.hisp.dhis.common.Grid;
-import org.hisp.dhis.common.GridHeader;
-import org.hisp.dhis.databrowser.MetaValue;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.expression.ExpressionService;
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
 
 /**
  * @author Dang Duy Hieu
  */
 public class ExcelUtils
 {
-public static final WritableCellFormat FORMAT_LABEL = new WritableCellFormat( new WritableFont( WritableFont.ARIAL, 13,
-WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.BLACK ) );
-
-public static final WritableCellFormat FORMAT_TEXT = new WritableCellFormat( new WritableFont( WritableFont.ARIAL, 11,
-WritableFont.NO_BOLD, false ) );
-
-public static void printDataElementHeaders( WritableSheet sheet, I18n i18n, int row,
-int column )
-throws RowsExceededException, WriteException
-{
-sheet.addCell( new Label( column++, row, i18n.getString( "name" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "short_name" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "code" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "description" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "active" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "type" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "aggregation_operator" ), FORMAT_LABEL ) );
-}
-
-public static void addDataElementCellToSheet( WritableSheet sheet, DataElement element,
-I18n i18n, int row, int column )
-throws RowsExceededException, WriteException
-{
-sheet.addCell( new Label( column++, row, element.getName(), FORMAT_TEXT ) );
-sheet.addCell( new Label( column++, row, element.getShortName(), FORMAT_TEXT ) );
-sheet.addCell( new Label( column++, row, element.getCode(), FORMAT_TEXT ) );
-sheet.addCell( new Label( column++, row, element.getDescription(), FORMAT_TEXT ) );
-// sheet.addCell( new Label( column++, row, getType().get( element.getType() ), FORMAT_TEXT ) );
-sheet.addCell( new Label( column++, row, getAggregationOperator().get( element.getAggregationOperator() ),
-FORMAT_TEXT ) );
-}
-
-public static void printIndicatorHeaders( WritableSheet sheet, I18n i18n, int row,
-int column )
-throws RowsExceededException, WriteException
-{
-sheet.addCell( new Label( column++, row, i18n.getString( "name" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "short_name" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "code" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "description" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "annualized" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "indicator_type" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "numerator_description" ), FORMAT_LABEL ) );
-sheet.addCell( new Label( column++, row, i18n.getString( "numerator_formula" ), 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20128: fix for data element csv import, use valueType instead of type/numberType etc.

2015-09-14 Thread noreply

revno: 20128
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-09-14 17:23:17 +0700
message:
  fix for data element csv import, use valueType instead of type/numberType etc.
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java	2015-09-14 10:15:27 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java	2015-09-14 10:23:17 +
@@ -193,21 +193,14 @@
 
 String domainType = getSafe( values, 6, DataElementDomain.AGGREGATE.getValue(), 16 );
 object.setDomainType( DataElementDomain.fromValue( domainType ) );
-
-/* TODO fixme
-object.setValueType( ValueType.getFromDataElementTypes(
-getSafe( values, 7, DataElement.VALUE_TYPE_INT, 16 ),
-getSafe( values, 8, DataElement.VALUE_TYPE_NUMBER, 16 ),
-getSafe( values, 9, null, 16 )
-) );
-*/
-
-object.setAggregationOperator( getSafe( values, 10, DataElement.AGGREGATION_OPERATOR_SUM, 16 ) );
-String categoryComboUid = getSafe( values, 11, null, 11 );
-object.setUrl( getSafe( values, 12, null, 255 ) );
-object.setZeroIsSignificant( Boolean.valueOf( getSafe( values, 13, "false", null ) ) );
-String optionSetUid = getSafe( values, 14, null, 11 );
-String commentOptionSetUid = getSafe( values, 15, null, 11 );
+object.setValueType( ValueType.valueOf( getSafe( values, 7, ValueType.TEXT.toString(), 50 ) ) );
+
+object.setAggregationOperator( getSafe( values, 8, DataElement.AGGREGATION_OPERATOR_SUM, 16 ) );
+String categoryComboUid = getSafe( values, 9, null, 11 );
+object.setUrl( getSafe( values, 10, null, 255 ) );
+object.setZeroIsSignificant( Boolean.valueOf( getSafe( values, 11, "false", null ) ) );
+String optionSetUid = getSafe( values, 12, null, 11 );
+String commentOptionSetUid = getSafe( values, 13, null, 11 );
 
 if ( categoryComboUid != null )
 {

___
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