[Dhis2-devs] [Bug 973722] [NEW] Complete/incomplete buttons disappear

2012-04-04 Thread Olav P
Public bug reported:

Several users in Ghana have reported that the complete/incomplete/run
validation buttons sometimes disappear from the data entry screen.
Running latest 2.7

** Affects: dhis2
 Importance: Undecided
 Status: New

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

Title:
  Complete/incomplete buttons disappear

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  Several users in Ghana have reported that the complete/incomplete/run
  validation buttons sometimes disappear from the data entry screen.
  Running latest 2.7

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/973722/+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 6477: local vn - Fixed Intro

2012-04-04 Thread noreply

revno: 6477
committer: Hieu 
branch nick: dhis2
timestamp: Wed 2012-04-04 14:20:49 +0700
message:
  local vn - Fixed Intro
added:
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/icons/dhis-web-spreadsheet-reporting.png
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties
  
dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties
  
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.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-commons-resources/src/main/webapp/icons/dhis-web-spreadsheet-reporting.png'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/icons/dhis-web-spreadsheet-reporting.png	1970-01-01 00:00:00 + and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/icons/dhis-web-spreadsheet-reporting.png	2012-04-04 07:20:49 + differ
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties	2012-03-12 13:38:39 +
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties	2012-04-04 07:20:49 +
@@ -80,6 +80,7 @@
 intro_dhis-web-light=Access a mobile device optimized version of data entry, settings, messages and analysis.
 intro_dhis-web-dashboard-integration=Get an overview of favorite charts, reports and maps and view or write messages.
 intro_dhis-web-visualizer=Produce dynamic data visualizations as charts or tables for data elements and indicators.
+intro_dhis-web-spreadsheet-reporting=Generate and Import data to/from the reports based on the pre-defined Excel template files.
 
 #-- Common -#
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties	2012-03-08 08:28:22 +
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties	2012-04-04 07:20:49 +
@@ -440,6 +440,7 @@
 intro_dhis-web-light=Access a mobile device optimized version of data entry, settings, messages and analysis.
 intro_dhis-web-dashboard-integration=Get an overview of favorite charts, reports and maps and view or write messages.
 intro_dhis-web-visualizer=Produce dynamic data visualizations as charts or tables for data elements and indicators.
+intro_dhis-web-spreadsheet-reporting=T\u1ea1o b\u00e1o c\u00e1o Xu\u1ea5t v\u00e0 Nh\u1eadp d\u1eef li\u1ec7u d\u1ef1a tr\u00ean m\u1eabu b\u00e1o c\u00e1o \u0111\u1ecbnh ngh\u0129a s\u1eb5n.
 show_main_menu=Show main menu
 go_to_system_overview=Go to system overview
 format.Daily.startDate=dd-MM-

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.vm	2012-02-28 08:50:46 +
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.vm	2012-04-04 07:20:49 +
@@ -1,6 +1,6 @@
 $i18n.getString( "administration" )
 
-
+
 #introListImgItem( "getConfiguration.action" "configuration" "systemsettings")
 #introListImgItem( "listAllExportReport.action" "export_reports" "export")
 	#introListImgItem( "listAllImportReport.action" "import_reports" "import" )

___
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] orgunit unique names

2012-04-04 Thread Bob Jolliffe
Hi all

I know we have had this discussion of uniqueness of orgunit names on
and off over the past few years.  But we have moved quite a distance
since then with our increasing use of uids and codes to uniquely
identify objects.  So my question:  have we reached a stage now that
we can finally drop the uniqueness requirement on orgunit names?  Is
there anywhere remaining which absolutely depends on this requirement?
 Other than dxfv1 import which will match on code by preference
anyway.

If there is no other truly compelling reason to maintain this I'd like
to propose that we consider dropping this constraint now.  Can we
think of a list of what breaks if we do?  And if we can workaround
those breaks.

