← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9395: Added iso period to period resource table

 

------------------------------------------------------------
revno: 9395
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-12-25 23:34:59 +0100
message:
  Added iso period to period resource table
modified:
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java	2012-12-25 18:30:44 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java	2012-12-25 22:34:59 +0000
@@ -470,6 +470,7 @@
             final List<String> values = new ArrayList<String>();
             
             values.add( String.valueOf( period.getId() ) );
+            values.add( period.getIsoDate() );
             
             for ( PeriodType periodType : PeriodType.PERIOD_TYPES )
             {

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java	2012-12-25 18:30:44 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java	2012-12-25 22:34:59 +0000
@@ -240,7 +240,7 @@
             // Do nothing, table does not exist
         }
         
-        String sql = "CREATE TABLE " + tableName + " (periodid INTEGER NOT NULL PRIMARY KEY";
+        String sql = "CREATE TABLE " + tableName + " (periodid INTEGER NOT NULL PRIMARY KEY, iso VARCHAR(10)";
         
         for ( PeriodType periodType : PeriodType.PERIOD_TYPES )
         {