[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13291: Small change in UI.

2013-12-17 Thread noreply

revno: 13291
committer: Tran Chau 
branch nick: dhis2
timestamp: Wed 2013-12-18 13:28:58 +0700
message:
  Small change in UI.
modified:
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.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-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2013-12-18 06:05:41 +
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2013-12-18 06:28:58 +
@@ -47,11 +47,7 @@
 			#if( $identifierTypes.size()==0 )
    
 			#end
-			
-			
-			
 		  #end
-		  
 		  
 		  #if($mapPatientOrgunit.size()!=0)
 		  

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm	2013-12-18 06:05:41 +
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm	2013-12-18 06:28:58 +
@@ -17,7 +17,8 @@
 
 	
 	
-	
+	
+	
 	
 		
 			$i18n.getString('risk')
@@ -45,7 +46,7 @@
 #end
 			
 			
-			
+			
 #set($value="")
 #foreach( $identifierType in $identifierTypes)
 	#foreach( $identifier in $patient.identifiers)
@@ -61,6 +62,21 @@
 $value
 			
 			
+#set($rowspan=1)
+#if($class=='listRow')
+	#set($class='listAlternateRow')
+	#set($alterclass='listRow')
+#else
+	#set($class='listRow')
+	#set($alterclass='listAlternateRow')
+#end
+			#else
+#set($rowspan=$rowspan+1)
+
+	jQuery("[name=infor_" + "$patient.id]").attr('rowspan',$rowspan)
+
+			#end
+			
 			
 
 	$programStageInstance.programStage.displayName
@@ -74,7 +90,7 @@
 			
 			#if( $patientId != $patient.id ) 
 			
-
+
 
 			
 			#else

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

2013-12-17 Thread noreply

revno: 13288
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 21:08:53 +0100
message:
  Minor
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties


--
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-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties	2013-12-12 15:38:28 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties	2013-12-17 20:08:53 +
@@ -20,7 +20,7 @@
 available_data_elements=Available data elements
 selected_indicators=Selected indicators
 available_indicators=Available indicators
-define_associations=Assign data set to organisation units
+define_associations=Assign to organisation units
 id=Id
 number_of_data_elements=Number of data elements
 define_dataset_associations=Assign data set to organisation units

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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13287: Data entry, replacing mergeWith call with copying certain properties for data set copy used for r...

2013-12-17 Thread noreply

revno: 13287
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 20:50:35 +0100
message:
  Data entry, replacing mergeWith call with copying certain properties for data 
set copy used for rendering data sets without any sections as section forms. 
Caused tons of db requests when org units and more were copied.
modified:
  
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.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-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2013-12-17 19:18:45 +
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2013-12-17 19:50:35 +
@@ -318,9 +318,12 @@
 
 if ( displayMode.equals( DataSet.TYPE_DEFAULT ) )
 {
-DataSet newDataSet = new DataSet();
-newDataSet.mergeWith( dataSet );
-dataSet = newDataSet;
+DataSet dataSetCopy = new DataSet();
+dataSetCopy.setName( dataSet.getName() );
+dataSetCopy.setShortName( dataSet.getShortName() );
+dataSetCopy.setRenderAsTabs( dataSet.isRenderAsTabs() );
+dataSetCopy.setRenderHorizontally( dataSet.isRenderHorizontally() );
+dataSet = dataSetCopy;
 
 for ( int i = 0; i < orderedCategoryCombos.size(); i++ )
 {

___
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 13285: Data entry, removed unused result from action

2013-12-17 Thread noreply

revno: 13285
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 20:18:45 +0100
message:
  Data entry, removed unused result from action
modified:
  
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.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-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2013-12-09 21:32:59 +
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2013-12-17 19:18:45 +
@@ -339,7 +339,7 @@
 }
 
 // -
-// For multi-org unit we only support custom forms
+// For multi-org unit we only support section forms
 // -
 
 if ( multiOrganisationUnit != null && multiOrganisationUnit != 0 )

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml	2013-12-14 14:50:17 +
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml	2013-12-17 19:18:45 +
@@ -34,7 +34,6 @@
   /dhis-web-dataentry/customForm.vm
   /dhis-web-dataentry/sectionForm.vm
   /dhis-web-dataentry/multiOrgSectionForm.vm
-  /dhis-web-dataentry/defaultForm.vm
   /dhis-web-dataentry/responseVoid.vm
 
 

___
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 13286: Data entry, using velocity directly in template instead of blocking js request to determine wheth...

2013-12-17 Thread noreply

revno: 13286
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 20:31:46 +0100
message:
  Data entry, using velocity directly in template instead of blocking js 
request to determine whether multi org unit forms are enabled
removed:
  
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMultiOrgSettingAction.java
modified:
  
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/PageInitAction.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/menu.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
=== removed file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMultiOrgSettingAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMultiOrgSettingAction.java	2013-08-23 16:05:01 +
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMultiOrgSettingAction.java	1970-01-01 00:00:00 +
@@ -1,73 +0,0 @@
-package org.hisp.dhis.de.action;
-
-/*
- * Copyright (c) 2004-2013, 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 com.opensymphony.xwork2.Action;
-import org.hisp.dhis.setting.SystemSettingManager;
-
-/**
- * @author Morten Olav Hansen 
- */
-public class GetMultiOrgSettingAction
-implements Action
-{
-// -
-// Dependencies
-// -
-
-private SystemSettingManager systemSettingManager;
-
-public void setSystemSettingManager( SystemSettingManager systemSettingManager )
-{
-this.systemSettingManager = systemSettingManager;
-}
-
-// -
-// Output
-// -
-
-private Boolean multiOrganisationUnitForms = false;
-
-public Boolean getMultiOrganisationUnitForms()
-{
-return multiOrganisationUnitForms;
-}
-
-// -
-// Action Implementation
-// -
-
-@Override
-public String execute() throws Exception
-{
-multiOrganisationUnitForms = (Boolean) systemSettingManager.getSystemSetting( SystemSettingManager.KEY_MULTI_ORGANISATION_UNIT_FORMS );
-
-return SUCCESS;
-}
-}

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/PageInitAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/PageInitAction.java	2013-08-23 16:05:01 +
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/PageInitAction.java	2013-12-17 19:31:46 +
@@ -30,6 +30,7 @@
 
 import com.opensymphony.xwork2.Action;
 import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
+import org.hisp.dhis.setting.SystemSettingManager;
 
 /**
  * @author L

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13289: Reverted r 13286

2013-12-17 Thread noreply

revno: 13289
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 21:28:49 +0100
message:
  Reverted r 13286
added:
  
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMultiOrgSettingAction.java
modified:
  
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/PageInitAction.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/menu.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
=== added file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMultiOrgSettingAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMultiOrgSettingAction.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMultiOrgSettingAction.java	2013-12-17 20:28:49 +
@@ -0,0 +1,73 @@
+package org.hisp.dhis.de.action;
+
+/*
+ * Copyright (c) 2004-2013, 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 com.opensymphony.xwork2.Action;
+import org.hisp.dhis.setting.SystemSettingManager;
+
+/**
+ * @author Morten Olav Hansen 
+ */
+public class GetMultiOrgSettingAction
+implements Action
+{
+// -
+// Dependencies
+// -
+
+private SystemSettingManager systemSettingManager;
+
+public void setSystemSettingManager( SystemSettingManager systemSettingManager )
+{
+this.systemSettingManager = systemSettingManager;
+}
+
+// -
+// Output
+// -
+
+private Boolean multiOrganisationUnitForms = false;
+
+public Boolean getMultiOrganisationUnitForms()
+{
+return multiOrganisationUnitForms;
+}
+
+// -
+// Action Implementation
+// -
+
+@Override
+public String execute() throws Exception
+{
+multiOrganisationUnitForms = (Boolean) systemSettingManager.getSystemSetting( SystemSettingManager.KEY_MULTI_ORGANISATION_UNIT_FORMS );
+
+return SUCCESS;
+}
+}

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/PageInitAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/PageInitAction.java	2013-12-17 19:31:46 +
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/PageInitAction.java	2013-12-17 20:28:49 +
@@ -30,7 +30,6 @@
 
 import com.opensymphony.xwork2.Action;
 import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
-import org.hisp.dhis.setting.SystemSettingManager;
 
 /**
  * @author Lars Helge Overland
@@ -49,24 +48,6 @@
 this.selectionManager = selectionManager;
 }
 
-private SystemSett

Re: [Dhis2-devs] Generating Analytics in Live version

2013-12-17 Thread Adebusoye Anifalaje
Try saving the levels as they are and then run analytics again. See what 
happens. If that doesn’t work change the names to 1, 2, 3, 4, 5 and 6 and try 
to run the analytics again. 

Let’s know how you get on.

Cheers.

Busoye




On 17 Dec 2013, at 18:01, Paulo Grácio  wrote:

> Hi Busoye,
>  
> We are not using the default OU Levels, please see the attachment.
>  
> Regards,
> Paulo Grácio
>  
> From: Adebusoye Anifalaje [mailto:bus...@hisp.org] 
> Sent: terça-feira, 17 de Dezembro de 2013 17:19
> To: Paulo Grácio
> Cc: DHIS 2 developers
> Subject: Re: [Dhis2-devs] Generating Analytics in Live version
> Importance: High
>  
> Hi Paulo,
>  
> There have been a number of people with this problem. What you need to do is 
> save your organisation unit levels. Do the following
>  
> 1) Go to Maintenance -> Organisation Units
>  
> 2) Select Organisation Unit Level
>  
> 3) Click on “Save” or change the default Names (i.e. Level 1, Level 2 etc) to 
> actually level names (e.g. National, Province, District etc).
>  
>  
> This should resolve the problem.
>  
> Let the group know if you have any more problems.
>  
> Regards,
>  
> Busoye   
>  
>  
> On 17 Dec 2013, at 17:01, Paulo Grácio  wrote:
> 
> 
> Hi,
> It looks like the problem is related with quoted names 
> http://h2database.com/html/grammar.html#quoted_name
> Please see attached imaged, any idea of how to work around this problem?
> 
> Regards,
> Paulo Grácio
> On Fri, Dec 13, 2013 at 3:21 PM, Paulo Grácio  
> wrote:
> Hi all,
>  
> Any idea of what might be causing this problem?
>  
> Caused by: org.h2.jdbc.JdbcSQLException: Column "OUS.uidlevel1" not found; 
> SQL statement:
>  
> Regards,
> Paulo Grácio
>  
> From: Dhis2-users 
> [mailto:dhis2-users-bounces+pgracio=criticalsoftware@lists.launchpad.net] 
> On Behalf Of Paulo Grácio
> Sent: sexta-feira, 13 de Dezembro de 2013 11:09
> To: 'Marta Vila'; 'Busoye Anifalaje'; 'dhis2-users'
> 
> Subject: Re: [Dhis2-users] Generating Analytics in Live version
>  
> I’m also getting a similar problem…
>  
> * INFO  10:29:50,023 [Level: ERROR, category: DATAMART, time: Fri Dec 13 
> 10:29:50 GMT 2013, message: Process failed:
> er-2])
> * ERROR 10:29:50,123 Unexpected error occurred in scheduled task. 
> (TaskUtils.java [taskScheduler-2])
> java.lang.RuntimeException: Exception during execution
> at 
> org.hisp.dhis.system.util.ConcurrentUtils.waitForCompletion(ConcurrentUtils.java:55)
> at 
> org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.populateTables(DefaultAnalyticsTableService.ja
> at 
> org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.update(DefaultAnalyticsTableService.java:113)
> at 
> org.hisp.dhis.analytics.scheduling.AnalyticsTableTask.run(AnalyticsTableTask.java:95)
> at org.hisp.dhis.scheduling.ScheduledTasks.run(ScheduledTasks.java:60)
> at 
> org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnabl
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecut
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>  
> Regards,
> Paulo Grácio
>  
> From: Dhis2-users 
> [mailto:dhis2-users-bounces+pgracio=criticalsoftware@lists.launchpad.net] 
> On Behalf Of Marta Vila
> Sent: quinta-feira, 12 de Dezembro de 2013 11:55
> To: Busoye Anifalaje
> Cc: dhis2-users
> Subject: Re: [Dhis2-users] Generating Analytics in Live version
>  
> Hi Busoye,
>  
> I followed your instructions but data was not there... :( 
>  
> Thanks!
>  
> 
> On 11 December 2013 13:06, Busoye Anifalaje  wrote:
> Hi Marta,
>  
> It is likely that there is no problem with your analytics generating and the 
> error is actually related to the Data Mart (your error log also implies this 
> is the case). I also found this error confusing the first time I saw it. 
> Check your pivot table to confirm if your data is updated. You will be 
> surprised that it's actually all there. 
>  
>  
> Best 
>  
> Busoye
>  
> 
> On 11 December 2013 11:01, Marta Vila  wrote:
> Hi all,
>  
> I´m running a live version with data and metadata imported and it all works 
> fine but I don´t find the way to generate the Analytic tables. 
>  
> If I run them manually I get this Process failed: Exception during execution  
>  (log attached). 
>  
> If I remember well it expects the tables to be generated by the automatic 
> process

Re: [Dhis2-devs] Generating Analytics in Live version

2013-12-17 Thread Paulo Grácio
Hi Busoye,

 

We are not using the default OU Levels, please see the attachment.

 

Regards,

Paulo Grácio

 

From: Adebusoye Anifalaje [mailto:bus...@hisp.org] 
Sent: terça-feira, 17 de Dezembro de 2013 17:19
To: Paulo Grácio
Cc: DHIS 2 developers
Subject: Re: [Dhis2-devs] Generating Analytics in Live version
Importance: High

 

Hi Paulo,

 

There have been a number of people with this problem. What you need to do is
save your organisation unit levels. Do the following

 

1) Go to Maintenance -> Organisation Units

 

2) Select Organisation Unit Level

 

3) Click on “Save” or change the default Names (i.e. Level 1, Level 2 etc)
to actually level names (e.g. National, Province, District etc).

 

 

This should resolve the problem.

 

Let the group know if you have any more problems.

 

Regards,

 

Busoye   

 

 

On 17 Dec 2013, at 17:01, Paulo Grácio  wrote:





Hi,

It looks like the problem is related with quoted names

http://h2database.com/html/grammar.html#quoted_name

Please see attached imaged, any idea of how to work around this problem?

Regards,
Paulo Grácio

On Fri, Dec 13, 2013 at 3:21 PM, Paulo Grácio <
 pgra...@criticalsoftware.com> wrote:

Hi all,

 

Any idea of what might be causing this problem?

 

Caused by: org.h2.jdbc.JdbcSQLException: Column "OUS.uidlevel1" not found;
SQL statement:

 

Regards,

Paulo Grácio

 

From: Dhis2-users [mailto: 
dhis2-users-bounces+pgracio=

criticalsoftware@lists.launchpad.net] On Behalf Of Paulo Grácio
Sent: sexta-feira, 13 de Dezembro de 2013 11:09
To: 'Marta Vila'; 'Busoye Anifalaje'; 'dhis2-users'


Subject: Re: [Dhis2-users] Generating Analytics in Live version

 

I’m also getting a similar problem…

 

* INFO  10:29:50,023 [Level: ERROR, category: DATAMART, time: Fri Dec 13
10:29:50 GMT 2013, message: Process failed:

er-2])

* ERROR 10:29:50,123 Unexpected error occurred in scheduled task.
(TaskUtils.java [taskScheduler-2])

java.lang.RuntimeException: Exception during execution

at
org.hisp.dhis.system.util.ConcurrentUtils.waitForCompletion(ConcurrentUtils.
java:55)

at
org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.populateTables(De
faultAnalyticsTableService.ja

at
org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.update(DefaultAna
lyticsTableService.java:113)

at
org.hisp.dhis.analytics.scheduling.AnalyticsTableTask.run(AnalyticsTableTask
.java:95)

at
org.hisp.dhis.scheduling.ScheduledTasks.run(ScheduledTasks.java:60)

at
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(D
elegatingErrorHandlingRunnabl

at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)

at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$
301(ScheduledThreadPoolExecut

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Sch
eduledThreadPoolExecutor.java

at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:886)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
08)

at java.lang.Thread.run(Thread.java:662)

 

Regards,

Paulo Grácio

 

From: Dhis2-users [

mailto:dhis2-users-bounces+pgracio=criticalsoftware@lists.launchpad.net]
On Behalf Of Marta Vila
Sent: quinta-feira, 12 de Dezembro de 2013 11:55
To: Busoye Anifalaje
Cc: dhis2-users
Subject: Re: [Dhis2-users] Generating Analytics in Live version

 

Hi Busoye,

 

I followed your instructions but data was not there... :( 

 

Thanks!

 

On 11 December 2013 13:06, Busoye Anifalaje < 
bus...@hisp.org> wrote:

Hi Marta,

 

It is likely that there is no problem with your analytics generating and the
error is actually related to the Data Mart (your error log also implies this
is the case). I also found this error confusing the first time I saw it.
Check your pivot table to confirm if your data is updated. You will be
surprised that it's actually all there. 

 

 

Best 

 

Busoye

 

On 11 December 2013 11:01, Marta Vila < 
martav...@gmail.com> wrote:

Hi all,

 

I´m running a live version with data and metadata imported and it all works
fine but I don´t find the way to generate the Analytic tables. 

 

If I run them manually I get this Process failed: Exception during execution
(log attached). 

 

If I remember well it expects the tables to be generated by the automatic
process so i scheduled the task yesterday to be executed daily and left the
laptop on... but nothing changes..

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13284: Added debug util used to put markers in database log files

2013-12-17 Thread noreply

revno: 13284
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 18:58:55 +0100
message:
  Added debug util used to put markers in database log files
added:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/debug/
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/debug/Debugger.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/debug/DebuggerImpl.java
modified:
  
dhis-2/dhis-support/dhis-support-system/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
=== added directory 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/debug'
=== added file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/debug/Debugger.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/debug/Debugger.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/debug/Debugger.java	2013-12-17 17:58:55 +
@@ -0,0 +1,6 @@
+package org.hisp.dhis.system.debug;
+
+public interface Debugger
+{
+void markDbLog( String key );
+}

=== added file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/debug/DebuggerImpl.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/debug/DebuggerImpl.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/debug/DebuggerImpl.java	2013-12-17 17:58:55 +
@@ -0,0 +1,18 @@
+package org.hisp.dhis.system.debug;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.transaction.annotation.Transactional;
+
+public class DebuggerImpl
+implements Debugger
+{
+@Autowired
+private JdbcTemplate jdbcTemplate;
+
+@Transactional
+public void markDbLog( String key )
+{
+jdbcTemplate.queryForObject( "select count(*) from attribute where uid = '" + key + "'", Integer.class );
+}
+}

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-support/dhis-support-system/src/main/resources/META-INF/dhis/beans.xml	2012-12-14 13:46:47 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/resources/META-INF/dhis/beans.xml	2013-12-17 17:58:55 +
@@ -29,4 +29,6 @@
 
   
 
+  
+
 

___
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] Generating Analytics in Live version

2013-12-17 Thread Adebusoye Anifalaje
Hi Paulo,

There have been a number of people with this problem. What you need to do is 
save your organisation unit levels. Do the following

1) Go to Maintenance -> Organisation Units

2) Select Organisation Unit Level

3) Click on “Save” or change the default Names (i.e. Level 1, Level 2 etc) to 
actually level names (e.g. National, Province, District etc).


This should resolve the problem.

Let the group know if you have any more problems.

Regards,

Busoye   


On 17 Dec 2013, at 17:01, Paulo Grácio  wrote:

> Hi,
> It looks like the problem is related with quoted names 
> http://h2database.com/html/grammar.html#quoted_name
> Please see attached imaged, any idea of how to work around this problem?
> 
> Regards,
> Paulo Grácio
> On Fri, Dec 13, 2013 at 3:21 PM, Paulo Grácio  
> wrote:
> Hi all,
>  
> Any idea of what might be causing this problem?
>  
> Caused by: org.h2.jdbc.JdbcSQLException: Column "OUS.uidlevel1" not found; 
> SQL statement:
>  
> Regards,
> Paulo Grácio
>  
> From: Dhis2-users 
> [mailto:dhis2-users-bounces+pgracio=criticalsoftware@lists.launchpad.net] 
> On Behalf Of Paulo Grácio
> Sent: sexta-feira, 13 de Dezembro de 2013 11:09
> To: 'Marta Vila'; 'Busoye Anifalaje'; 'dhis2-users'
> 
> Subject: Re: [Dhis2-users] Generating Analytics in Live version
>  
> I’m also getting a similar problem…
>  
> * INFO  10:29:50,023 [Level: ERROR, category: DATAMART, time: Fri Dec 13 
> 10:29:50 GMT 2013, message: Process failed:
> er-2])
> * ERROR 10:29:50,123 Unexpected error occurred in scheduled task. 
> (TaskUtils.java [taskScheduler-2])
> java.lang.RuntimeException: Exception during execution
> at 
> org.hisp.dhis.system.util.ConcurrentUtils.waitForCompletion(ConcurrentUtils.java:55)
> at 
> org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.populateTables(DefaultAnalyticsTableService.ja
> at 
> org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.update(DefaultAnalyticsTableService.java:113)
> at 
> org.hisp.dhis.analytics.scheduling.AnalyticsTableTask.run(AnalyticsTableTask.java:95)
> at org.hisp.dhis.scheduling.ScheduledTasks.run(ScheduledTasks.java:60)
> at 
> org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnabl
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecut
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>  
> Regards,
> Paulo Grácio
>  
> From: Dhis2-users 
> [mailto:dhis2-users-bounces+pgracio=criticalsoftware@lists.launchpad.net] 
> On Behalf Of Marta Vila
> Sent: quinta-feira, 12 de Dezembro de 2013 11:55
> To: Busoye Anifalaje
> Cc: dhis2-users
> Subject: Re: [Dhis2-users] Generating Analytics in Live version
>  
> Hi Busoye,
>  
> I followed your instructions but data was not there... :( 
>  
> Thanks!
>  
> 
> On 11 December 2013 13:06, Busoye Anifalaje  wrote:
> Hi Marta,
>  
> It is likely that there is no problem with your analytics generating and the 
> error is actually related to the Data Mart (your error log also implies this 
> is the case). I also found this error confusing the first time I saw it. 
> Check your pivot table to confirm if your data is updated. You will be 
> surprised that it's actually all there. 
>  
>  
> Best 
>  
> Busoye
>  
> 
> On 11 December 2013 11:01, Marta Vila  wrote:
> Hi all,
>  
> I´m running a live version with data and metadata imported and it all works 
> fine but I don´t find the way to generate the Analytic tables. 
>  
> If I run them manually I get this Process failed: Exception during execution  
>  (log attached). 
>  
> If I remember well it expects the tables to be generated by the automatic 
> process so i scheduled the task yesterday to be executed daily and left the 
> laptop on... but nothing changes... 
> Maybe it got suspended and the task was never executed... (will change that 
> now and lets see tomorrow) but anyway, if that is my problem, I suggest it 
> may be useful to generate the tables even if the task is triggered manually 
> for the first time. 
>  
>  
> Version:
> 2.13
> Build revision:
> 12908
> Build date:
> 2013-12-04 16:24
>  
> ___
> 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.

[Dhis2-devs] [Bug 1260258] Re: ie8-oust-failing-to-expand

2013-12-17 Thread Morten Olav Hansen
Fixed and backported to 2.13, 2.12

** Changed in: dhis2
   Status: Confirmed => Fix Committed

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

Title:
  ie8-oust-failing-to-expand

Status in DHIS 2:
  Fix Committed

Bug description:
  While assigning dataset to organisationunits in the tree when we click
  on + symbol in IE8 it is not expanding.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1260258/+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 13283: use $.parseXML for reading xml in oust, makes expansion work in IE8

2013-12-17 Thread noreply

revno: 13283
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2013-12-17 17:03:32 +0100
message:
  use $.parseXML for reading xml in oust, makes expansion work in IE8
modified:
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.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-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js	2013-12-10 11:48:42 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js	2013-12-17 16:03:32 +
@@ -175,7 +175,8 @@
 
 function processExpand( rootElement )
 {
-var parentElements = $(rootElement).find( 'parent' );
+var xml = $.parseXML(rootElement);
+var parentElements = $(xml).find( 'parent' );
 
 for ( var i = 0, parentElement; ( parentElement = parentElements[i] ); ++i )
 {

___
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 13282: support completeDate in smartphone data-entry

2013-12-17 Thread noreply

revno: 13282
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2013-12-17 16:17:33 +0100
message:
  support completeDate in smartphone data-entry
modified:
  
dhis-2/dhis-web/dhis-web-mobile/src/main/resources/org/hisp/dhis/web/mobile/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.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-mobile/src/main/resources/org/hisp/dhis/web/mobile/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/resources/org/hisp/dhis/web/mobile/i18n_module.properties	2013-10-09 10:43:45 +
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/resources/org/hisp/dhis/web/mobile/i18n_module.properties	2013-12-17 15:17:33 +
@@ -9,4 +9,5 @@
 none_selected=None selected
 no_organisation_units_for_data_entry=No organisation units available for data entry
 change_to_invalid_page=Tried changing to invalid page
-logout=Log out
\ No newline at end of file
+logout=Log out
+send_and_complete=Send and Complete
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm	2013-12-17 14:41:36 +
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm	2013-12-17 15:17:33 +
@@ -172,7 +172,8 @@
 
 $( '#data-entry-page' ).trigger( 'pagecreate' );
 $( '#data-entry-list' ).listview( 'refresh' );
-$( '#send_button' ).bind( 'click', saveValues );
+$( '#send_button' ).bind( 'click', saveValuesNotCompleted );
+$( '#send_and_complete_button' ).bind( 'click', saveValuesCompleted );
 }
 
 var dvs = {
@@ -213,7 +214,20 @@
 }
 }
 
-function saveValues() {
+function getCurrentDate() {
+var d = new Date();
+return d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate();
+}
+
+function saveValuesCompleted() {
+saveValues(true);
+}
+
+function saveValuesNotCompleted() {
+saveValues(false);
+}
+
+function saveValues(completed) {
 $.mobile.loading( 'show' );
 
 var fields = $('#data-entry-form :input[name]');
@@ -224,6 +238,10 @@
   period: Selected.period.toString()
 };
 
+if( completed ) {
+dataValueSet.completeDate = getCurrentDate();
+}
+
 var dataValues = [];
 
 _.each(fields, function(field) {
@@ -368,6 +386,7 @@
 <% }); %>
 
 
+
 
 
 

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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13281: show heading with datasetname+orgunit/period in smartphone data-entry screen.

2013-12-17 Thread noreply

revno: 13281
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2013-12-17 15:41:36 +0100
message:
  show heading with datasetname+orgunit/period in smartphone data-entry screen.
modified:
  
dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.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-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm	2013-10-15 11:45:28 +
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm	2013-12-17 14:41:36 +
@@ -15,6 +15,7 @@
 
 function selectOrganisationUnit( e ) {
 Selected.orgUnit = $(this).data('id');
+Selected.orgUnitName = $(this).html();
 }
 
 function selectDataSet( e ) {
@@ -23,6 +24,7 @@
 
 function selectPeriod( e ) {
 Selected.period = $(this).data('id');
+Selected.periodName = $(this).html();
 }
 
 function loadOrganisationUnitsPage() {
@@ -162,7 +164,9 @@
 $( '#data-entry-page section[data-role="content"]' ).html(
 _.template( tmpl, {
 'form': form,
-'valueMap': valueMap
+'valueMap': valueMap,
+periodName: Selected.periodName,
+orgUnitName: Selected.orgUnitName
 })
 );
 
@@ -309,11 +313,15 @@
 
 
 

[Dhis2-devs] Dataelement

2013-12-17 Thread riddy ndoma
Hi,
It's possible to use a dataelement with too combinaisons in too different
dataset ?
Best regards,
___
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 13279: only add accessproperties if viewClass is a sharing view (improves speed for normal web-api actions)

2013-12-17 Thread noreply

revno: 13279
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2013-12-17 14:06:11 +0100
message:
  only add accessproperties if viewClass is a sharing view (improves speed for 
normal web-api actions)
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/JacksonUtils.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.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/utils/JacksonUtils.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/JacksonUtils.java	2013-12-10 19:08:51 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/JacksonUtils.java	2013-12-17 13:06:11 +
@@ -108,6 +108,12 @@
 viewClasses.put( "withoutOrganisationUnits", WithoutOrganisationUnitsView.class );
 }
 
+public static boolean isSharingView( String view )
+{
+return view.equals( "sharing" ) || view.equals( "sharingBasic" ) || view.equals( "sharingDetailed" )
+|| view.equals( "sharingExport" );
+}
+
 public static Class getViewClass( Object viewName )
 {
 if ( viewName == null || !(viewName instanceof String && ((String) viewName).length() != 0) )

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java	2013-09-27 15:16:29 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java	2013-12-17 13:06:11 +
@@ -39,6 +39,7 @@
 import org.hisp.dhis.common.PagerUtils;
 import org.hisp.dhis.common.SharingUtils;
 import org.hisp.dhis.dxf2.metadata.ExchangeClasses;
+import org.hisp.dhis.dxf2.utils.JacksonUtils;
 import org.hisp.dhis.system.util.ReflectionUtils;
 import org.hisp.dhis.user.CurrentUserService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -81,7 +82,7 @@
 // GET
 //--
 
-@RequestMapping( method = RequestMethod.GET )
+@RequestMapping(method = RequestMethod.GET)
 public String getObjectList( @RequestParam Map parameters, Model model, HttpServletRequest request ) throws Exception
 {
 WebOptions options = new WebOptions( parameters );
@@ -108,7 +109,7 @@
 return StringUtils.uncapitalize( getEntitySimpleName() ) + "List";
 }
 
-@RequestMapping( value = "/query/{query}", method = RequestMethod.GET )
+@RequestMapping(value = "/query/{query}", method = RequestMethod.GET)
 public String query( @PathVariable String query, @RequestParam Map parameters, Model model, HttpServletRequest request ) throws Exception
 {
 WebOptions options = new WebOptions( parameters );
@@ -137,8 +138,8 @@
 return StringUtils.uncapitalize( getEntitySimpleName() ) + "List";
 }
 
-@RequestMapping( value = "/{uid}", method = RequestMethod.GET )
-public String getObject( @PathVariable( "uid" ) String uid, @RequestParam Map parameters,
+@RequestMapping(value = "/{uid}", method = RequestMethod.GET)
+public String getObject( @PathVariable("uid") String uid, @RequestParam Map parameters,
 Model model, HttpServletRequest request, HttpServletResponse response ) throws Exception
 {
 WebOptions options = new WebOptions( parameters );
@@ -168,7 +169,7 @@
 return StringUtils.uncapitalize( getEntitySimpleName() );
 }
 
-@RequestMapping( value = "/search/{query}", method = RequestMethod.GET )
+@RequestMapping(value = "/search/{query}", method = RequestMethod.GET)
 public String search( @PathVariable String query, @RequestParam Map parameters,
 Model model, HttpServletRequest request, HttpServletResponse response ) throws Exception
 {
@@ -198,13 +199,13 @@
 // POST
 //--
 
-@RequestMapping( method = RequestMethod.POST, consumes = { "application/xml", "text/xml" } )
+@RequestMapping(method = RequestMethod.POST, consumes = { "application/xml", "text/xml" })
 public void postXmlObject( HttpServletResponse response, HttpServletRequest request, InputStream input ) throws Exception
 {
 throw new HttpRequestMethodNotSupportedException( RequestMethod.POST.toString() );
 }
 
-@RequestMapping( method = RequestMethod.POST, consumes = "application/json" )
+@RequestMapping(method = RequestMethod.POST, consumes = "application/json")
 public v

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13277: Removed silly comment

2013-12-17 Thread noreply

revno: 13277
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 13:48:16 +0100
message:
  Removed silly comment
modified:
  dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.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/dhis-support-hibernate/src/main/resources/ehcache.xml'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml	2013-10-31 10:29:22 +
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml	2013-12-17 12:48:16 +
@@ -116,7 +116,6 @@
   
   
 
-  
   
 
   

___
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 13278: Increased data set cache capacity

2013-12-17 Thread noreply

revno: 13278
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 13:48:48 +0100
message:
  Increased data set cache capacity
modified:
  dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.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/dhis-support-hibernate/src/main/resources/ehcache.xml'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml	2013-12-17 12:48:16 +
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml	2013-12-17 12:48:48 +
@@ -50,7 +50,7 @@
   
   
 
-  
+  
 
   
 

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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13276: minor change in ProgramStageDataElement, remove downcast of DataElement

2013-12-17 Thread noreply

revno: 13276
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2013-12-17 13:25:25 +0100
message:
  minor change in ProgramStageDataElement, remove downcast of DataElement
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElement.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/program/ProgramStageDataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElement.java	2013-11-13 04:19:10 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElement.java	2013-12-17 12:25:25 +
@@ -118,7 +118,6 @@
 
 @JsonProperty
 @JsonView( { DetailedView.class, ExportView.class } )
-@JsonSerialize( as = BaseIdentifiableObject.class )
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
 public DataElement getDataElement()
 {
@@ -191,7 +190,7 @@
 {
 this.allowDateInFuture = allowDateInFuture;
 }
-
+
 // -
 // hashCode, equals and toString
 // -

___
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 13275: Removing some data entry upgrade routines for program stage custom forms, done their job

2013-12-17 Thread noreply

revno: 13275
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 12:49:26 +0100
message:
  Removing some data entry upgrade routines for program stage custom forms, 
done their job
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormUpgrader.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/dataentryform/DataEntryFormUpgrader.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormUpgrader.java	2013-08-23 16:05:01 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormUpgrader.java	2013-12-17 11:49:26 +
@@ -50,19 +50,6 @@
 
 private final static Pattern ID_PATTERN = Pattern.compile( ID_EXPRESSION );
 
-private final Pattern SELECT_PATTERN = Pattern.compile( "(", Pattern.DOTALL );
-
-private final Pattern ID_PROGRAM_ENTRY_TEXTBOX = Pattern
-.compile( "id=\"value\\[(\\d+)\\].value:value\\[(\\d+)\\].value:value\\[(\\d+)\\].value\"" );
-
-private final Pattern ID_PROGRAM_ENTRY_OPTION = Pattern
-.compile( "id=\"value\\[(\\d+)\\].(combo|boolean){1}:value\\[(\\d+)\\].(combo|boolean){1}\"" );
-
-private final Pattern ID_PROGRAM_ENTRY_DATE = Pattern
-.compile( "id=\"value\\[(\\d+)\\].date:value\\[(\\d+)\\].date\"" );
-
-private final Pattern IDENTIFIER_PATTERN_TEXTBOX = Pattern.compile( "id=\"(\\d+)-(\\d+)-(\\d+)-val\"" );
-
 // -
 // Dependencies
 // -
@@ -84,28 +71,26 @@
 {
 Collection dataEntryForms = dataEntryFormService.getAllDataEntryForms();
 
-int i = 0;
-
-for ( DataEntryForm programDataEntryForm : dataEntryForms )
+for ( DataEntryForm form : dataEntryForms )
 {
-String customForm = upgradeDataEntryForm( programDataEntryForm.getHtmlCode() );
-
-customForm = upgradeProgramDataEntryFormForTextBox( customForm );
-
-customForm = upgradeProgramDataEntryFormForDate( customForm );
-
-customForm = upgradeProgramDataEntryFormForOption( customForm );
-
-customForm = upgradeProgramDataEntryForm( customForm );
-
-programDataEntryForm.setHtmlCode( customForm );
-
-dataEntryFormService.updateDataEntryForm( programDataEntryForm );
-
-i++;
+try
+{
+String customForm = upgradeDataEntryForm( form.getHtmlCode() );
+
+if ( customForm != null && !customForm.equals( form.getHtmlCode() ) )
+{
+form.setHtmlCode( customForm );
+dataEntryFormService.updateDataEntryForm( form );
+}
+}
+catch ( Exception ex )
+{
+log.error( "Upgrading data entry form failed: " + form.getName() );
+log.error( ex ); // Log and continue
+}
 }
-
-log.info( "Upgraded custom case entry form identifiers: " + i );
+
+log.info( "Upgraded custom case entry form identifiers" );
 }
 
 // -
@@ -129,85 +114,4 @@
 
 return out.toString().replaceAll( "view=\"@@deshortname@@\"", "" );
 }
-
-private String upgradeProgramDataEntryFormForTextBox( String htmlCode )
-{
-Matcher matcher = ID_PROGRAM_ENTRY_TEXTBOX.matcher( htmlCode );
-
-StringBuffer out = new StringBuffer();
-
-while ( matcher.find() )
-{
-String upgradedId = "id=\"" + matcher.group( 1 ) + "-" + matcher.group( 2 ) + "-" + matcher.group( 3 )
-+ "-val\"";
-
-matcher.appendReplacement( out, upgradedId );
-}
-
-matcher.appendTail( out );
-
-return out.toString().replaceAll( "view=\"@@deshortname@@\"", "" );
-}
-
-private String upgradeProgramDataEntryFormForOption( String htmlCode )
-{
-StringBuffer out = new StringBuffer();
-Matcher inputMatcher = SELECT_PATTERN.matcher( htmlCode );
-
-while ( inputMatcher.find() )
-{
-String inputHtml = inputMatcher.group();
-
-Matcher matcher = ID_PROGRAM_ENTRY_OPTION.matcher( inputHtml );
-
-if ( matcher.find() )
-{
-String upgradedId = matcher.group( 1 ) + "-" + matcher.group( 3 ) + "-val";
-
-inputHtml = "";
-}
-
-inputMa

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13274: IdentifiableObjectManager, initializing maps of stores manually. Working around a problem with be...

2013-12-17 Thread noreply

revno: 13274
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 12:18:54 +0100
message:
  IdentifiableObjectManager, initializing maps of stores manually. Working 
around a problem with bean initialization order in spring.
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java
  
dhis-2/dhis-services/dhis-service-core/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-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java	2013-12-16 17:21:39 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java	2013-12-17 11:18:54 +
@@ -28,15 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.common.IdentifiableObject.IdentifiableProperty;
-import org.hisp.dhis.common.NameableObject.NameableProperty;
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.PostConstruct;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -47,6 +38,14 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.common.IdentifiableObject.IdentifiableProperty;
+import org.hisp.dhis.common.NameableObject.NameableProperty;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
 /**
  * @author Lars Helge Overland
  */
@@ -66,30 +65,6 @@
 
 private Map, GenericNameableObjectStore> nameableObjectStoreMap;
 
-@PostConstruct
-public void init()
-{
-identifiableObjectStoreMap = new HashMap, GenericIdentifiableObjectStore>();
-
-for ( GenericIdentifiableObjectStore store : identifiableObjectStores )
-{
-if ( store != null && store.getClazz() != null )
-{
-identifiableObjectStoreMap.put( store.getClazz(), store );
-}
-}
-
-nameableObjectStoreMap = new HashMap, GenericNameableObjectStore>();
-
-for ( GenericNameableObjectStore store : nameableObjectStores )
-{
-if ( store != null && store.getClazz() != null )
-{
-nameableObjectStoreMap.put( store.getClazz(), store );
-}
-}
-}
-
 //--
 // IdentifiableObjectManager implementation
 //--
@@ -571,8 +546,14 @@
 }
 }
 
