dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29362
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14817: Remove period-type in TrackedEntityAttribute mapping file.
------------------------------------------------------------
revno: 14817
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-04-13 21:14:11 +0800
message:
Remove period-type in TrackedEntityAttribute mapping file.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttribute.java
dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityAttribute.hbm.xml
dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/eventreport/EventReportServiceTest.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties
--
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/trackedentity/TrackedEntityAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttribute.java 2014-04-12 15:32:37 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttribute.java 2014-04-13 13:14:11 +0000
@@ -36,7 +36,6 @@
import org.hisp.dhis.common.view.ExportView;
import org.hisp.dhis.common.view.WithoutOrganisationUnitsView;
import org.hisp.dhis.option.OptionSet;
-import org.hisp.dhis.period.PeriodType;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonView;
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityAttribute.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityAttribute.hbm.xml 2014-04-08 15:44:49 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityAttribute.hbm.xml 2014-04-13 13:14:11 +0000
@@ -44,10 +44,7 @@
<property name="orgunitScope" />
<property name="programScope" />
-
- <many-to-one name="periodType" class="org.hisp.dhis.period.PeriodType"
- column="periodtypeid" foreign-key="fk_trackedentityattribute_periodtypeid" />
-
+
<!-- Access properties -->
<many-to-one name="user" class="org.hisp.dhis.user.User"
column="userid" foreign-key="fk_trackedentityattribute_userid" />
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/eventreport/EventReportServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/eventreport/EventReportServiceTest.java 2014-03-27 16:08:29 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/eventreport/EventReportServiceTest.java 2014-04-13 13:14:11 +0000
@@ -1,121 +1,121 @@
-package org.hisp.dhis.eventreport;
-
-/*
- * Copyright (c) 2004-2014, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import static org.junit.Assert.*;
-
-import org.hisp.dhis.DhisSpringTest;
-import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramService;
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-
-/**
- * @author Lars Helge Overland
- */
-public class EventReportServiceTest
- extends DhisSpringTest
-{
- @Autowired
- private EventReportService eventReportService;
-
- @Autowired
- private ProgramService programService;
-
- private Program prA;
-
- @Override
- public void setUpTest()
- {
- prA = createProgram( 'A', null, null );
- programService.addProgram( prA );
- }
-
- @Test
- public void testSaveGet()
- {
- EventReport erA = new EventReport( "erA" );
- erA.setProgram( prA );
- erA.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
- EventReport erB = new EventReport( "erB" );
- erB.setProgram( prA );
- erB.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
- EventReport erC = new EventReport( "erC" );
- erC.setProgram( prA );
- erC.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
-
- int idA = eventReportService.saveEventReport( erA );
- int idB = eventReportService.saveEventReport( erB );
- int idC = eventReportService.saveEventReport( erC );
-
- assertEquals( "erA", eventReportService.getEventReport( idA ).getName() );
- assertEquals( "erB", eventReportService.getEventReport( idB ).getName() );
- assertEquals( "erC", eventReportService.getEventReport( idC ).getName() );
- }
-
- @Test
- public void testDelete()
- {
- EventReport erA = new EventReport( "erA" );
- erA.setProgram( prA );
- erA.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
- EventReport erB = new EventReport( "erB" );
- erB.setProgram( prA );
- erB.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
- EventReport erC = new EventReport( "erC" );
- erC.setProgram( prA );
- erC.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
-
- int idA = eventReportService.saveEventReport( erA );
- int idB = eventReportService.saveEventReport( erB );
- int idC = eventReportService.saveEventReport( erC );
-
- assertNotNull( eventReportService.getEventReport( idA ) );
- assertNotNull( eventReportService.getEventReport( idB ) );
- assertNotNull( eventReportService.getEventReport( idC ) );
-
- eventReportService.deleteEventReport( erA );
-
- assertNull( eventReportService.getEventReport( idA ) );
- assertNotNull( eventReportService.getEventReport( idB ) );
- assertNotNull( eventReportService.getEventReport( idC ) );
-
- eventReportService.deleteEventReport( erB );
-
- assertNull( eventReportService.getEventReport( idA ) );
- assertNull( eventReportService.getEventReport( idB ) );
- assertNotNull( eventReportService.getEventReport( idC ) );
-
- eventReportService.deleteEventReport( erC );
-
- assertNull( eventReportService.getEventReport( idA ) );
- assertNull( eventReportService.getEventReport( idB ) );
- assertNull( eventReportService.getEventReport( idC ) );
- }
-}
+package org.hisp.dhis.eventreport;
+
+/*
+ * Copyright (c) 2004-2014, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import static org.junit.Assert.*;
+
+import org.hisp.dhis.DhisSpringTest;
+import org.hisp.dhis.program.Program;
+import org.hisp.dhis.program.ProgramService;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @author Lars Helge Overland
+ */
+public class EventReportServiceTest
+ extends DhisSpringTest
+{
+ @Autowired
+ private EventReportService eventReportService;
+
+ @Autowired
+ private ProgramService programService;
+
+ private Program prA;
+
+ @Override
+ public void setUpTest()
+ {System.out.println("\n\n === \n 1 ");
+ prA = createProgram( 'A', null, null );System.out.println("\n\n === \n 2 ");
+ programService.addProgram( prA );System.out.println("\n\n === \n 3 ");
+ }
+
+ @Test
+ public void testSaveGet()
+ {
+ EventReport erA = new EventReport( "erA" );
+ erA.setProgram( prA );
+ erA.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
+ EventReport erB = new EventReport( "erB" );
+ erB.setProgram( prA );
+ erB.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
+ EventReport erC = new EventReport( "erC" );
+ erC.setProgram( prA );
+ erC.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
+
+ int idA = eventReportService.saveEventReport( erA );
+ int idB = eventReportService.saveEventReport( erB );
+ int idC = eventReportService.saveEventReport( erC );
+
+ assertEquals( "erA", eventReportService.getEventReport( idA ).getName() );
+ assertEquals( "erB", eventReportService.getEventReport( idB ).getName() );
+ assertEquals( "erC", eventReportService.getEventReport( idC ).getName() );
+ }
+
+ @Test
+ public void testDelete()
+ {
+ EventReport erA = new EventReport( "erA" );
+ erA.setProgram( prA );
+ erA.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
+ EventReport erB = new EventReport( "erB" );
+ erB.setProgram( prA );
+ erB.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
+ EventReport erC = new EventReport( "erC" );
+ erC.setProgram( prA );
+ erC.setDataType( EventReport.DATA_TYPE_AGGREGATED_VALUES );
+
+ int idA = eventReportService.saveEventReport( erA );
+ int idB = eventReportService.saveEventReport( erB );
+ int idC = eventReportService.saveEventReport( erC );
+
+ assertNotNull( eventReportService.getEventReport( idA ) );
+ assertNotNull( eventReportService.getEventReport( idB ) );
+ assertNotNull( eventReportService.getEventReport( idC ) );
+
+ eventReportService.deleteEventReport( erA );
+
+ assertNull( eventReportService.getEventReport( idA ) );
+ assertNotNull( eventReportService.getEventReport( idB ) );
+ assertNotNull( eventReportService.getEventReport( idC ) );
+
+ eventReportService.deleteEventReport( erB );
+
+ assertNull( eventReportService.getEventReport( idA ) );
+ assertNull( eventReportService.getEventReport( idB ) );
+ assertNotNull( eventReportService.getEventReport( idC ) );
+
+ eventReportService.deleteEventReport( erC );
+
+ assertNull( eventReportService.getEventReport( idA ) );
+ assertNull( eventReportService.getEventReport( idB ) );
+ assertNull( eventReportService.getEventReport( idC ) );
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm 2014-04-12 12:12:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm 2014-04-13 13:14:11 +0000
@@ -100,19 +100,6 @@
</td>
<td></td>
</tr>
-
- <tr name='localIdField' style='display:none;'>
- <td><label for="type">$i18n.getString( "period_type" )</label></td>
- <td>
- <select type='checkbox' id="periodTypeName" name="periodTypeName" >
- <option value="">[$i18n.getString( "please_select" )]</option>
- #foreach ( $periodType in $periodTypes )
- <option value="$periodType.name">$i18n.getString( $periodType.name )</option>
- #end
- </select>
- </td>
- <td></td>
- </tr>
</tbody>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm 2014-04-12 12:12:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm 2014-04-13 13:14:11 +0000
@@ -97,19 +97,6 @@
<td></td>
</tr>
- <tr name='localIdField' #if($attribute.valueType!='localId' ) style='display:none;' #end>
- <td><label for="type">$i18n.getString( "period_type" )</label></td>
- <td>
- <select type='checkbox' id="periodTypeName" name="periodTypeName" >
- <option value="">[$i18n.getString( "please_select" )]</option>
- #foreach ( $periodType in $periodTypes )
- <option value="$periodType.name" #if( $attribute.periodType.name==$periodType.name ) selected #end>$i18n.getString( $periodType.name )</option>
- #end
- </select>
- </td>
- <td></td>
- </tr>
-
</tbody>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties 2014-04-10 13:39:37 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties 2014-04-13 13:14:11 +0000
@@ -264,6 +264,11 @@
F_TRACKED_ENTITY_INSTANCE_REMINDER_MANAGEMENT=Manage Tracked Entity Instance Reminders
F_TRACKED_ENTITY_MANAGEMENT=Manage Tracked Entities
F_TRACKED_ENTITY_ADD=Add Tracked Entities
+F_TRACKED_ENTITY_UPDATE = Update Tracked Entities
+F_VALIDATIONRULEGROUP_ADD = Add Validation Rule Groups
+F_SQLVIEW_ADD = Add Sql View
+F_ORGUNITGROUPSET_ADD = Add Organisation Unit Group Set
+F_OPTIONSET_ADD = Add Option Set
#-- FRED API module -----------------------------------------------------------#