This will be particularly important when we consider consuming orgunit
names from external services such as a facility registry.  In fact
that has always been a bit of a problem (we always get the names from
somewhere) but we have tended to do this orgunit import as a one-off
task and had the luxury to massage uniqueness into the names in the
process.  If we are considering ongoing synchronisation with external
sources I think it will be hard to impose our name-uniqueness
requirement on those various sources.

Bob.

___
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 973200] [NEW] Full name not visible when you search "Users by Organisation Unit"

2012-04-04 Thread Alex Tumwesigye
Public bug reported:

When you search for users by organisation units, the system does not
display full names of the user.

** Affects: dhis2
 Importance: Undecided
 Status: New

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

Title:
  Full name not visible when you search "Users by Organisation Unit"

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  When you search for users by organisation units, the system does not
  display full names of the user.

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

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


[Dhis2-devs] [Bug 973208] [NEW] The DHIS2 software 2.7 web interface not working on 32 bit platform - tested on Ubuntu (10.10, 11.04) 32 bit

2012-04-04 Thread Alex Tumwesigye
Public bug reported:

The DHIS2 software 2.7 web interface not working on 32 bit platform -
tested on Ubuntu (10.10,11.04) 32 bit.

I installed postgresql 9.1.3 and tomcat 7.0.26 on a 32 bit Ubuntu
(10.10, 11.04) and used the dump (pgdump) from a postgresql 9.1.3 (with
tomcat 7.0.26) ubuntu (11.10) 64 bit but the DHIS2 web interface fails
after logging in.

The dump reports no errors but when you login to the web interface, you get 
this:  
"An exception occurred

Sorry! The system failed to execute the operation. Usually, no data is
lost and you can continue working by going back to the previous page. If
you wish to report the incident, please save this page by choosing "File
-> Save (page as)" in your browser and include the saved page in the
report. The problem details are listed below.


[+] Exception (org.hibernate.exception.SQLGrammarException): ERROR: operator 
does not exist: boolean = integer Hint: No operator matches the given name and 
argument type(s). You might need to add explicit type casts. Position: 342
[+] Caused by (org.postgresql.util.PSQLException): ERROR: operator does not 
exist: boolean = integer Hint: No operator matches the given name and argument 
type(s). You might need to add explicit type casts. Position: 342 "

** Affects: dhis2
 Importance: Undecided
 Status: New

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

Title:
  The DHIS2 software 2.7 web interface not working on 32 bit platform -
  tested on Ubuntu (10.10,11.04) 32 bit

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  The DHIS2 software 2.7 web interface not working on 32 bit platform -
  tested on Ubuntu (10.10,11.04) 32 bit.

  I installed postgresql 9.1.3 and tomcat 7.0.26 on a 32 bit Ubuntu
  (10.10, 11.04) and used the dump (pgdump) from a postgresql 9.1.3
  (with tomcat 7.0.26) ubuntu (11.10) 64 bit but the DHIS2 web interface
  fails after logging in.

  The dump reports no errors but when you login to the web interface, you get 
this:  
  "An exception occurred

  Sorry! The system failed to execute the operation. Usually, no data is
  lost and you can continue working by going back to the previous page.
  If you wish to report the incident, please save this page by choosing
  "File -> Save (page as)" in your browser and include the saved page in
  the report. The problem details are listed below.


  [+] Exception (org.hibernate.exception.SQLGrammarException): ERROR: operator 
does not exist: boolean = integer Hint: No operator matches the given name and 
argument type(s). You might need to add explicit type casts. Position: 342
  [+] Caused by (org.postgresql.util.PSQLException): ERROR: operator does not 
exist: boolean = integer Hint: No operator matches the given name and argument 
type(s). You might need to add explicit type casts. Position: 342 "

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/973208/+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 6478: added catcombo to dataelement on meta-data export

2012-04-04 Thread noreply

revno: 6478
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2012-04-04 11:58:08 +0200
message:
  added catcombo to dataelement on meta-data export
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2012-03-30 10:53:18 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2012-04-04 09:58:08 +
@@ -454,7 +454,7 @@
 
 @JsonProperty
 @JsonSerialize( as = BaseIdentifiableObject.class )