+//--
+// Supportive methods
+//--
+
 private  GenericIdentifiableObjectStore getIdentifiableObjectStore( Class clazz )
 {
+initMaps();
+
 GenericIdentifiableObjectStore store = identifiableObjectStoreMap.get( clazz );
 
 if ( store == null )
@@ -590,6 +571,8 @@
 
 private  GenericNameableObjectStore getNameableObjectStore( Class clazz )
 {
+initMaps();
+
 GenericNameableObjectStore store = nameableObjectStoreMap.get( clazz );
 
 if ( store == null )
@@ -604,4 +587,26 @@
 
 return store;
 }
+
+private void initMaps()
+{
+if ( identifiableObjectStoreMap != null )
+{
+return; // Already initialized
+}
+
+identifiableObjectStoreMap = new HashMap, GenericIdentifiableObjectStore>();
+
+for ( GenericIdentifiableObjectStore store : identifiableObjectStores )
+{
+identifiableObjectStoreMap.put( store.getClazz(), store );
+}
+
+nameableObjectStoreMap = new HashMap, GenericNameableObjectStore>();
+
+for ( GenericNameableObjectStore store : nameableObjectStores )
+{
+nameableObjectStoreMap.put( store.getClazz(), store );
+}
+}
 }

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

Re: [Dhis2-devs] DHIS Import Log?

