getProgramIndicatorsMap()
{
return programIndicatorsMap;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/programindicator/AddProgramIndicatorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/programindicator/AddProgramIndicatorAction.java 2015-08-28 10:23:48 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/programindicator/AddProgramIndicatorAction.java 2015-09-04 08:57:35 +0000
@@ -28,9 +28,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
import org.apache.commons.lang3.StringUtils;
import org.hisp.dhis.analytics.AggregationType;
import org.hisp.dhis.analytics.EventOutputType;
@@ -110,13 +107,6 @@
this.description = description;
}
- private String valueType;
-
- public void setValueType( String valueType )
- {
- this.valueType = valueType;
- }
-
private String expression;
public void setExpression( String expression )
@@ -159,13 +149,6 @@
this.displayInForm = displayInForm;
}
- private String rootDate;
-
- public void setRootDate( String rootDate )
- {
- this.rootDate = rootDate;
- }
-
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -174,20 +157,6 @@
public String execute()
throws Exception
{
- code = (code == null && code.trim().length() == 0) ? null : code;
- expression = expression.trim();
-
- if ( valueType.equals( ProgramIndicator.VALUE_TYPE_DATE ) )
- {
- Pattern pattern = Pattern.compile( "[(+|-|*|\\)]+" );
- Matcher matcher = pattern.matcher( expression );
-
- if ( matcher.find() && matcher.start() != 0 )
- {
- expression = "+" + expression;
- }
- }
-
Program program = programService.getProgram( programId );
ProgramIndicator indicator = new ProgramIndicator();
@@ -196,18 +165,15 @@
indicator.setCode( StringUtils.trimToNull( code ) );
indicator.setDescription( StringUtils.trimToNull( description ) );
indicator.setProgram( program );
- indicator.setValueType( StringUtils.trimToNull( valueType ) );
indicator.setExpression( StringUtils.trimToNull( expression ) );
indicator.setFilter( StringUtils.trimToNull( filter ) );
indicator.setAggregationType( AggregationType.valueOf( aggregationType ) );
indicator.setEventOutputType( EventOutputType.valueOf( eventOutputType ) );
indicator.setDecimals( decimals );
indicator.setDisplayInForm( displayInForm );
- indicator.setRootDate( StringUtils.trimToNull( rootDate ) );
programIndicatorService.addProgramIndicator( indicator );
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/programindicator/UpdateProgramIndicatorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/programindicator/UpdateProgramIndicatorAction.java 2015-08-28 10:23:48 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/programindicator/UpdateProgramIndicatorAction.java 2015-09-04 08:57:35 +0000
@@ -28,9 +28,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
import org.apache.commons.lang.StringUtils;
import org.hisp.dhis.analytics.AggregationType;
import org.hisp.dhis.analytics.EventOutputType;
@@ -96,13 +93,6 @@
this.description = description;
}
- private String valueType;
-
- public void setValueType( String valueType )
- {
- this.valueType = valueType;
- }
-
private String expression;
public void setExpression( String expression )
@@ -145,13 +135,6 @@
this.displayInForm = displayInForm;
}
- private String rootDate;
-
- public void setRootDate( String rootDate )
- {
- this.rootDate = rootDate;
- }
-
private Integer programId;
public Integer getProgramId()
@@ -167,34 +150,18 @@
public String execute()
throws Exception
{
- code = (code == null && code.trim().length() == 0) ? null : code;
- expression = expression.trim();
-
- if ( valueType.equals( ProgramIndicator.VALUE_TYPE_DATE ) )
- {
- Pattern pattern = Pattern.compile( "[(+|-|*|\\)]+" );
- Matcher matcher = pattern.matcher( expression );
-
- if ( matcher.find() && matcher.start() != 0 )
- {
- expression = "+" + expression;
- }
- }
-
ProgramIndicator indicator = programIndicatorService.getProgramIndicator( id );
indicator.setName( StringUtils.trimToNull( name ) );
indicator.setShortName( StringUtils.trimToNull( shortName ) );
indicator.setCode( StringUtils.trimToNull( code ) );
indicator.setDescription( StringUtils.trimToNull( description ) );
- indicator.setValueType( StringUtils.trimToNull( valueType ) );
indicator.setExpression( StringUtils.trimToNull( expression ) );
indicator.setFilter( StringUtils.trimToNull( filter ) );
indicator.setAggregationType( AggregationType.valueOf( aggregationType ) );
indicator.setEventOutputType( EventOutputType.valueOf( eventOutputType ) );
indicator.setDecimals( decimals );
indicator.setDisplayInForm( displayInForm );
- indicator.setRootDate( StringUtils.trimToNull( rootDate ) );
programIndicatorService.updateProgramIndicator( indicator );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramIndicator.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramIndicator.vm 2015-08-28 10:23:48 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramIndicator.vm 2015-09-04 08:57:35 +0000
@@ -53,16 +53,6 @@
|
- |
-
-
- |
- |
-
-
|
|
-
- |
-
-
- |
- |
-
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm 2015-09-03 08:15:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm 2015-09-04 08:57:35 +0000
@@ -53,16 +53,6 @@
|
- |
-
-
- |
- |
-
-
|
|
-
- |
-
-
- |
- |
-