← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18943: Set program indicator description and expression to text

 

------------------------------------------------------------
revno: 18943
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2015-04-19 13:38:17 +0200
message:
  Set program indicator description and expression to text
modified:
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.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-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java	2015-04-17 07:58:50 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java	2015-04-19 11:38:17 +0000
@@ -305,6 +305,10 @@
         
         executeSql( "update eventreport set collapsedatadimensions = false where collapsedatadimensions is null" );
         executeSql( "update eventchart set collapsedatadimensions = false where collapsedatadimensions is null" );
+
+        executeSql( "ALTER TABLE programindicator ALTER description TYPE text" );
+        executeSql( "ALTER TABLE programindicator ALTER expression TYPE text" );
+        executeSql( "ALTER TABLE programstage ALTER description TYPE text" );
         
         updateProgramStageList();
         updateProgramAttributeList();

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml	2015-03-29 20:22:47 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml	2015-04-19 11:38:17 +0000
@@ -17,14 +17,14 @@
 	
     <property name="shortName" />
     
-    <property name="description" />
+    <property name="description" type="text" />
 
     <many-to-one name="program" class="org.hisp.dhis.program.Program" 
         column="programid" foreign-key="fk_programindicator_program" not-null="true" />
 
     <property name="valueType" />
     
-    <property name="expression" />
+    <property name="expression" type="text" />
     
     <property name="rootDate" />
     

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml	2015-03-31 16:25:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml	2015-04-19 11:38:17 +0000
@@ -18,7 +18,7 @@
 
     <property name="name" column="name" length="230" />
 
-    <property name="description" />
+    <property name="description" type="text" />
 
     <property name="minDaysFromStart" column="mindaysfromstart"
       not-null="true" />

=== 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	2015-04-11 13:18:25 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2015-04-19 11:38:17 +0000
@@ -480,8 +480,7 @@
             "rangelength" : [2,160]
         },
         "description" : {
-            "required" : true,
-            "rangelength" : [2,254]
+            "required" : true
         },
         "reportDateDescription" : {
             "required" : true,
@@ -548,8 +547,7 @@
             "required" : true
         },
         "expression" : {
-            "required" : true,
-            "maxlength" : 254
+            "required" : true
         },
         "valueType" : {
             "required" : true

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageForm.vm	2015-03-31 16:25:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageForm.vm	2015-04-19 11:38:17 +0000
@@ -112,7 +112,7 @@
 	
 	<tr>
 		<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="description" name="description" /></td>
+		<td><textarea id="description" name="description"></textarea></td>
 	</tr>
 	
 	#if( $program.type == 1 )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm	2015-03-31 16:25:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm	2015-04-19 11:38:17 +0000
@@ -139,7 +139,7 @@
 
 			<tr>
 				<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-				<td><input type="text" id="description" name="description" value="$encoder.htmlEncode( $programStage.description )" /></td>
+				<td><textarea id="description" name="description">$!encoder.htmlEncode( $programStage.description )</textarea></td>
 			</tr> 
 			
 			#if($programStage.program.type==1)


Follow ups