dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29147
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14674: Validation
------------------------------------------------------------
revno: 14674
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-04-04 19:35:02 +0200
message:
Validation
modified:
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.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-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java 2014-04-04 17:20:41 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java 2014-04-04 17:35:02 +0000
@@ -285,6 +285,11 @@
violation = "Program must be defined when program status is defined";
}
+ if ( params.hasProgramDates() && !params.hasProgram() )
+ {
+ violation = "Program must be defined when program dates are specified";
+ }
+
if ( violation != null )
{
log.warn( "Validation failed: " + violation );