-@JsonView( {DetailedView.class} )
+@JsonView( {DetailedView.class, ExportView.class} )
 @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public DataElementCategoryCombo getCategoryCombo()
 {

___
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 6479: SqlView - Supporting into export to pdf, xls, and csv files.

2012-04-04 Thread noreply

revno: 6479
committer: Hieu 
branch nick: dhis2
timestamp: Wed 2012-04-04 17:48:27 +0700
message:
  SqlView - Supporting into export to pdf, xls, and csv files.
removed:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/sqlview/ShowUpSqlViewTableAction.java
added:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/sqlview/ExportSqlViewResultAction.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewExpandStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewService.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/JdbcSqlViewExpandStore.java
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/SessionUtils.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/ExportResultAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/sqlView.js
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/showDataSqlViewForm.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/SqlViewExpandStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewExpandStore.java	2012-03-01 08:45:42 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewExpandStore.java	2012-04-04 10:48:27 +
@@ -2,6 +2,8 @@
 
 import java.util.Collection;
 
+import org.hisp.dhis.common.Grid;
+
 /**
  * @author Dang Duy Hieu
  * @version $Id SqlViewExpandStore.java July 06, 2010$
@@ -22,7 +24,7 @@
 
 void dropViewTable( String sqlViewName );
 
-void setUpDataSqlViewTable( SqlViewTable sqlViewTable, String viewTableName );
+void setUpDataSqlViewTable( Grid sqlViewGrid, String viewTableName );
 
 String setUpViewTableName( String input );
 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewService.java	2012-03-01 08:45:42 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewService.java	2012-04-04 10:48:27 +
@@ -29,6 +29,8 @@
 
 import java.util.Collection;
 
+import org.hisp.dhis.common.Grid;
+
 /**
  * @author Dang Duy Hieu
  * @version $Id SqlViewService.java July 06, 2010$
@@ -81,7 +83,7 @@
 
 void dropAllSqlViewTables();
 
-SqlViewTable getDataSqlViewTable( String viewTableName );
+Grid getDataSqlViewGrid( String viewTableName );
 
 String testSqlGrammar( String sql );
 }

=== modified file '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/DefaultSqlViewService.java	2012-03-01 08:45:42 +
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java	2012-04-04 10:48:27 +
@@ -28,6 +28,8 @@
  */
 
 import org.hisp.dhis.common.GenericIdentifiableObjectStore;
+import org.hisp.dhis.common.Grid;
+import org.hisp.dhis.system.grid.ListGrid;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Collection;
@@ -173,13 +175,13 @@
 }
 
 @Override
-public SqlViewTable getDataSqlViewTable( String viewTableName )
+public Grid getDataSqlViewGrid( String viewTableName )
 {
-SqlViewTable sqlViewTable = new SqlViewTable();
-
-sqlViewExpandStore.setUpDataSqlViewTable( sqlViewTable, viewTableName );
-
-return sqlViewTable;
+Grid sqlViewGrid = new ListGrid();
+
+sqlViewExpandStore.setUpDataSqlViewTable( sqlViewGrid, viewTableName );
+
+return sqlViewGrid;
 }
 
 @Override

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/jdbc/JdbcSqlViewExpandStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/jdbc/JdbcSqlViewExpandStore.java	2012-03-22 06:47:56 +
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/jdbc/JdbcSqlViewExpandStore.

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 6480: Minifying vm/html a bit on main page

2012-04-04 Thread noreply

revno: 6480
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2012-04-04 12:51:40 +0200
message:
  Minifying vm/html a bit on main page
added:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macrosdoc.vm
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.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-commons-resources/src/main/webapp/macros.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm	2011-10-03 09:23:01 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm	2012-04-04 10:51:40 +
@@ -1,14 +1,3 @@
-
-#*
-Displays a table which lists a set of objects and it's common operations: Filter, 
-add, update, translate, remove and show details. The macro produces code against 
-some specific conventions for the scripts and actions to call. Call it this way:
-
-#objectList( [name of object, e.g. DataElement], [list of such objects, e.g. $dataElements] )
-
-@param objectName The litteral name of the type of object to display, e.g. DataElement
-@param objects A Velocity list of the objects to be formatted, typically prepared by an action.
-*#
 #macro( objectList $objectName $objects )
 
 
