← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8929: Set shortname lengths

 

------------------------------------------------------------
revno: 8929
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-11-07 14:17:41 +0300
message:
  Set shortname lengths
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.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-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2012-11-07 08:12:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2012-11-07 11:17:41 +0000
@@ -465,6 +465,13 @@
         executeSql( "UPDATE dataset SET skipaggregation = false WHERE skipaggregation IS NULL" );
         executeSql( "UPDATE dataset SET skipoffline = false WHERE skipoffline IS NULL" );
 
+        // short names
+        
+        executeSql( "ALTER TABLE dataelement ALTER COLUMN shortname TYPE character varying(50)" );
+        executeSql( "ALTER TABLE indicator ALTER COLUMN shortname TYPE character varying(50)" );
+        executeSql( "ALTER TABLE dataset ALTER COLUMN shortname TYPE character varying(50)" );
+        executeSql( "ALTER TABLE organisationunit ALTER COLUMN shortname TYPE character varying(50)" );
+        
         log.info( "Tables updated" );
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2012-10-06 08:45:50 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2012-11-07 11:17:41 +0000
@@ -74,7 +74,7 @@
         },
         "shortName" : {
             "required" : true,
-            "rangelength" : [ 2, 49 ]
+            "rangelength" : [ 2, 50 ]
         },
         "code" : {
             "rangelength" : [ 0, 25 ],
@@ -152,7 +152,7 @@
         "shortName" : {
             "required" : true,
             "alphanumericwithbasicpuncspaces" : true,
-            "rangelength" : [ 2, 25 ]
+            "rangelength" : [ 2, 40 ]
         },
         "code" : {
             "alphanumericwithbasicpuncspaces" : true,
@@ -214,7 +214,7 @@
         },
         "shortName" : {
             "required" : true,
-            "rangelength" : [ 2, 25 ],
+            "rangelength" : [ 2, 40 ],
             "alphanumericwithbasicpuncspaces" : true,
             "notOnlyDigits" : true
         },
@@ -304,7 +304,7 @@
         },
         "shortName" : {
             "required" : true,
-            "rangelength" : [ 2, 25 ],
+            "rangelength" : [ 2, 40 ],
             "alphanumericwithbasicpuncspaces" : true
         },
         "alternativeName" : {