[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18547: skipping criteria optimization for Enums for now

2015-03-10 Thread noreply

revno: 18547
committer: Morten Olav Hansen morte...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 15:33:22 +0530
message:
  skipping criteria optimization for Enums for now
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryService.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/query/DefaultQueryService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryService.java	2015-03-09 08:57:50 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryService.java	2015-03-10 10:03:22 +
@@ -141,7 +141,7 @@
 
 Property property = schema.getProperty( split[0] );
 
-if ( property == null || !property.isPersisted() || !property.isSimple() )
+if ( property == null || !property.isPersisted() || !property.isSimple() || Enum.class.isAssignableFrom( property.getKlass() ) )
 {
 return 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 18555: Analysis apps, sharing bug fixed.

2015-03-10 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 18555 [merge]
committer: Jan Henrik Overland janhenrik.overl...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 12:41:55 +0100
message:
  Analysis apps, sharing bug fixed.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-03-10 10:22:55 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-03-10 11:32:27 +
@@ -3293,7 +3293,7 @@
 ];
 
 if (isPublicAccess) {
-	data.unshift({id: '---', name: NS.i18n.none});
+	data.unshift({id: '', name: NS.i18n.none});
 }
 
 return data;

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2015-03-05 17:32:21 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2015-03-10 11:32:27 +
@@ -2652,7 +2652,7 @@
 ];
 
 if (isPublicAccess) {
-	data.unshift({id: '---', name: NS.i18n.none});
+	data.unshift({id: '', name: NS.i18n.none});
 }
 
 return data;

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js	2015-03-05 17:32:21 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js	2015-03-10 11:32:27 +
@@ -2330,7 +2330,7 @@
 ];
 
 if (isPublicAccess) {
-	data.unshift({id: '---', name: GIS.i18n.none});
+	data.unshift({id: '', name: GIS.i18n.none});
 }
 
 return data;

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2015-03-09 13:15:43 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2015-03-10 11:32:27 +
@@ -1573,7 +1573,7 @@
 ];
 
 if (isPublicAccess) {
-	data.unshift({id: '---', name: NS.i18n.none});
+	data.unshift({id: '', name: NS.i18n.none});
 }
 
 return data;
@@ -5461,7 +5461,7 @@
 window.open(url, isNewTab ? '_blank' : '_top');
 }
 }
-};
+};
 
 		downloadButton = Ext.create('Ext.button.Button', {
 text: NS.i18n.download,

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js	2015-03-09 13:15:43 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js	2015-03-10 11:32:27 +
@@ -1690,7 +1690,7 @@
 ];
 
 if (isPublicAccess) {
-	data.unshift({id: '---', name: NS.i18n.none});
+	data.unshift({id: '', name: NS.i18n.none});
 }
 
 return data;

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


[Dhis2-devs] [Bug 1430226] [NEW] Multi-org unit data entry does not work below offline org unit level

2015-03-10 Thread Lars Helge Øverland
Public bug reported:

In data entry, it is not possible to select multi-org unit data sets if
selecting an org unit if is below the offline org unit levels. As an
example, if the offline org unit levels system setting is set to 2, you
cannot select multi-org unit data sets at level 3. No data sets are
listed as multi-org unit in the data set list.

** Affects: dhis2
 Importance: High
 Assignee: Morten Olav Hansen (mortenoh)
 Status: Confirmed

** Changed in: dhis2
 Assignee: (unassigned) = Morten Olav Hansen (mortenoh)

** Changed in: dhis2
   Importance: Undecided = High

** Changed in: dhis2
   Status: New = Confirmed

** Changed in: dhis2
Milestone: None = 2.19

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

Title:
  Multi-org unit data entry does not work below offline org unit level

Status in DHIS 2:
  Confirmed

Bug description:
  In data entry, it is not possible to select multi-org unit data sets
  if selecting an org unit if is below the offline org unit levels. As
  an example, if the offline org unit levels system setting is set to 2,
  you cannot select multi-org unit data sets at level 3. No data sets
  are listed as multi-org unit in the data set list.

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

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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18550: ER default range value bug fixed.

2015-03-10 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 18550 [merge]
committer: Jan Henrik Overland janhenrik.overl...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 11:25:29 +0100
message:
  ER default range value bug fixed.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-03-05 17:32:21 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-03-10 10:22:55 +
@@ -398,6 +398,11 @@
 
 this.pendingValue = null;
 }
+
+if (!this.getValue()) {
+this.pendingValue = defaultRangeSetId;
+this.setPendingValue();
+}
 },
 store: Ext.create('Ext.data.Store', {
 fields: [idProperty, nameProperty]

___
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 18557: Fixed bug - Exception thrown when to create new, rename, update data element Group member in View...

2015-03-10 Thread noreply

revno: 18557
committer: Tran Chautran.hispviet...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 18:58:42 +0700
message:
  Fixed bug - Exception thrown when to create new, rename, update data element 
Group member in View 1 and 2; and no group is displayed when a DE is selected 
in View 2 ( Data Element Group Editor form )
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/AssignGroupsForDataElementAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetAssignedGroupsByDataElementAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView.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-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/AssignGroupsForDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/AssignGroupsForDataElementAction.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/AssignGroupsForDataElementAction.java	2015-03-10 11:58:42 +
@@ -58,9 +58,9 @@
 // Input  Output
 // -
 
-private Integer dataElementId;
+private String dataElementId;
 
-public void setDataElementId( Integer dataElementId )
+public void setDataElementId( String dataElementId )
 {
 this.dataElementId = dataElementId;
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetAssignedGroupsByDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetAssignedGroupsByDataElementAction.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetAssignedGroupsByDataElementAction.java	2015-03-10 11:58:42 +
@@ -61,9 +61,9 @@
 // Input  Output
 // -
 
-private Integer dataElementId;
+private String dataElementId;
 
-public void setDataElementId( Integer dataElementId )
+public void setDataElementId( String dataElementId )
 {
 this.dataElementId = dataElementId;
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm	2014-08-28 09:15:48 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm	2015-03-10 11:58:42 +
@@ -1,12 +1,16 @@
 script type=text/javascript
 	var dataElementGroups = new Array();
+	var dataElementGroupShortNames = new Array();
+	var dataElementGroupCodes = new Array();
 	#foreach( $dataElementGroup in $dataElementGroups )
 dataElementGroups['$dataElementGroup.id'] = '$encoder.jsEscape( $dataElementGroup.displayName, ' )';
+		dataElementGroupShortNames['$dataElementGroup.id'] = '$!encoder.jsEscape( $dataElementGroup.shortName, ' )';
+		dataElementGroupCodes['$dataElementGroup.id'] = '$!encoder.jsEscape( $dataElementGroup.code, ' )';
 	#end
 
 	var availableDataElements = new Array();
 	#foreach( $dataElement in $dataElements )
-		availableDataElements['$dataElement.id'] = '$encoder.jsEscape( $dataElement.displayName, ' )';
+		availableDataElements['$dataElement.uid'] = '$encoder.jsEscape( $dataElement.displayName, ' )';
 	#end
 	var selectedDataElements = new Array();
 