@@ -44,20 +33,10 @@
 
 #end
 
-#*
-Supportive method for displaying rows with alternating colors in a table.
-
-@param mark boolean alternating the color.
-*#
 #macro( alternate $mark )
 #if ( $mark ) class="listAlternateRow"#else class="listRow"#end
 #end
 
-#*
-Formats a boolean into a readable value
-
-@param bool the boolean to format.
-*#
 #macro( formatBool $bool )
 #if ( $bool )
   $i18n.getString( "yes" )
@@ -128,27 +107,12 @@
 
 #end
 
-
-
-
-#*#
-#* Helpers for building attribute forms. Note that these will have dynamic validation rules applied to them. *#
-
 #macro( trHeader $text )
 
 	$text
 
 #end
 
-#
-	Required args:
-		id			
-		text		
-		mandatory	
-	Optional args:
-		name		Will use id if omitted.
-		value		
-*#
 #macro( trTextInput $args )
 #if( "$!args.name" == "" )
 	#set( $name = $!args.id )
@@ -164,15 +128,6 @@
 
 #end
 
-#
-	Required args:
-		id			
-		text		
-		mandatory	
-	Optional args:
-		name		Will use id if omitted.
-		value		
-*#
 #macro( trBooleanSelectInput $args )
 #if( "$!args.name" == "" )
 	#set( $name = $!args.id )
@@ -192,15 +147,6 @@
 
 #end
 
-#
-	Required args:
-		id			
-		text		
-		mandatory	
-	Optional args:
-		name		Will use id if omitted.
-		value		
-*#
 #macro( trDateInput $args )
 #if( "$!args.name" == "" )
 	#set( $name = $!args.id )
@@ -222,15 +168,6 @@
 
 #end
 
-#
-	Required args:
-		id			
-		text		
-		mandatory	
-	Optional args:
-		name		Will use id if omitted.
-		value		
-*#
 #macro( trNumberInput $args )
 #if( "$!args.name" == "" )
 	#set( $name = $!args.id )
@@ -246,15 +183,6 @@
 
 #end
 
-#
-	Required args:
-		id			
-		text		
-		mandatory	
-	Optional args:
-		name		Will use id if omitted.
-		value		
-*#
 #macro( trIntegerInput $args ) 
 #if( "$!args.name" == "" )
 	#set( $name = $!args.id )
@@ -270,15 +198,6 @@
 
 #end
 
-#
-	Required args:
-		id			
-		text		
-		mandatory	
-	Optional args:
-		name		Will use id if omitted.
-		value		
-*#
 #macro( trPositiveIntegerInput $args )
 #if( "$!args.name" == "" )
 	#set( $name = $!args.id )
@@ -294,15 +213,6 @@
 
 #end
 
-#
-	Required args:
-		id			
-		text		
-		mandatory	
-	Optional args:
-		name		Will use id if omitted.
-		value		
-*#
 #macro( trNegativeIntegerInput $args )
 #if( "$!args.name" == "" )
 	#set( $name = $!args.id )
@@ -318,16 +228,6 @@
 
 #end
 
-#
-	Required args:
-		id			
-		text
-		mandatory	
-		choices		Array of choices.		
-	Optional args:
-		name		Will use id if omitted.
-		value		
-*#
 #macro( trMul

[Dhis2-devs] Ordering of category combo options in section forms (Mobile browser and J2ME client)

2012-04-04 Thread Jason Pickering
Hi there. I have a question regarding the ordering of category combo options.

I have a category combo composed of two categories

Gender(Male/Female)
Age(<1,1-15,15+)

In the gender category, I have ordered the category options as 1 =
Male and 2 = Female.
In the age category, I have ordered the category options as 1= <1, 2= 1-15,3=15+

I have then ordered the categories in the combo as

Gender = 1
Age = 2

I would expect the following order to appear in the section forms

