← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17644: Data import, added all id scheme to data import UI

 

------------------------------------------------------------
revno: 17644
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-12-03 16:09:14 +0200
message:
  Data import, added all id scheme to data import UI
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ImportOptions.java
  dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java
  dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importDataValue.vm


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ImportOptions.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ImportOptions.java	2014-10-15 18:59:11 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ImportOptions.java	2014-12-03 14:09:14 +0000
@@ -83,6 +83,18 @@
         this.skipExistingCheck = skipExistingCheck;
     }
 
+    public ImportOptions( IdentifiableProperty idScheme, IdentifiableProperty dataElementIdScheme, IdentifiableProperty orgUnitIdScheme, 
+        boolean dryRun, boolean preheatCache, ImportStrategy importStrategy, boolean skipExistingCheck )
+    {
+        this.idScheme = idScheme;
+        this.dataElementIdScheme = dataElementIdScheme;
+        this.orgUnitIdScheme = orgUnitIdScheme;
+        this.preheatCache = preheatCache;
+        this.dryRun = dryRun;
+        this.importStrategy = importStrategy;
+        this.skipExistingCheck = skipExistingCheck;
+    }
+
     //--------------------------------------------------------------------------
     // Logic
     //--------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java	2014-10-16 06:17:19 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java	2014-12-03 14:09:14 +0000
@@ -92,6 +92,13 @@
     {
         this.strategy = ImportStrategy.valueOf( stgy );
     }
+    
+    private IdentifiableProperty idScheme;
+
+    public void setIdScheme( IdentifiableProperty idScheme )
+    {
+        this.idScheme = idScheme;
+    }
 
     private IdentifiableProperty dataElementIdScheme;
 
@@ -146,7 +153,7 @@
 
         in = StreamUtils.wrapAndCheckCompressionFormat( in );
 
-        ImportOptions options = new ImportOptions( dataElementIdScheme, orgUnitIdScheme, dryRun, true, strategy, skipExistingCheck );
+        ImportOptions options = new ImportOptions( idScheme, dataElementIdScheme, orgUnitIdScheme, dryRun, true, strategy, skipExistingCheck );
 
         log.info( options );
 

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties	2014-11-16 10:31:19 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties	2014-12-03 14:09:14 +0000
@@ -325,11 +325,13 @@
 no_program_stages_available=No program stages available
 no_data_values_found=No data values found
 all_program_stages=All program stages
+id_scheme=ID scheme
 data_element_id_scheme=Data element ID scheme
 enable=Enable
 disable=Disable
 org_unit_id_scheme=Org unit ID scheme
 category_id_scheme=Category ID scheme
+all_objects=all objects
 uid=UID
 name=Name
 code=Code

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importDataValue.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importDataValue.vm	2014-11-11 20:22:58 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importDataValue.vm	2014-12-03 14:09:14 +0000
@@ -41,6 +41,13 @@
 	<td><a href="javascript:toggleOptions()">$i18n.getString( "more_options" )</a></td>
 </tr>
 <tr class="moreOptions" style="display:none">
+	<td>$i18n.getString( "id_scheme" ) ($i18n.getString( "all_objects" ))</td>	
+	<td><select id="idScheme" name="idScheme" style="width:190px">
+		<option value="UID">$i18n.getString( "uid" )</option>
+		<option value="CODE">$i18n.getString( "code" )</option>
+    </select></td>
+</tr>
+<tr class="moreOptions" style="display:none">
 	<td>$i18n.getString( "data_element_id_scheme" )</td>	
 	<td><select id="dataElementIdScheme" name="dataElementIdScheme" style="width:190px">
 		<option value="UID">$i18n.getString( "uid" )</option>