2013-12-17 Thread Edwin Mulwa
Hi All,

An interesting update is as follows:

I removed ALL the users in the XML file and managed to import everything.
This of course didn't really solve my problem because I eventually needed
to import users as well.

After importation, I encountered a new problem:

When I tried to do data entry, the Data Sets combo box was not loading with
data. Checking the log, I found the following message:


** ERROR 2013-12-17 01:00:56,744 Resource table
_dataelementcategoryoptioncomboname does not exist, please generate it
(HibernateDataElementStore.java [http-bio-8080-exec-9])*
I found, from checking previous posts, that I needed to create resource
tables from Maintenance->Data Administration; which I did. Then I decided
to try and import all my metadata afresh, including the users (ensuring
that all users have firstname and surname defined) and the import WORKED!!

What this means is that the error I was getting telling me that the surname
should not be null AFTER I had rectified the source XML file was not an
accurately reported error. The error must have been something to do with
missing resource tables. I think this is a potential bug in DHIS that
should be investigated.

Edwin



On Mon, Dec 16, 2013 at 5:03 PM, Morten Olav Hansen wrote:

> Hi Edwin,
>
> I'm not really sure.. if you know your way around a text-editor, you can
> try and remove all user but a few.. and see if it still fails, there might
> be a few users in there that have some errors
>
> --
> Morten
>
>
> On Mon, Dec 16, 2013 at 2:52 PM, Edwin Mulwa  wrote:
>
>> Hi Morten,
>>
>> You pointed me in the right direction. Thanks.
>>
>> Taking a look at the log, it shows that there is a NULL value in surname
>> field when its trying to insert a record in the userinfo table. I checked
>> the source metadata.xml file and ensured that all surname entries have a
>> value. I still get the same error.
>>
>> See attached log snippet.
>>
>> Any thoughts on why this is persisting even in the absence of NULL values?
>>
>> Edwin
>>
>>
>>
>> On Mon, Dec 16, 2013 at 4:59 AM, Edwin Mulwa  wrote:
>>
>>> Ok, thanks. Yes I am...
>>>
>>>
>>> On Mon, Dec 16, 2013 at 3:37 PM, Morten Olav Hansen 
>>> wrote:
>>>
 I would recommend looking at logs/catalina.out (assuming you are
 running tomcat)

 --
 Morten


 On Mon, Dec 16, 2013 at 1:31 PM, Edwin Mulwa  wrote:

