=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleAction.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleAction.java 2015-04-28 13:03:32 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleAction.java 2015-05-08 13:46:50 +0000 @@ -36,6 +36,7 @@ import org.hisp.dhis.common.view.DimensionalView; import org.hisp.dhis.common.view.ExportView; import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.program.ProgramStageSection; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonView; @@ -88,18 +89,29 @@ private ProgramRuleActionType programRuleActionType; /** - * The dataelement that is affected by the ruleAction. - * Used for - * hidefield - * showwarning - * showerror + * The data element that is affected by the rule action. + * Used for: + * + * */ private DataElement dataElement; /** + * The program stage section that is affected by the rule action. + */ + private ProgramStageSection programStageSection; + + /** * Used to determine which widget to display data for the two action types: - * displaytext - * displaykeydata + * + * */ private String location; @@ -178,6 +190,19 @@ } @JsonProperty + @JsonSerialize( as = BaseIdentifiableObject.class ) + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) + public ProgramStageSection getProgramStageSection() + { + return programStageSection; + } + + public void setProgramStageSection( ProgramStageSection programStageSection ) + { + this.programStageSection = programStageSection; + } + + @JsonProperty @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getLocation() { @@ -227,6 +252,7 @@ programRule = programRuleAction.getProgramRule(); programRuleActionType = programRuleAction.getProgramRuleActionType(); dataElement = programRuleAction.getDataElement(); + programStageSection = programRuleAction.getProgramStageSection(); location = programRuleAction.getLocation(); content = programRuleAction.getContent(); data = programRuleAction.getData(); @@ -236,6 +262,7 @@ programRule = programRuleAction.getProgramRule() == null ? programRule : programRuleAction.getProgramRule(); programRuleActionType = programRuleAction.getProgramRuleActionType() == null ? programRuleActionType : programRuleAction.getProgramRuleActionType(); dataElement = programRuleAction.getDataElement() == null ? dataElement : programRuleAction.getDataElement(); + programStageSection = programRuleAction.getProgramStageSection() == null ? programStageSection : programRuleAction.getProgramStageSection(); location = programRuleAction.getLocation() == null ? location : programRuleAction.getLocation(); content = programRuleAction.getContent() == null ? content : programRuleAction.getContent(); data = programRuleAction.getData() == null ? data : programRuleAction.getData(); === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleActionType.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleActionType.java 2015-03-13 08:24:36 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleActionType.java 2015-05-08 13:46:50 +0000 @@ -35,6 +35,7 @@ DISPLAYTEXT( "displaytext" ), DISPLAYKEYVALUEPAIR( "displaykeyvaluepair" ), HIDEFIELD( "hidefield" ), + HIDESECTION( "hidesection" ), ASSIGNVARIABLE( "assignvariable" ), SHOWWARNING( "showwarning" ), SHOWERROR( "showerror" ); === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleVariable.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleVariable.java 2015-04-28 13:03:32 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleVariable.java 2015-05-08 13:46:50 +0000 @@ -84,10 +84,14 @@ private TrackedEntityAttribute attribute; /** - * The data element that is linked to the variable. Must de defined if the + * The data element that is linked to the variable. Must be defined if the * sourceType is one of the following: - * dataelement_newest_event_program_stage dataelement_newest_event_program - * dataelement_current_event + * + * */ private DataElement dataElement; @@ -107,11 +111,11 @@ } public ProgramRuleVariable( String name, - Program program, - ProgramRuleVariableSourceType sourceType, - TrackedEntityAttribute attribute, - DataElement dataElement, - ProgramStage programStage) + Program program, + ProgramRuleVariableSourceType sourceType, + TrackedEntityAttribute attribute, + DataElement dataElement, + ProgramStage programStage) { this(); this.name = name; === modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/programrule/hibernate/ProgramRuleAction.hbm.xml' --- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/programrule/hibernate/ProgramRuleAction.hbm.xml 2015-04-28 20:52:00 +0000 +++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/programrule/hibernate/ProgramRuleAction.hbm.xml 2015-05-08 13:46:50 +0000 @@ -29,6 +29,9 @@ + +