(1,1) Male, <1
(1,2) Male, 1-15
(1,3) Male, 15+
(2,1) Female,< 1
(2,2) Female, 1-15
(2,3) Female 15+

The order however seems to be alphabetical according to category option.

Is there a setting I am missing or is the sort order simply not
respected with the section forms?

Thanks,
Jason

___
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] orgunit unique names

2012-04-04 Thread Bob Jolliffe
On 4 April 2012 08:37, Bob Jolliffe  wrote:
> Hi all
>
> I know we have had this discussion of uniqueness of orgunit names on
> and off over the past few years.  But we have moved quite a distance
> since then with our increasing use of uids and codes to uniquely
> identify objects.  So my question:  have we reached a stage now that
> we can finally drop the uniqueness requirement on orgunit names?  Is
> there anywhere remaining which absolutely depends on this requirement?
>  Other than dxfv1 import which will match on code by preference
> anyway.
>
> If there is no other truly compelling reason to maintain this I'd like
> to propose that we consider dropping this constraint now.  Can we
> think of a list of what breaks if we do?  And if we can workaround
> those breaks.

Or Jason's compromise suggestion to change the uniqueness constraint
to (parentid,name) sounds good to me.

>
> This will be particularly important when we consider consuming orgunit
> names from external services such as a facility registry.  In fact
> that has always been a bit of a problem (we always get the names from
> somewhere) but we have tended to do this orgunit import as a one-off
> task and had the luxury to massage uniqueness into the names in the
> process.  If we are considering ongoing synchronisation with external
> sources I think it will be hard to impose our name-uniqueness
> requirement on those various sources.
>
> Bob.

___
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 6482: minor changes to importer

2012-04-04 Thread noreply

revno: 6482
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2012-04-04 17:27:10 +0200
message:
  minor changes to importer
modified:
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Importer.java
  
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/AbstractImporter.java
  
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/ConstantImporter.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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Importer.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Importer.java	2012-04-03 13:35:15 +
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Importer.java	2012-04-04 15:27:10 +
@@ -64,7 +64,7 @@
 ImportCount getCurrentImportCount();
 
 /**
- * Can this importer handle a certain Class type
+ * Can this importer handle a certain Class type?
  *
  * @param clazz Class to check for
  * @return true or false depending on if class is supported

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/AbstractImporter.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/AbstractImporter.java	2012-04-03 12:59:54 +
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/AbstractImporter.java	2012-04-04 15:27:10 +
@@ -73,7 +73,7 @@
  *
  * @param object Object to import
  */
-protected abstract void newObject( T object );
+protected abstract ImportConflict newObject( T object );
 
 /**
  * Update object from old => new.
@@ -81,7 +81,7 @@
  * @param objectObject to import
  * @param oldObject The current version of the object
  */