> Hi,
>
> I am importing all metadata from one instance of DHIS2 to another. The
> import process seems to be hanging on the Importing Users section (see
> attached screenshot).
>
> Is there an import log that I can check to see what is happening?
>
> Edwin
>
>
>
> ___
> 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 13273: Renamed action class

2013-12-17 Thread noreply

revno: 13273
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 10:33:58 +0100
message:
  Renamed action class
removed:
  
dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/input/SMSInput.java
added:
  
dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/input/SMSInputAction.java
modified:
  dhis-2/dhis-web/dhis-web-sms/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-sms/src/main/resources/struts.xml
  
dhis-2/dhis-web/dhis-web-validationrule/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
=== removed file 'dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/input/SMSInput.java'
--- dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/input/SMSInput.java	2013-09-19 12:43:34 +
+++ dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/input/SMSInput.java	1970-01-01 00:00:00 +
@@ -1,159 +0,0 @@
-package org.hisp.dhis.sms.input;
-
-/*
- * Copyright (c) 2004-2013, 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 org.hisp.dhis.sms.incoming.IncomingSms;
-import org.hisp.dhis.sms.incoming.IncomingSmsService;
-import org.hisp.dhis.sms.incoming.SmsMessageEncoding;
-import org.hisp.dhis.sms.incoming.SmsMessageStatus;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Christian and Magnus
- */
-public class SMSInput
-implements Action
-{
-private String sender, phone, number, msisdn;
-
-private String message, text, content;
-
-private IncomingSmsService incomingSmsService;
-
-@Override
-public String execute()
-throws Exception
-{
-IncomingSms sms = new IncomingSms();
-
-// setter for sms originator
-if ( sender != null )
-{
-sms.setOriginator( sender );
-}
-else if ( phone != null )
-{
-sms.setOriginator( phone );
-}
-else if ( number != null )
-{
-sms.setOriginator( number );
-}
-else if ( msisdn != null )
-{
-sms.setOriginator( msisdn );
-}
-
-// setter for sms text
-if ( message != null )
-{
-sms.setText( message );
-}
-else if ( text != null )
-{
-sms.setText( text );
-}
-else if ( content != null )
-{
-sms.setText( content );
-}
-
-// check whether two necessary attributes are null 
-if ( sms.getOriginator() == null || sms.getText() == null )
-{
-setNullToAll();
-return ERROR;
-}
-
-java.util.Date rec = new java.util.Date();
-sms.setReceivedDate( rec );
-sms.setSentDate( rec );
-
-sms.setEncoding( SmsMessageEncoding.ENC7BIT );
-sms.setStatus( SmsMessageStatus.INCOMING );
-sms.setGatewayId( "HARDCODEDTESTGATEWAY" );
-
-incomingSmsService.save( sms );
-
-setNullToAll();
-
-return SUCCESS;
-}
-
-public void setNullToAll()
-{
-sender = null;
-phone = null;
-number = null;
-message = null;
-text = null;
-content = null;
-}
-
-publ

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13272: Web API, query of options in option set

2013-12-17 Thread noreply

revno: 13272
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 10:19:20 +0100
message:
  Web API, query of options in option set
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/option/DefaultOptionService.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/OptionSetController.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/OptionService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionService.java	2013-08-23 15:56:19 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionService.java	2013-12-17 09:19:20 +
@@ -52,6 +52,8 @@
 
 Collection getAllOptionSets();
 
+List getOptions( String optionSetUid, String key, Integer max );
+
 List getOptions( int optionSetId, String name, Integer max );
 
 Integer getOptionSetsCountByName( String name );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/option/DefaultOptionService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/option/DefaultOptionService.java	2013-08-23 16:05:01 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/option/DefaultOptionService.java	2013-12-17 09:19:20 +
@@ -102,6 +102,13 @@
 return i18n( i18nService, optionStore.getAll() );
 }
 