@@ -17,7 +21,7 @@
 	var i18n_new = '$encoder.jsEscape( $i18n.getString( new ) , ')';
 	var i18n_save = '$encoder.jsEscape( $i18n.getString( save ) , ')';
 	var i18n_rename = '$encoder.jsEscape( $i18n.getString( rename ) , ')';
-	
+	var i18n_this_field_is_required = '$encoder.jsEscape( $i18n.getString( 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18558: Minor

2015-03-10 Thread noreply

revno: 18558
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 13:19:24 +0100
message:
  Minor
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/CriteriaQueryEngine.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.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/query/CriteriaQueryEngine.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/CriteriaQueryEngine.java	2015-03-09 08:57:50 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/CriteriaQueryEngine.java	2015-03-10 12:19:24 +
@@ -196,12 +196,12 @@
 }
 case IN:
 {
-if ( !Collection.class.isInstance( parameters.get( 0 ) ) || ((Collection) parameters.get( 0 )).isEmpty() )
+if ( !Collection.class.isInstance( parameters.get( 0 ) ) || ((Collection?) parameters.get( 0 )).isEmpty() )
 {
 return null;
 }
 
-return Restrictions.in( property.getFieldName(), (Collection) parameters.get( 0 ) );
+return Restrictions.in( property.getFieldName(), (Collection?) parameters.get( 0 ) );
 }
 }
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java	2015-03-06 06:57:45 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java	2015-03-10 12:19:24 +
@@ -129,7 +129,7 @@
 
 LocalSessionFactoryBean sessionFactoryBean = getLocalSessionFactoryBean();
 SessionFactoryImplementor sessionFactoryImplementor = (SessionFactoryImplementor) sessionFactory;
-Iterator collectionIterator = sessionFactoryBean.getConfiguration().getCollectionMappings();
+Iterator? collectionIterator = sessionFactoryBean.getConfiguration().getCollectionMappings();
 
 while ( collectionIterator.hasNext() )
 {
@@ -182,7 +182,6 @@
 return (LocalSessionFactoryBean) context.getBean( sessionFactory );
 }
 