-protected abstract void updatedObject( T object, T oldObject );
+protected abstract ImportConflict updatedObject( T object, T oldObject );
 
 /**
  * Current object name, used to fill name part of a ImportConflict
@@ -119,6 +119,7 @@
 @Override
 public ImportConflict importObject( T object, ImportOptions options )
 {
+// move this to importCollection
 Map map = getIdMap( (Class) object.getClass(), options.getIdScheme() );
 String identifier = getIdentifier( object, options.getIdScheme() );
 T oldObject = map.get( identifier );
@@ -128,34 +129,58 @@
 if ( oldObject != null )
 {
 ignores++;
-return new ImportConflict( object.getClass().getName(), "Strategy is new, but identifier '" + identifier + "' already exists." );
+return new ImportConflict( getDisplayName( object, options.getIdScheme() ), "Strategy is new, but identifier '" + identifier + "' already exists." );
+}
+
+ImportConflict conflict = newObject( object );
+
+if ( conflict != null )
+{
+return conflict;
 }
 
 imports++;
-newObject( object );
 }
 else if ( options.getImportStrategy().isUpdatesStrategy() )
 {
 if ( oldObject == null )
 {
 ignores++;
-return new ImportConflict( object.getClass().getName(), "Strategy is updates, but identifier '" + identifier + "' does not exist." );
+return new ImportConflict( getDisplayName( object, options.getIdScheme() ), "Strategy is updates, but identifier '" + identifier + "' does not exist." );
+}
+
+ImportConflict conflict = updatedObject( object, oldObject );
+
+if ( conflict != null )
+{
+return conflict;
 }
 
 updates++;
-updatedObject( object, oldObject );
 }
 else if ( options.getImportStrategy().isNewAndUpdatesStrategy() )
 {
 if ( oldObject != null )
 {
+ImportConflict conflict = updatedObject( object, oldObject );
+
+if ( conflict != null )
+{
+return conflict;
+}
+
 updates++;
-updatedObject( object, oldObject );
 }
 else
 {
+ImportConflict conflict = newObject( object );
+
+if ( conflict != null )
+{
+return conflict;
+}
+
 imports++;
-newObject( object );
 }
 }
 
@@ -213,4 +238,31 @@
 
 return null;
 }
+
+protected String getDisplayName( IdentifiableObject object, IdScheme scheme )
+{
+if ( scheme.isUidScheme() )
+{
+

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 6483: refactored importer a bit

2012-04-04 Thread noreply

revno: 6483
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2012-04-04 19:50:32 +0200
message:
  refactored importer a bit
modified:
  
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Importer.java
  
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/AbstractImporter.java
  
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/ConstantImporter.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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java	2012-04-03 12:59:54 +
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java	2012-04-04 17:50:32 +
@@ -35,7 +35,6 @@
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -113,11 +112,11 @@
 @Autowired
 private Set importerClasses = new HashSet();
 
-private Importer findImporterClass( Collection clazzes )
+private Importer findImporterClass( List clazzes )
 {
-if ( clazzes.size() > 0 )
+if ( !clazzes.isEmpty() )
 {
-IdentifiableObject identifiableObject = clazzes.iterator().next();
+IdentifiableObject identifiableObject = clazzes.get( 0 );
 
 return findImporterClass( identifiableObject.getClass() );
 }
@@ -138,7 +137,7 @@
 return null;
 }
 
-private void doImport( Collection objects, ImportOptions importOptions, ImportSummary importSummary )
+private void doImport( List objects, ImportOptions importOptions, ImportSummary importSummary )
 {
 Importer importer = findImporterClass( objects );
 

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Importer.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Importer.java	2012-04-04 15:27:10 +
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Importer.java	2012-04-04 17:50:32 +
@@ -54,7 +54,7 @@
  * @param options Import options
  * @return List of all the ImportConflicts encountered
  */
-List importCollection( Collection objects, ImportOptions options );
+List importCollection( List objects, ImportOptions options );
 
 /**
  * Get an ImportCount instance for the current import numbers.

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/AbstractImporter.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/AbstractImporter.java	2012-04-04 15:27:10 +
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/AbstractImporter.java	2012-04-04 17:50:32 +
@@ -27,8 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.hisp.dhis.common.IdentifiableObject;
-import org.hisp.dhis.common.IdentifiableObjectManager;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.common.*;
 import org.hisp.dhis.dxf2.importsummary.ImportConflict;
 import org.hisp.dhis.dxf2.importsummary.ImportCount;
 import org.hisp.dhis.dxf2.metadata.IdScheme;
@@ -37,22 +38,23 @@
 import org.springframework.beans.factory.annotation.Autowired;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
 /**
  * @author Morten Olav Hansen 
  */
-public abstract class AbstractImporter
+public abstract class AbstractImporter
 implements Importer
 {
+private static final Log LOG = LogFactory.getLog( AbstractImporter.class );
+
 //---
 // Dependencies
 //---
 
 @Autowired
-private IdentifiableObjectManager manager;
+protected IdentifiableObjectManager manager;
 
 //---
 // Current import counts
@@ -64,6 +66,12 @@
 
 protected int ignores;
 
+protected Map uidMap;
+
+protected Map nameMap;
+
+protected Map codeMap;
+
 //---
 // Abstract methods that sub-classes needs to implement
 //-