dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19998
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8970: Minor fix for program-validation-rule
------------------------------------------------------------
revno: 8970
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-11-12 13:07:30 +0700
message:
Minor fix for program-validation-rule
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.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-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java 2012-11-08 13:09:31 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java 2012-11-12 06:07:30 +0000
@@ -87,9 +87,7 @@
private ProgramExpression rightSide;
private Program program;
-
- private Boolean dateType;
-
+
// -------------------------------------------------------------------------
// Constructor
// -------------------------------------------------------------------------
@@ -113,8 +111,7 @@
this.leftSide = leftSide;
this.rightSide = rightSide;
this.program = program;
- this.dateType = dateType;
- }
+ }
// -------------------------------------------------------------------------
// hashCode() and equals()
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java 2012-11-09 04:05:20 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java 2012-11-12 06:07:30 +0000
@@ -132,13 +132,13 @@
String operator = validation.getOperator().getMathematicalOperator();
if ( (leftSideValue != null && rightSideValue.equals( NOT_NULL_VALUE_IN_EXPRESSION ) && rightSideValue == null)
- || ( !(leftSideValue != null && rightSideValue != null
- && ( (operator.equals( "==" ) && leftSideValue.compareTo( rightSideValue )==0 )
+ || ( (leftSideValue != null && rightSideValue != null
+ && !( (operator.equals( "==" ) && leftSideValue.compareTo( rightSideValue )==0 )
|| (operator.equals( "<" ) && leftSideValue.compareTo( rightSideValue ) < 0 )
|| (operator.equals( "<=" ) && (leftSideValue.compareTo( rightSideValue ) <= 0))
|| (operator.equals( ">" ) && leftSideValue.compareTo( rightSideValue ) > 0)
- || (operator.equals( ">=" ) && leftSideValue.compareTo( rightSideValue ) >= 0))
- || (operator.equals( "!=" ) && leftSideValue.compareTo( rightSideValue ) ==0 ))) )
+ || (operator.equals( ">=" ) && leftSideValue.compareTo( rightSideValue ) >= 0)
+ || (operator.equals( "!=" ) && leftSideValue.compareTo( rightSideValue ) ==0 ) ))))
{
return new ProgramValidationResult( programStageInstance, validation, leftSideValue, rightSideValue );
}