-@SuppressWarnings( unused )
 protected MapString, Property getPropertiesFromHibernate( Class? klass )
 {
 updateJoinTables();

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

2015-03-10 Thread noreply

revno: 18551
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 12:19:30 +0100
message:
  Minor
modified:
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.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-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java	2015-03-09 17:44:08 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java	2015-03-10 11:19:30 +
@@ -187,7 +187,7 @@
 @Override
 public String getProgramIndicatorValue( ProgramInstance programInstance, ProgramIndicator programIndicator )
 {
-Double value = getValue( programInstance, programIndicator.getValueType(), programIndicator.getExpression() );
+Double value = getValue( programInstance, programIndicator );
 
 if ( value != null )
 {
@@ -376,12 +376,12 @@
 // Supportive methods
 // -
 
-private Double getValue( ProgramInstance programInstance, String valueType, String expression )
+private Double getValue( ProgramInstance programInstance, ProgramIndicator indicator )
 {
 StringBuffer description = new StringBuffer();
 
 Pattern pattern = Pattern.compile( ProgramIndicator.regExp );
-Matcher matcher = pattern.matcher( expression );
+Matcher matcher = pattern.matcher( indicator.getExpression() );
 
 while ( matcher.find() )
 {
@@ -409,7 +409,7 @@
 
 String value = dataValue.getValue();
 
-if ( valueType.equals( ProgramIndicator.VALUE_TYPE_INT )  
+if ( indicator.getValueType().equals( ProgramIndicator.VALUE_TYPE_INT )  
 ( dataElement == null || dataElement.getType().equals( DataElement.VALUE_TYPE_DATE ) ) )
 {
 value = DateUtils.daysBetween( new Date(), DateUtils.getDefaultDate( value ) ) +  ;

___
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 18556: Minor fix.

2015-03-10 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 18556 [merge]
committer: Jan Henrik Overland janhenrik.overl...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 12:51:08 +0100
message:
  Minor fix.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/styles/style.css


--
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-mapping/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/styles/style.css	2015-02-24 12:15:47 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/styles/style.css	2015-03-10 11:49:44 +
@@ -860,7 +860,7 @@
 	opacity: 0.92;
 	filter: alpha(opacity=92);
 	-ms-filter: alpha(opacity=92);
-	padding: 5px 8px 4px 8px;
+	padding: 6px 8px 6px 8px;
 	border-bottom-left-radius: 2px;
 	border-bottom-right-radius: 2px;
 	color: #fff;

___
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 18553: SQL views. Impl support for materialized sql views.

2015-03-10 Thread noreply

revno: 18553
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 12:36:58 +0100
message:
  SQL views. Impl support for materialized sql views.
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewType.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewStore.java
  
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java
  
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java
  
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/jdbc/JdbcSqlViewStore.java
  
dhis-2/dhis-services/dhis-service-administration/src/main/resources/org/hisp/dhis/sqlview/hibernate/SqlView.hbm.xml
  
dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/sqlview/SqlViewServiceTest.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  
dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/sqlview/AddSqlViewAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/sqlview/RemoveSqlViewAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/sqlview/ValidateAddUpdateSqlViewAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateSqlViewForm.vm


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java	2015-02-26 15:21:29 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java	2015-03-10 11:36:58 +
@@ -74,7 +74,7 @@
 
 private String sqlQuery;
 
-private boolean query;
+private SqlViewType type;
 
 // -
 // Constructors
@@ -84,11 +84,11 @@
 {
 }
 
-public SqlView( String name, String sqlQuery, boolean query )
+public SqlView( String name, String sqlQuery, SqlViewType type )
 {
 this.name = name;
 this.sqlQuery = sqlQuery;
-this.query = query;
+this.type = type;
 }
 
 // -
@@ -176,6 +176,14 @@
 return this;
 }
 
+/**
+ * Indicates whether this SQL view is a query.
+ */
+public boolean isQuery()
+{
+return SqlViewType.QUERY.equals( type );
+}
+
 // -
 // Getters and setters
 // -
@@ -210,16 +218,15 @@
 @JsonProperty
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
-public boolean isQuery()
+public SqlViewType getType()
 {
-return query;
+return type;
 }
 
-public void setQuery( boolean query )
+public void setType( SqlViewType type )
 {
-this.query = query;
+this.type = type;
 }
-
 
 @Override
 public void mergeWith( IdentifiableObject other, MergeStrategy strategy )
@@ -234,13 +241,13 @@
 {
 description = sqlView.getDescription();
 sqlQuery = sqlView.getSqlQuery();
-query = sqlView.isQuery();
+type = sqlView.getType();
 }
 else if ( strategy.isMerge() )
 {
 description = sqlView.getDescription() == null ? description : sqlView.getDescription();
 sqlQuery = sqlView.getSqlQuery() == null ? sqlQuery : sqlView.getSqlQuery();
-query = sqlView.isQuery();
+type = sqlView.getType() == null ? type : sqlView.getType();
 }
 }
 }

=== modified file 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18561: Fixed inner and outer boundary being merged instead of separated in Polygons and MultiPolygons. H...

2015-03-10 Thread noreply

revno: 18561
committer: Halvdan Hoem Grelland halvda...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 13:47:37 +0100
message:
  Fixed inner and outer boundary being merged instead of separated in Polygons 
and MultiPolygons. Holes will now appear corectly for imported GML
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.xsl


--
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/resources/gml/gml2dxf2.xsl'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.xsl	2015-03-05 16:05:19 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.xsl	2015-03-10 12:47:37 +
@@ -8,8 +8,10 @@
 xsl:param name=precision4/xsl:param
 
 xsl:template match=gml:coordinates
+  xsl:text[/xsl:text
   xsl:value-of select=java:gmlCoordinatesToString(normalize-space(.),$precision)
 disable-output-escaping=yes/
+  xsl:text]/xsl:text
   xsl:if test=position() != last()
 xsl:text,/xsl:text
   /xsl:if
@@ -17,15 +19,14 @@
 
 xsl:template match=gml:pos
   xsl:value-of select=java:gmlPosToString(normalize-space(.),$precision)
-disable-output-escaping=yes/
-  xsl:if test=position() != last()
-xsl:text,/xsl:text
-  /xsl:if
+disable-output-escaping=yes /
 /xsl:template
 
 xsl:template match=gml:posList
+  xsl:text[/xsl:text
   xsl:value-of select=java:gmlPosListToString(normalize-space(.),$precision)
 disable-output-escaping=yes/
+  xsl:text]/xsl:text
   xsl:if test=position() != last()
 xsl:text,/xsl:text
   /xsl:if
@@ -34,10 +35,10 @@
 xsl:template match=gml:Polygon
   featureTypePolygon/featureType
   coordinates
-xsl:text[[[/xsl:text
+xsl:text[[/xsl:text
 xsl:apply-templates select=.//gml:coordinates/
 xsl:apply-templates select=.//gml:posList/
-xsl:text]]]/xsl:text
+xsl:text]]/xsl:text
 xsl:if test=position() != last()
   xsl:text,/xsl:text
 /xsl:if

___
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 18560: System info, added last analytics success time

2015-03-10 Thread noreply

revno: 18560
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 13:37:21 +0100
message:
  System info, added last analytics success time
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/SystemInfo.java


--
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/system/DefaultSystemService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java	2015-02-27 10:04:29 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java	2015-03-10 12:37:21 +
@@ -28,26 +28,29 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.setting.SystemSettingManager.KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Properties;
+
 import org.apache.commons.io.IOUtils;
 import org.hisp.dhis.calendar.CalendarService;
 import org.hisp.dhis.configuration.Configuration;
 import org.hisp.dhis.configuration.ConfigurationService;
 import org.hisp.dhis.external.location.LocationManager;
 import org.hisp.dhis.external.location.LocationManagerException;
+import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.database.DatabaseInfoProvider;
 import org.hisp.dhis.system.util.SystemUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.io.ClassPathResource;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Properties;
-
 /**
  * @author Lars Helge Overland
  */
@@ -65,7 +68,10 @@
 
 @Autowired
 private CalendarService calendarService;
-
+
+@Autowired
+private SystemSettingManager systemSettingManager;
+
 private SystemInfo systemInfo = null;
 
 // -
@@ -86,6 +92,7 @@
 
 systemInfo.setCalendar( calendarService.getSystemCalendar().name() );
 systemInfo.setDateFormat( calendarService.getSystemDateFormat().getJs() );
+systemInfo.setLastAnalyticsTableSuccess( (Date) systemSettingManager.getSystemSetting( KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE ) );
 
 // -
 // Version

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/SystemInfo.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/SystemInfo.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/SystemInfo.java	2015-03-10 12:37:21 +
@@ -28,13 +28,14 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.Date;
+
+import org.hisp.dhis.common.DxfNamespaces;
+import org.hisp.dhis.system.database.DatabaseInfo;
+
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-import org.hisp.dhis.common.DxfNamespaces;
-import org.hisp.dhis.system.database.DatabaseInfo;
-
-import java.util.Date;
 
 /**
  * @author Lars Helge Overland
@@ -42,6 +43,10 @@
 @JacksonXmlRootElement( localName = systemInfo, namespace = DxfNamespaces.DXF_2_0 )
 public class SystemInfo
 {
+// -
+// Transient properties
+// -
+
 private String contextPath;
 
 private String userAgent;
@@ -49,6 +54,12 @@
 private String calendar;
 
 private String dateFormat;
+
+private Date lastAnalyticsTableSuccess;
+
+// -
+// Stable properties
+// -
 
 private String version;
 
@@ -162,6 +173,18 @@
 
 @JsonProperty
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+public Date getLastAnalyticsTableSuccess()
+{
+return 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18563: Put last analytics success on about page

2015-03-10 Thread noreply

revno: 18563
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 14:13:44 +0100
message:
  Put last analytics success on about page
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties	2015-02-13 15:56:34 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties	2015-03-10 13:13:44 +
@@ -468,6 +468,7 @@
 web_api=Web API
 system_overview=System Overview
 server_date=Server date
+last_analytics_table_generation=Last analytics table generation
 online_release_page=online release page
 edit_profile=Edit profile
 view_profile=View profile

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm	2014-10-07 13:56:16 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm	2015-03-10 13:13:44 +
@@ -8,6 +8,7 @@
   dt$i18n.getString( build_date ):/dtdd$format.formatDateTime( $!info.buildTime )/dd
   dt$i18n.getString( user_agent ):/dtdd$!userAgent/dd
   dt$i18n.getString( server_date ):/dtdd$format.formatDateTime( $!info.serverDate )/dd
+  dt$i18n.getString( last_analytics_table_generation ):/dtdd$format.formatDateTime( $!info.lastAnalyticsTableSuccess )/dd
   dt$i18n.getString( environment_variable ):/dtdd$!info.environmentVariable/dd
   #if ( $currentUserIsSuper )
   dt$i18n.getString( external_configuration_directory ):/dtdd$!info.externalDirectory/dd

___
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] BUG(s) - Data Element Group Editor

2015-03-10 Thread Lars Helge Øverland
Hi, this is fixed now in trunk and 2.18.

Lars


On Wed, Mar 4, 2015 at 2:55 PM, Calle Hedberg calle.hedb...@gmail.com
wrote:

 Hi

 Just picked up a significant bug in the Data Element Group Editor:

 1. Open DEG editor, and select a DE group with existing members.
 2. If required, filter the list of available elements.
 3. First bug: data elements that already ARE group members are not
 excluded from the available list.
 4. Second bug: you can select an existing group member and select it -
 that element gets duplicated at the bottom of the group member list.

 I have not checked if that duplicated member records is actually added
 to the database, messing it up - or whether the duplication is a
 display/interface issue only.

 Regards from Maseru
 Calle


 ***

 Calle Hedberg

 46D Alma Road, 7700 Rosebank, SOUTH AFRICA

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

 Cell: +27-82-853-5352

 Iridium SatPhone: +8816-315-19274

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

 Skype: calle_hedberg

 ***

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

___
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 18566: Events, added created, lastUpdated

2015-03-10 Thread noreply

revno: 18566
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 14:59:07 +0100
message:
  Events, added created, lastUpdated
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.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/events/event/Event.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java	2015-03-10 13:44:29 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java	2015-03-10 13:59:07 +
@@ -28,19 +28,18 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.common.BaseLinkableObject;
+import org.hisp.dhis.common.DxfNamespaces;
+import org.hisp.dhis.event.EventStatus;
+
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 
-import org.hisp.dhis.common.BaseLinkableObject;
-import org.hisp.dhis.common.DxfNamespaces;
-import org.hisp.dhis.event.EventStatus;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
 /**
  * @author Morten Olav Hansen morte...@gmail.com
  */
@@ -80,9 +79,9 @@
 
 private Boolean followup;
 
-private Date created;
+private String created;
 
-private Date lastUpdated;
+private String lastUpdated;
 
 public Event()
 {
@@ -284,27 +283,27 @@
 
 @JsonProperty
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
-public Date getCreated()
+public String getCreated()
 {
 return created;
 }
 
-public void setCreated( Date created )
+public void setCreated( String created )
 {
 this.created = created;
 }
 
 @JsonProperty
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
-public Date getLastUpdated()
+public String getLastUpdated()
 {
 return lastUpdated;
 }
 
-public void setLastUpdated( Date lastUpdated )
+public void setLastUpdated( String lastUpdated )
 {
 this.lastUpdated = lastUpdated;
-}
+}
 
 @Override
 public boolean equals( Object o )

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java	2015-03-10 13:44:29 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java	2015-03-10 13:59:07 +
@@ -28,13 +28,21 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.commons.lang3.StringUtils;
+import static org.hisp.dhis.common.IdentifiableObjectUtils.getIdList;
+import static org.hisp.dhis.system.util.DateUtils.getMediumDateString;
+import static org.hisp.dhis.system.util.TextUtils.getCommaDelimitedString;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.dxf2.common.IdSchemes;
 import org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance;
-import org.hisp.dhis.dxf2.common.IdSchemes;
 import org.hisp.dhis.event.EventStatus;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.program.Program;
@@ -47,16 +55,8 @@
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.support.rowset.SqlRowSet;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import static org.hisp.dhis.common.IdentifiableObjectUtils.getIdList;
-import static org.hisp.dhis.system.util.DateUtils.getMediumDateString;
-import static org.hisp.dhis.system.util.TextUtils.getCommaDelimitedString;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 /**
  * @author Morten Olav Hansen morte...@gmail.com
@@ -143,14 +143,10 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18575: Minor changes

2015-03-10 Thread noreply

revno: 18575
committer: Tran Chautran.hispviet...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-03-11 10:49:52 +0700
message:
  Minor changes
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm	2015-03-10 16:28:17 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm	2015-03-11 03:49:52 +
@@ -100,13 +100,12 @@
 tr
 	td
 		br/
-		input type='button' class=small-button alt=$i18n.getString( 'plus' ) onclick='insertOperator( + );' value=+ /
-		input type='button' class=small-button alt=$i18n.getString( 'minus' ) onclick='insertOperator( - );' value=- /
-		input type='button' class=small-button alt=$i18n.getString( 'multiply' ) onclick='insertOperator( * );' value=* /
-		input type='button' class=small-button alt=$i18n.getString( 'divide' ) onclick='insertOperator( / );' value=/ /
-		nbsp;nbsp;nbsp;
-		input type='button' class=small-button alt=$i18n.getString( 'left_parent' ) onclick='insertOperator( ( );' value=( /
-		input type='button' class=small-button alt=$i18n.getString( 'right_parent' ) onclick='insertOperator( ) );' value=) /
+		a href=javascript:insertOperator( '(' )img src=../images/left_parent.png title=$i18n.getString( 'left_brackets' )//a
+		a href=javascript:insertOperator( ')' )img src=../images/right_parent.png title=$i18n.getString( 'right_brackets' )//a
+		a href=javascript:insertOperator( '*' )img src=../images/multiply.png title=$i18n.getString( 'multiply' )//a
+		a href=javascript:insertOperator( '/' )img src=../images/divide.png title=$i18n.getString( 'divide' )//a
+		a href=javascript:insertOperator( '+' )img src=../images/plus.png title=$i18n.getString( 'plus' )//a
+		a href=javascript:insertOperator( '-' )img src=../images/minus.png title=$i18n.getString( 'minus' )//a
 	/td
 /tr
 	

___
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 18572: ER fav restore issue fixed.

2015-03-10 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 18572 [merge]
committer: Jan Henrik Overland janhenrik.overl...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 17:08:59 +0100
message:
  ER fav restore issue fixed.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-03-10 11:32:27 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-03-10 16:08:14 +
@@ -1498,7 +1498,7 @@
 
 aggregationType = Ext.create('Ext.form.field.ComboBox', {
 			cls: 'ns-combo h22',
-			width: 70,
+			width: 80,
 			height: 22,
 			style: 'margin: 0',
 fieldStyle: 'height: 22px',
@@ -4425,8 +4425,6 @@
 
 // favorite
 			if (layout  layout.dataType === 'aggregated_values') {
-aggWindow.reset(true);
-
 if (layout.startDate  layout.endDate) {
 	aggWindow.fixedFilterStore.add({id: dimConf.startEndDate.value, name: dimConf.startEndDate.name});
 }
@@ -4436,7 +4434,7 @@
 dim = layout.columns[i];
 record = recordMap[dim.dimension];
 
-		aggWindow.colStore.add(record || extendDim(Ext.clone(dim)));
+		aggWindow.addDimension(record || extendDim(Ext.clone(dim)), aggWindow.colStore);
 	}
 }
 
@@ -4445,7 +4443,7 @@
 dim = layout.rows[i];
 record = recordMap[dim.dimension];
 
-		aggWindow.rowStore.add(record || extendDim(Ext.clone(dim)));
+		aggWindow.addDimension(record || extendDim(Ext.clone(dim)), aggWindow.rowStore);
 	}
 }
 
@@ -4455,7 +4453,7 @@
 		record = recordMap[dim.dimension];
 		store = Ext.Array.contains(includeKeys, element.type) || element.optionSet ? aggWindow.filterStore : aggWindow.fixedFilterStore;
 
-		store.add(record || extendDim(Ext.clone(dim)));
+aggWindow.addDimension(record || extendDim(Ext.clone(dim)), store);
 	}
 }
 			}

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

2015-03-10 Thread Moses Marimo
Gv. /aw
___
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 18574: Add unit tests for missing services of ProgramIndicatorService

2015-03-10 Thread noreply

revno: 18574
committer: Tran Chautran.hispviet...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-03-11 10:38:51 +0700
message:
  Add unit tests for missing services of ProgramIndicatorService
modified:
  
dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceTest.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-tracker/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceTest.java	2015-02-16 13:13:51 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceTest.java	2015-03-11 03:38:51 +
@@ -94,7 +94,9 @@
 private ProgramIndicator indicatorInt;
 
 private ProgramIndicator indicatorC;
-
+
+private ProgramIndicator indicatorD;
+
 @Override
 public void setUpTest()
 {
@@ -152,6 +154,13 @@
 indicatorC.setUid( UID-C );
 indicatorC.setShortName( C );
 indicatorC.setProgram( programB );
+
+
+indicatorD = new ProgramIndicator( IndicatorD, IndicatorDesD, ProgramIndicator.VALUE_TYPE_INT, 0 + A + 4 +  + ProgramIndicator.KEY_PROGRAM_VARIABLE + {
++ ProgramIndicator.INCIDENT_DATE + } );
+indicatorD.setUid( UID-D );
+indicatorD.setShortName( D );
+indicatorD.setProgram( programB );
 }
 
 @Test
@@ -289,4 +298,30 @@
 assertEquals( DateUtils.getMediumDateString( enrollmentDate ), indicatorMap.get( IndicatorB ) );
 
 }
+
+@Test
+public void testGetExpressionDescription()
+{
+programIndicatorService.addProgramIndicator( indicatorDate );
+programIndicatorService.addProgramIndicator( indicatorInt );
+
+String description = programIndicatorService.getExpressionDescription( indicatorDate.getExpression() );
+assertEquals( ( Incident date - Enrollment date )  / 7, description);
+
+description = programIndicatorService.getExpressionDescription( indicatorInt.getExpression() );
+assertEquals( 70, description);
+}
+
+@Test
+public void testExpressionIsValid()
+{
+programIndicatorService.addProgramIndicator( indicatorDate );
+programIndicatorService.addProgramIndicator( indicatorInt );
+programIndicatorService.addProgramIndicator( indicatorD );
+
+assertEquals( ProgramIndicator.VALID, programIndicatorService.expressionIsValid( indicatorDate.getExpression() ) );
+assertEquals( ProgramIndicator.VALID, programIndicatorService.expressionIsValid( indicatorInt.getExpression() ) );
+assertEquals( ProgramIndicator.EXPRESSION_NOT_WELL_FORMED, programIndicatorService.expressionIsValid( indicatorD.getExpression() ) );
+}
+
 }

___
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] Event Date location

2015-03-10 Thread Abyot Gizaw
Hi,

The table is *programstageinstance*


---
Thank you,
Abyot.

On Tue, Mar 10, 2015 at 3:33 PM, Farai Mutero fmut...@gmail.com wrote:

 Hi Guys

 Quick and easy question for you: When you upload an event payload into
 DHIS2 via the Web-API (payload example shown below), in which table in the
 database is the event date stored?

 {
   program: eBAyeGv0exc,
   orgUnit: DiszpKrYNg8,
   eventDate: 2013-05-17,
   status: COMPLETED,
   storedBy: admin,
   coordinate: {
 latitude: 59.8,
 longitude: 10.9
   },
   dataValues: [
 { dataElement: qrur9Dvnyt5, value: 22 },
 { dataElement: oZg33kd9taw, value: Male },
 { dataElement: msodh3rEMJa, value: 2013-05-18 }
   ]
 }

 Regards

 --
 Farai Mutero


 ___
 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] DHIS2 Tools and OpenHIE PPA

2015-03-10 Thread Carl Leitner
Hi All,

I have been recently been putting some of the OpenHIE component software on
a Launchpad PPA:
   https://launchpad.net/~openhie/+archive/ubuntu/release
This includes iHRIS, the OpenInfoMan and the OpenHIM.I think that
dhis2-tools:
   https://www.dhis2.org/doc/snapshot/en/implementer/html/ch20.html
is a good candidate to put there as well.

Is there anyone interested on working on this?  PPAs are a bit finicky to
setup, so I would be happy to help as I have been doing this recently.

I would of course make sure that the appropriate people are administrators
for the OpenHIE team on Launchpad:
  https://launchpad.net/openhie


Cheers,
-carl
___
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] Event Date location

2015-03-10 Thread Farai Mutero
Hi Guys

Quick and easy question for you: When you upload an event payload into
DHIS2 via the Web-API (payload example shown below), in which table in the
database is the event date stored?

{
  program: eBAyeGv0exc,
  orgUnit: DiszpKrYNg8,
  eventDate: 2013-05-17,
  status: COMPLETED,
  storedBy: admin,
  coordinate: {
latitude: 59.8,
longitude: 10.9
  },
  dataValues: [
{ dataElement: qrur9Dvnyt5, value: 22 },
{ dataElement: oZg33kd9taw, value: Male },
{ dataElement: msodh3rEMJa, value: 2013-05-18 }
  ]
}

Regards

-- 
Farai Mutero
___
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 18568: Event service, removed unecesssary overload

2015-03-10 Thread noreply

revno: 18568
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 15:29:40 +0100
message:
  Event service, removed unecesssary overload
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/AbstractEventRowService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/EventController.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/events/event/AbstractEventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2015-03-10 13:30:28 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2015-03-10 14:29:40 +
@@ -395,14 +395,7 @@
 @Override
 public Events getEvents( Program program, OrganisationUnit organisationUnit )
 {
-return getEvents( program, null, null, null, Arrays.asList( organisationUnit ), null, null, null, null );
-}
-
-@Override
-public Events getEvents( Program program, ProgramStage programStage, ProgramStatus programStatus, Boolean followUp,
-ListOrganisationUnit organisationUnit, TrackedEntityInstance trackedEntityInstance, Date startDate, Date endDate, EventStatus status )
-{
-return getEvents( program, programStage, programStatus, followUp, organisationUnit, trackedEntityInstance, startDate, endDate, status, new IdSchemes() );
+return getEvents( program, null, null, null, Arrays.asList( organisationUnit ), null, null, null, null, null );
 }
 
 @Override

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventService.java	2015-02-17 06:00:52 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventService.java	2015-03-10 14:29:40 +
@@ -58,9 +58,6 @@
 Events getEvents( Program program, OrganisationUnit organisationUnit );
 
 Events getEvents( Program program, ProgramStage programStage, ProgramStatus programStatus, Boolean followUp, ListOrganisationUnit organisationUnit,
-TrackedEntityInstance trackedEntityInstance, Date startDate, Date endDate, EventStatus status );
-
-Events getEvents( Program program, ProgramStage programStage, ProgramStatus programStatus, Boolean followUp, ListOrganisationUnit organisationUnit,
 TrackedEntityInstance trackedEntityInstance, Date startDate, Date endDate, EventStatus status, IdSchemes idSchemes );
 
 Event getEvent( String uid );

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java	2015-03-10 13:59:07 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java	2015-03-10 14:29:40 +
@@ -51,6 +51,7 @@
 import org.hisp.dhis.system.util.DateUtils;
 import org.hisp.dhis.system.util.SqlHelper;
 import org.hisp.dhis.trackedentity.TrackedEntityInstanceService;
+import org.hisp.dhis.util.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.support.rowset.SqlRowSet;
@@ -112,6 +113,8 @@
 event.setEvent( not_valid );
 
 SetString notes = new HashSet();
+
+idSchemes = ObjectUtils.firstNonNull( idSchemes, new IdSchemes() );
 
 while ( rowSet.next() )
 {

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/AbstractEventRowService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/AbstractEventRowService.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/AbstractEventRowService.java	2015-03-10 14:29:40 +
@@ -73,7 +73,7 @@
 EventRows eventRows = new 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18569: Event service, moved org unit selection logic to service layer from controller

2015-03-10 Thread noreply

revno: 18569
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 15:44:53 +0100
message:
  Event service, moved org unit selection logic to service layer from controller
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/AbstractEventRowService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/EventRowService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationSingleEventServiceTest.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/EventController.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/events/event/AbstractEventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2015-03-10 14:29:40 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2015-03-10 14:44:53 +
@@ -28,14 +28,25 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import static org.hisp.dhis.system.notification.NotificationLevel.ERROR;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hibernate.SessionFactory;
 import org.hisp.dhis.common.CodeGenerator;
 import org.hisp.dhis.common.IdentifiableObjectManager;
 import org.hisp.dhis.common.IdentifiableProperty;
+import org.hisp.dhis.common.OrganisationUnitSelectionMode;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.dxf2.common.IdSchemes;
@@ -78,18 +89,8 @@
 import org.springframework.util.Assert;
 import org.springframework.util.StringUtils;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import static org.hisp.dhis.system.notification.NotificationLevel.ERROR;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 /**
  * @author Morten Olav Hansen morte...@gmail.com
@@ -393,15 +394,35 @@
 // -
 
 @Override
-public Events getEvents( Program program, OrganisationUnit organisationUnit )
+public Events getEvents( Program program, OrganisationUnit organisationUnit, OrganisationUnitSelectionMode orgUnitSelectionMode )
 {
-return getEvents( program, null, null, null, Arrays.asList( organisationUnit ), null, null, null, null, null );
+return getEvents( program, null, null, null, organisationUnit, orgUnitSelectionMode, null, null, null, null, null );
 }
 
 @Override
-public Events getEvents( Program program, ProgramStage programStage, ProgramStatus programStatus, Boolean followUp,
-ListOrganisationUnit organisationUnits, TrackedEntityInstance trackedEntityInstance, Date startDate, Date endDate, EventStatus status, IdSchemes idSchemes )
+public Events getEvents( Program program, ProgramStage programStage, ProgramStatus programStatus, Boolean followUp, OrganisationUnit orgUnit, 
+OrganisationUnitSelectionMode orgUnitSelectionMode, TrackedEntityInstance trackedEntityInstance, 
+Date startDate, Date endDate, EventStatus status, IdSchemes idSchemes )
 {
+ListOrganisationUnit organisationUnits = new ArrayList();
+
+if ( orgUnit != null )
+{
+if ( OrganisationUnitSelectionMode.DESCENDANTS.equals( orgUnitSelectionMode ) )
+{
+organisationUnits.addAll( organisationUnitService.getOrganisationUnitWithChildren( orgUnit.getUid() ) );
+}
+else if ( 

[Dhis2-devs] [Bug 1417254] Re: Bad 'disaggregation' DimensionType on import

2015-03-10 Thread Lars Helge Øverland
We actually made a breaking change in the format here. For the
category elements in the XML, you must change the dimensionType
element to dataDimensionType.

** Changed in: dhis2
   Status: New = Won't Fix

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

Title:
  Bad 'disaggregation' DimensionType on import

Status in DHIS 2:
  Won't Fix

Bug description:
  Importing a metaData export from 2.14 into 2.18 and I come across the
  following error in catalina.out (below).  It seens that
  'disaggregation' was an allowed type in 2.14 but not 2.18?

  Meta data can be found here:
https://github.com/dhis2/deansdashboard-demodata/tree/master/data

  Cheers,
  -carl

  * ERROR 2015-02-02 15:02:53,691 
com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct 
instance of org.hisp.dhis.common.DimensionType from String value 
'disaggregation': value not one of declared Enum instance names: [INDICATOR, 
DATAELEMENT, DATASET, DATAELEMENT_OPERAND, DATA_X, CATEGORY_OPTION_COMBO, 
PERIOD, ORGANISATIONUNIT, CATEGORYOPTION_GROUPSET, DATAELEMENT_GROUPSET, 
ORGANISATIONUNIT_GROUPSET, CATEGORY, TRACKED_ENTITY_ATTRIBUTE, 
TRACKED_ENTITY_DATAELEMENT, STATIC]
   at [Source: java.io.BufferedInputStream@6bdcc875; line: 50, column: 36] 
(through reference chain: 
org.hisp.dhis.dxf2.metadata.MetaData[categories]-java.util.ArrayList[0]-org.hisp.dhis.dataelement.DataElementCategory[dimensionType])
at 
com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:55)
at 
com.fasterxml.jackson.databind.DeserializationContext.weirdStringException(DeserializationContext.java:810)
at 
com.fasterxml.jackson.databind.deser.std.EnumDeserializer._deserializeAltString(EnumDeserializer.java:127)
at 
com.fasterxml.jackson.databind.deser.std.EnumDeserializer.deserialize(EnumDeserializer.java:81)
at 
com.fasterxml.jackson.databind.deser.std.EnumDeserializer.deserialize(EnumDeserializer.java:17)
at 
com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:538)
at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:99)
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:306)
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:124)
at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:232)
at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:206)
at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25)
at 
com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:538)
at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:99)
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:238)
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118)
at 
com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3066)
at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2207)
at org.hisp.dhis.dxf2.utils.JacksonUtils.fromXml(JacksonUtils.java:214)
at 
org.hisp.dhis.importexport.action.util.ImportMetaDataTask.run(ImportMetaDataTask.java:87)
at 
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
   (ImportMetaDataTask.java [taskScheduler-1])
  * ERROR 2015-02-02 15:02:53,691 Unexpected error occurred in scheduled task. 
(TaskUtils.java [taskScheduler-1])
  java.lang.RuntimeException: Failed to parse meta data input stream
at 
org.hisp.dhis.importexport.action.util.ImportMetaDataTask.run(ImportMetaDataTask.java:94)
at 
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18571: Fixed bug - Edit program indicator doesn't work; removed the brackets from the program expressio...

2015-03-10 Thread noreply

revno: 18571
committer: Tran Chautran.hispviet...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 22:09:14 +0700
message:
  Fixed bug - Edit program indicator doesn't work; removed  the brackets from 
the program expression description.
modified:
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java	2015-03-10 11:19:30 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java	2015-03-10 15:09:14 +
@@ -263,8 +263,7 @@
 
 String dataelementName = dataElement.getDisplayName();
 
-matcher.appendReplacement( description, ProgramIndicator.KEY_DATAELEMENT + { + programStageName
-+ ProgramIndicator.SEPARATOR_ID + dataelementName + } );
+matcher.appendReplacement( description, programStageName + ProgramIndicator.SEPARATOR_ID + dataelementName );
 }
 }
 
@@ -274,8 +273,7 @@
 
 if ( attribute != null )
 {
-matcher.appendReplacement( description,
-ProgramIndicator.KEY_ATTRIBUTE + { + attribute.getDisplayName() + } );
+matcher.appendReplacement( description, attribute.getDisplayName() );
 }
 }
 else if ( ProgramIndicator.KEY_CONSTANT.equals( key ) )
@@ -284,8 +282,22 @@
 
 if ( constant != null )
 {
-matcher.appendReplacement( description,
-ProgramIndicator.KEY_CONSTANT + { + constant.getDisplayName() + } );
+matcher.appendReplacement( description, constant.getDisplayName() );
+}
+}
+else if ( ProgramIndicator.KEY_PROGRAM_VARIABLE.equals( key ) )
+{
+if( uid1.equals( ProgramIndicator.CURRENT_DATE ) )
+{
+matcher.appendReplacement( description, Current date );
+}
+else if( uid1.equals( ProgramIndicator.ENROLLEMENT_DATE ) )
+{
+matcher.appendReplacement( description, Enrollment date );
+}
+else if( uid1.equals( ProgramIndicator.INCIDENT_DATE ) )
+{
+matcher.appendReplacement( description, Incident date );
 }
 }
 }
@@ -357,7 +369,6 @@
 matcher.appendReplacement( description, String.valueOf( 0 ) );
 }
 }
-
 matcher.appendTail( description );
 
 // -

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm	2015-02-16 11:46:32 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm	2015-03-10 15:09:14 +
@@ -14,7 +14,9 @@
 	
 	checkValueIsExist( name, validateProgramIndicator.action,{id:getFieldValue('id')} );	
 	checkValueIsExist( shortName, validateProgramIndicator.action,{id:getFieldValue('id')} );	
-	checkValueIsExist( code, validateProgramIndicator.action,{id:getFieldValue('id')} );	
+	checkValueIsExist( code, validateProgramIndicator.action,{id:getFieldValue('id')} );
+		
+	setFieldValue('checkExpression',$('#aggregationDescription').html() );
 });
 /script
 
@@ -93,7 +95,7 @@
 #parse( /dhis-web-maintenance-program/programIndicatorForm.vm )
 
 p
-	input type=submit value=$i18n.getString( 'add' ) style=width:10em
+	input type=submit value=$i18n.getString( 'update' ) style=width:10em
 	input type=button value=$i18n.getString( 'cancel' ) style=width:10em onclick=window.location.href='programIndicator.action?programId=$programIndicator.program.id' 
 /p
 

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

Re: [Dhis2-devs] Event Date location

2015-03-10 Thread Lars Helge Øverland
It's a combination of programstageinstance (for the event)
and trackedentitydatavalue (for the data values).

Lars

On Tue, Mar 10, 2015 at 3:50 PM, Abyot Gizaw aby...@gmail.com wrote:

 Hi,

 The table is *programstageinstance*


 ---
 Thank you,
 Abyot.

 On Tue, Mar 10, 2015 at 3:33 PM, Farai Mutero fmut...@gmail.com wrote:

 Hi Guys

 Quick and easy question for you: When you upload an event payload into
 DHIS2 via the Web-API (payload example shown below), in which table in the
 database is the event date stored?

 {
   program: eBAyeGv0exc,
   orgUnit: DiszpKrYNg8,
   eventDate: 2013-05-17,
   status: COMPLETED,
   storedBy: admin,
   coordinate: {
 latitude: 59.8,
 longitude: 10.9
   },
   dataValues: [
 { dataElement: qrur9Dvnyt5, value: 22 },
 { dataElement: oZg33kd9taw, value: Male },
 { dataElement: msodh3rEMJa, value: 2013-05-18 }
   ]
 }

 Regards

 --
 Farai Mutero


 ___
 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


___
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 18573: Program indicator, consistency fix

2015-03-10 Thread noreply

revno: 18573
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 17:28:17 +0100
message:
  Program indicator, consistency fix
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm	2015-03-10 13:00:30 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm	2015-03-10 16:28:17 +
@@ -112,30 +112,21 @@
 	
 p/p
 table
-	
+	tr
+th$i18n.getString( expression )/th
+  /tr	
 	tr
 		td
-			fieldset
-legend$i18n.getString( expression ) em title=$i18n.getString( required ) class=required*/em/legend
-table
-	tr
-		td
-			textarea style=width:660px id=expression name=expression onkeyup='getConditionDescription();' $!encoder.htmlEncode($!programIndicator.expression)/textarea
-		/td
-	/tr
-/table
-			/fieldset
+			textarea style=width:660px id=expression name=expression onkeyup='getConditionDescription();' $!encoder.htmlEncode($!programIndicator.expression)/textarea
 		/td
-	/tr
-	
+	/tr	
+	tr
+th$i18n.getString( description )/th
+  /tr	
 	tr
 		td
-			fieldset
-legend$i18n.getString( description )/legend
-div id='aggregationDescription'$!encoder.htmlEncode($!description)/div
-
-input type=hidden id=checkExpression name=checkExpression title=$i18n.getString('expression_is_not_well_formed') class={validate:{required:true}}  /
-			/fieldset
+			div id='aggregationDescription' style=padding: 5px 0 20px 0$!encoder.htmlEncode($!description)/div			
+			input type=hidden id=checkExpression name=checkExpression title=$i18n.getString('expression_is_not_well_formed') class={validate:{required:true}}  /
 		/td
 	/tr
 /table		

___
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 18570: Events, added support for lastUpdated query param. Removed unnecessary overload.

2015-03-10 Thread noreply

revno: 18570
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 15:59:27 +0100
message:
  Events, added support for lastUpdated query param. Removed unnecessary 
overload.
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventStore.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/AbstractEventRowService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/EventController.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/events/event/AbstractEventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2015-03-10 14:44:53 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2015-03-10 14:59:27 +
@@ -396,13 +396,13 @@
 @Override
 public Events getEvents( Program program, OrganisationUnit organisationUnit, OrganisationUnitSelectionMode orgUnitSelectionMode )
 {
-return getEvents( program, null, null, null, organisationUnit, orgUnitSelectionMode, null, null, null, null, null );
+return getEvents( program, null, null, null, organisationUnit, orgUnitSelectionMode, null, null, null, null, null, null );
 }
 
 @Override
 public Events getEvents( Program program, ProgramStage programStage, ProgramStatus programStatus, Boolean followUp, OrganisationUnit orgUnit, 
 OrganisationUnitSelectionMode orgUnitSelectionMode, TrackedEntityInstance trackedEntityInstance, 
-Date startDate, Date endDate, EventStatus status, IdSchemes idSchemes )
+Date startDate, Date endDate, EventStatus status, Date lastUpdated, IdSchemes idSchemes )
 {
 ListOrganisationUnit organisationUnits = new ArrayList();
 
@@ -424,7 +424,7 @@
 }
 
 ListEvent eventList = eventStore.getEvents( program, programStage, programStatus, followUp, organisationUnits,
-trackedEntityInstance, startDate, endDate, status, idSchemes );
+trackedEntityInstance, startDate, endDate, status, lastUpdated, idSchemes );
 
 Events events = new Events();
 events.setEvents( eventList );

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventService.java	2015-03-10 14:44:53 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventService.java	2015-03-10 14:59:27 +
@@ -60,7 +60,7 @@
 
 Events getEvents( Program program, ProgramStage programStage, ProgramStatus programStatus, Boolean followUp, OrganisationUnit orgUnit,
 OrganisationUnitSelectionMode orgUnitSelectionMode, TrackedEntityInstance trackedEntityInstance, 
-Date startDate, Date endDate, EventStatus status, IdSchemes idSchemes );
+Date startDate, Date endDate, EventStatus status, Date lastUpdated, IdSchemes idSchemes );
 
 Event getEvent( String uid );
 

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventStore.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventStore.java	2015-03-10 13:30:28 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/EventStore.java	2015-03-10 14:59:27 +
@@ -45,8 +45,5 @@
 public interface EventStore
 {
 ListEvent getEvents( Program program, ProgramStage programStage, ProgramStatus programStatus, Boolean followUp, ListOrganisationUnit organisationUnits,
-TrackedEntityInstance trackedEntityInstance, Date startDate, Date endDate, EventStatus status );
-
-ListEvent getEvents( Program program, ProgramStage programStage, ProgramStatus programStatus, Boolean followUp, ListOrganisationUnit organisationUnits,
-TrackedEntityInstance trackedEntityInstance, Date startDate, Date endDate, EventStatus status, IdSchemes idSchemes );
+TrackedEntityInstance 

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

2015-03-10 Thread noreply

revno: 18544
committer: Abyot Asalefew Gizaw aby...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 08:49:07 +0100
message:
  minor
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.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/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2015-03-06 15:15:45 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2015-03-10 07:49:07 +
@@ -42,7 +42,6 @@
 $scope.defaultOperators = OperatorFactory.defaultOperators;
 $scope.boolOperators = OperatorFactory.boolOperators;
 $scope.enrollment = {programStartDate: '', programEndDate: '', operator: $scope.defaultOperators[0]};
-$scope.searchState = true;   
 $scope.searchMode = { listAll: 'LIST_ALL', freeText: 'FREE_TEXT', attributeBased: 'ATTRIBUTE_BASED' };
 $scope.optionSets = null;
 
@@ -209,8 +208,7 @@
 $scope.programUrl,
 $scope.attributeUrl.url,
 $scope.pager,
-true).then(function(data){
-//$scope.trackedEntityList = data;
+true).then(function(data){
 if(data.rows){
 $scope.teiCount = data.rows.length;
 }
@@ -272,10 +270,8 @@
 $scope.showRegistrationDiv = !$scope.showRegistrationDiv;
 $scope.showTrackedEntityDiv = false;
 $scope.showSearchDiv = false;
-$scope.searchState = false;
 
 if(!$scope.showRegistrationDiv){
-$scope.searchState = true;
 $scope.doSearch = true;
 $scope.getProgramAttributes($scope.selectedProgram);
 }

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html	2015-03-06 16:52:13 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html	2015-03-10 07:49:07 +
@@ -60,7 +60,7 @@
 !-- top bar begins --
 div class=row top-bar
 div class=col-sm-12
-span ng-if='searchState'
+span ng-if='!showRegistrationDiv'
 {{selectedProgram.trackedEntity.name}} {{'search'| translate}}span class=small-horizonal-spacing ng-if=pager.total({{'total' | translate}}:  {{pager.total}})/span
 /span
 span ng-if='showRegistrationDiv'

___
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] Event reports on DEMO site

2015-03-10 Thread Lars Helge Øverland
Hi Simon,

the demo database does not have events after Feb 2015, we will fix this.

Lars

On Tue, Mar 10, 2015 at 6:47 AM, Simon Muyambo smmuya...@gmail.com wrote:

 Any idea why some of the event reports on the demo site do not run? Is
 there a chance to rectify them?



 *Regards*

 *Simon Muyambo*






 __ Information from ESET NOD32 Antivirus, version of virus
 signature database 11295 (20150310) __

 The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com

 ___
 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 18546: tracker-capure: reset relative search when OU is selected

2015-03-10 Thread noreply

revno: 18546
committer: Abyot Asalefew Gizaw aby...@gmail.com
branch nick: dhis2
timestamp: Tue 2015-03-10 09:57:34 +0100
message:
  tracker-capure: reset relative search when OU is selected
modified:
  
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/relationship/add-relationship.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/add-relationship.html	2015-02-24 13:10:51 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/add-relationship.html	2015-03-10 08:57:34 +
@@ -61,6 +61,7 @@
 div class='relationship-container' ng-show=!teiForRelationship
 select ng-model=selectedRelationshipSource.value
 class=form-control
+ng-change='getRelative()'
 ng-options=relationshipSource | translate for relationshipSource in relationshipSources
 option value={{'please_select_source'| translate}}/option
 /select

=== 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-03-06 14:43:54 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js	2015-03-10 08:57:34 +
@@ -206,6 +206,7 @@
 
 //set attributes as per selected program
 $scope.setAttributesForSearch = function(program){
+
 $scope.selectedProgramForRelative = program;
 if( angular.isObject($scope.selectedProgramForRelative)){
 AttributesFactory.getByProgram($scope.selectedProgramForRelative).then(function(atts){
@@ -251,8 +252,7 @@
 $scope.teiForRelationship = relationshipInfo.tei;
 });
 
-$scope.search = function(mode){ 
-
+var resetFields = function(){
 $scope.teiForRelationship = null;
 $scope.teiFetched = false;
 $scope.emptySearchText = false;
@@ -266,6 +266,20 @@
 $scope.queryUrl = null;
 $scope.programUrl = null;
 $scope.attributeUrl = {url: null, hasValue: false};
+};
+
+$scope.getRelative = function(){
+
+resetFields();
+
+if($scope.selectedRelationshipSource.value === $scope.relationshipSources[0]){
+$scope.search($scope.searchMode.listAll);
+}
+};
+
+$scope.search = function(mode){ 
+
+resetFields();
 
 $scope.selectedSearchMode = mode;


___
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