+public List getOptions( String optionSetUid, String key, Integer max )
+{
+OptionSet optionSet = getOptionSet( optionSetUid );
+
+return getOptions( optionSet.getId(), key, max );
+}
+
 public List getOptions( int optionSetId, String key, Integer max )
 {
 List options = null;

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/OptionSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/OptionSetController.java	2013-08-23 16:00:30 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/OptionSetController.java	2013-12-17 09:19:20 +
@@ -28,19 +28,23 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletResponse;
+
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
+import org.hisp.dhis.option.OptionService;
 import org.hisp.dhis.option.OptionSet;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * @author Morten Olav Hansen 
  */
@@ -50,6 +54,9 @@
 extends AbstractCrudController
 {
 public static final String RESOURCE_PATH = "/optionSets";
+
+@Autowired
+private OptionService optionService;
 
 @RequestMapping( value = "/{uid}/version", method = RequestMethod.GET )
 public void getVersion( @PathVariable( "uid" ) String uid, @RequestParam Map parameters,
@@ -62,4 +69,15 @@
 
 JacksonUtils.toJson( response.getOutputStream(), versionMap );
 }
+
+@RequestMapping( value = "/{uid}/options", method = RequestMethod.GET )
+public void getOptions( @PathVariable( "uid" ) String uid, 
+@RequestParam(required = false) String key, 
+@RequestParam(required = false) Integer max,
+HttpServletResponse response ) throws IOException
+{
+List options = optionService.getOptions( uid, key, max );
+
+JacksonUtils.toJson( response.getOutputStream(), options );
+}
 }

___
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 13271: Bean scope fix

2013-12-17 Thread noreply

revno: 13271
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2013-12-17 09:41:46 +0100
message:
  Bean scope fix
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/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-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml	2013-12-13 07:04:37 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml	2013-12-17 08:41:46 +
@@ -4,13 +4,15 @@
 	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd";>
 
 	
+		class="org.hisp.dhis.mobile.action.incoming.ReimportSMSAction"
+		scope="prototype">
 		
 	
 
 	
+		class="org.hisp.dhis.mobile.caseentry.state.DefaultSelectedStateManager"
+scope="prototype">
 		
 		
@@ -23,7 +25,8 @@
 		scope="prototype" />
 
 	
+		class="org.hisp.dhis.mobile.action.incoming.ReceivingSMSAction" 
+		scope="prototype">
 		
 		
@@ -37,7 +40,8 @@
 			ref="org.hisp.dhis.sms.incoming.IncomingSmsService" />
 	
 
-	
 		
@@ -50,7 +54,8 @@
 			ref="org.hisp.dhis.sms.incoming.IncomingSmsService" />
 	
 
-	
 		
@@ -62,7 +67,8 @@
 	
 
 	
+		class="org.hisp.dhis.mobile.action.ShowMobileSettingFormAction" 
+		scope="prototype">
 		
 		
 
 	
+		class="org.hisp.dhis.mobile.action.UpdateMobileSettingAction" 
+		scope="prototype">
 		
 		
 
 	
+		class="org.hisp.dhis.mobile.action.MobileDataSetListAction" 
+		scope="prototype">
 		
 	
 
 	
+		class="org.hisp.dhis.mobile.action.UpdateMobileDataSetAction" 
+		scope="prototype">
 		
 	
 
 	
 
 	
+		class="org.hisp.dhis.mobile.action.GetSmsConfigurationAction" 
+		scope="prototype" />
 
 	
+		class="org.hisp.dhis.mobile.action.SaveSmsConfigurationAction" 
+		scope="prototype" />
 
 	
 
 	
+		class="org.hisp.dhis.mobile.action.UpdateDefaultGatewayAction" 
+		scope="prototype" />
 
 	
+		class="org.hisp.dhis.mobile.action.RemoveGatewayConfigAction" 
+		scope="prototype" />
 
 	
 
 	
+		class="org.hisp.dhis.mobile.action.smscommand.SMSCommandAction" 
+		scope="prototype">
 		
 		
 		
-
 	
 
 	
 
 	
+		class="org.hisp.dhis.mobile.action.J2meClientUpdateAction" 
+		scope="prototype">
 		
 	
 	
 	
+class="org.hisp.dhis.mobile.action.incoming.ProcessingSendQuickSMSAction" 
+scope="prototype"/>
 
 	

___
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