dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28649
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14321: Remove group-by property from TrackedEntityAttribute; Rename the property displayedInList to disp...
------------------------------------------------------------
revno: 14321
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-03-20 22:05:57 +0700
message:
Remove group-by property from TrackedEntityAttribute; Rename the property displayedInList to displayInList on ProgramTrackedEntityAttribute
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttribute.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStore.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityFormService.java
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/hibernate/HibernateTrackedEntityAttributeStore.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramTrackedEntityAttribute.hbm.xml
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/trackedentity/TrackedEntityAttributeServiceTest.java
dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStoreTest.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetAttributesByProgramAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetTrackedEntityInstanceAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SearchTrackedEntityInstanceAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SelectAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/UpdateMobileSettingAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/ShowAttributeInListNoProgramAction.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/ProgramTrackedEntityAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java 2014-03-20 14:06:16 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java 2014-03-20 15:05:57 +0000
@@ -59,7 +59,7 @@
private Integer sortOrder;
- private boolean displayedInList;
+ private boolean displayInList;
private Boolean mandatory;
@@ -71,19 +71,19 @@
{
}
- public ProgramTrackedEntityAttribute( TrackedEntityAttribute attribute, int sortOrder, boolean displayedInList )
+ public ProgramTrackedEntityAttribute( TrackedEntityAttribute attribute, int sortOrder, boolean displayInList )
{
this.attribute = attribute;
this.sortOrder = sortOrder;
- this.displayedInList = displayedInList;
+ this.displayInList = displayInList;
}
- public ProgramTrackedEntityAttribute( TrackedEntityAttribute attribute, Integer sortOrder, boolean displayedInList,
+ public ProgramTrackedEntityAttribute( TrackedEntityAttribute attribute, Integer sortOrder, boolean displayInList,
Boolean mandatory )
{
this.attribute = attribute;
this.sortOrder = sortOrder;
- this.displayedInList = displayedInList;
+ this.displayInList = displayInList;
this.mandatory = mandatory;
}
@@ -138,11 +138,11 @@
@JsonProperty
@JsonView( { DetailedView.class } )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
- public Boolean isMandatory()
+ public Boolean getMandatory()
{
return mandatory;
}
-
+
public void setMandatory( Boolean mandatory )
{
this.mandatory = mandatory;
@@ -174,14 +174,16 @@
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class, WithoutOrganisationUnitsView.class } )
- @JacksonXmlProperty( localName = "displayedInList", namespace = DxfNamespaces.DXF_2_0 )
- public Boolean getDisplayedInList()
- {
- return displayedInList;
- }
-
- public void setDisplayedInList( Boolean displayedInList )
- {
- this.displayedInList = displayedInList;
- }
+ @JacksonXmlProperty( localName = "displayInList", namespace = DxfNamespaces.DXF_2_0 )
+ public boolean isDisplayInList()
+ {
+ return displayInList;
+ }
+
+
+ public void setDisplayInList( boolean displayInList )
+ {
+ this.displayInList = displayInList;
+ }
+
}
=== 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-03-20 05:43:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttribute.java 2014-03-20 15:05:57 +0000
@@ -88,8 +88,6 @@
private Boolean inherit = false;
- private Boolean groupBy = false;
-
private TrackedEntityAttributeGroup attributeGroup;
private OptionSet optionSet;
@@ -163,19 +161,6 @@
{
this.inherit = inherit;
}
-
- @JsonProperty
- @JsonView( { DetailedView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
- public Boolean getGroupBy()
- {
- return groupBy;
- }
-
- public void setGroupBy( Boolean groupBy )
- {
- this.groupBy = groupBy;
- }
@JsonProperty
@JsonView( { DetailedView.class } )
@@ -401,7 +386,6 @@
description = trackedEntityAttribute.getDescription();
valueType = trackedEntityAttribute.getValueType();
inherit = trackedEntityAttribute.getInherit();
- groupBy = trackedEntityAttribute.getGroupBy();
attributeGroup = trackedEntityAttribute.getAttributeGroup();
expression = trackedEntityAttribute.getExpression();
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeService.java 2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeService.java 2014-03-20 15:05:57 +0000
@@ -113,13 +113,6 @@
* @return List of attributes
*/
Collection<TrackedEntityAttribute> getOptionalAttributesWithoutGroup();
-
- /**
- * Get attributes by groupBy option
- *
- * @return TrackedEntityAttribute with groupby as true
- */
- TrackedEntityAttribute getTrackedEntityAttributeByGroupBy();
/**
* Get attributes without groups
@@ -154,7 +147,7 @@
*
* @return List of attributes
*/
- Collection<TrackedEntityAttribute> getTrackedEntityAttributesDisplayedInList( boolean displayInListNoProgram );
+ Collection<TrackedEntityAttribute> getTrackedEntityAttributesDisplayInList( boolean displayInListNoProgram );
/**
* Returns {@link TrackedEntityAttribute} list with paging
@@ -192,5 +185,5 @@
*
*/
int getTrackedEntityAttributeCountByName( String name );
-
+
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStore.java 2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStore.java 2014-03-20 15:05:57 +0000
@@ -55,7 +55,7 @@
* @return List of attributes
*/
Collection<TrackedEntityAttribute> getOptionalAttributesWithoutGroup();
-
+
/**
* Get {@link TrackedEntityAttribute} without any group
*
@@ -64,13 +64,6 @@
Collection<TrackedEntityAttribute> getWithoutGroup();
/**
- * Get attributes by groupBy option
- *
- * @return TrackedEntityAttribute with groupby as true
- */
- TrackedEntityAttribute getByGroupBy();
-
- /**
* Get attributes which are displayed in visit schedule
*
* @param displayOnVisitSchedule True/False value
@@ -82,10 +75,10 @@
/**
* Get attributes which are displayed in visit schedule
*
- * @param displayInListNoProgram True/False value
+ * @param displayInList True/False value
*
* @return List of attributes
*/
- Collection<TrackedEntityAttribute> getDisplayedInList( boolean displayInListNoProgram );
+ Collection<TrackedEntityAttribute> getDisplayInList( boolean displayInList );
}
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java 2014-03-20 14:06:16 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java 2014-03-20 15:05:57 +0000
@@ -431,7 +431,7 @@
for ( ProgramTrackedEntityAttribute programTrackedEntityAttribute : program.getAttributes() )
{
- mandatoryMap.put( programTrackedEntityAttribute.getAttribute(), programTrackedEntityAttribute.isMandatory() );
+ mandatoryMap.put( programTrackedEntityAttribute.getAttribute(), programTrackedEntityAttribute.getMandatory() );
}
for ( TrackedEntityAttributeValue value : trackedEntityInstance.getAttributeValues() )
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2014-03-20 15:05:57 +0000
@@ -288,8 +288,6 @@
}
}
- this.setGroupByAttribute( attService.getTrackedEntityAttributeByGroupBy() );
-
if ( items.isEmpty() )
{
return null;
@@ -317,8 +315,6 @@
}
}
- this.setGroupByAttribute( attService.getTrackedEntityAttributeByGroupBy() );
-
if ( items.isEmpty() )
{
return null;
@@ -412,7 +408,7 @@
}
Collection<TrackedEntityAttribute> displayAttributes = attributeService
- .getTrackedEntityAttributesDisplayedInList( true );
+ .getTrackedEntityAttributesDisplayInList( true );
String resultSet = "";
for ( TrackedEntityInstance patient : patients )
@@ -1549,7 +1545,7 @@
String resultSet = "";
- Collection<TrackedEntityAttribute> displayAttributes = attributeService.getTrackedEntityAttributesDisplayedInList( true );
+ Collection<TrackedEntityAttribute> displayAttributes = attributeService.getTrackedEntityAttributesDisplayInList( true );
for ( TrackedEntityInstance patient : patients )
{
resultSet += patient.getId() + "/";
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java 2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java 2014-03-20 15:05:57 +0000
@@ -296,7 +296,7 @@
mobileAttribute.setName( pa.getName() );
mobileAttribute.setType( pa.getValueType() );
mobileAttribute.setValue( "" );
- if ( ppa.getDisplayedInList() )
+ if ( ppa.isDisplayInList() )
{
mobileAttribute.setDisplayedInList( true );
}
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java 2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java 2014-03-20 15:05:57 +0000
@@ -99,11 +99,6 @@
return attributeStore.getByName( name );
}
- public TrackedEntityAttribute getTrackedEntityAttributeByGroupBy()
- {
- return attributeStore.getByGroupBy();
- }
-
public Collection<TrackedEntityAttribute> getOptionalAttributesWithoutGroup()
{
return attributeStore.getOptionalAttributesWithoutGroup();
@@ -144,9 +139,9 @@
return new HashSet<TrackedEntityAttribute>();
}
- public Collection<TrackedEntityAttribute> getTrackedEntityAttributesDisplayedInList( boolean displayInListNoProgram )
+ public Collection<TrackedEntityAttribute> getTrackedEntityAttributesDisplayInList( boolean displayInList )
{
- return attributeStore.getDisplayedInList( displayInListNoProgram );
+ return attributeStore.getDisplayInList( displayInList );
}
public Collection<TrackedEntityAttribute> getTrackedEntityAttributesBetweenByName( String name, int min, int max )
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityFormService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityFormService.java 2014-03-20 14:06:16 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityFormService.java 2014-03-20 15:05:57 +0000
@@ -284,7 +284,7 @@
if( program!= null)
{
- madatory = programAttributeService.getProgramTrackedEntityAttribute( program, attribute ).isMandatory();
+ madatory = programAttributeService.getProgramTrackedEntityAttribute( program, attribute ).getMandatory();
}
inputHtml = TAG_OPEN + "input id=\"attr" + attribute.getId() + "\" name=\"attr" + attribute.getId()
=== 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-03-19 18:43:44 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java 2014-03-20 15:05:57 +0000
@@ -164,7 +164,7 @@
else
{
Collection<TrackedEntityAttribute> filters = attributeService.getAllTrackedEntityAttributes();
- Collection<TrackedEntityAttribute> attributes = attributeService.getTrackedEntityAttributesDisplayedInList( true );
+ Collection<TrackedEntityAttribute> attributes = attributeService.getTrackedEntityAttributesDisplayInList( true );
filters.removeAll( attributes );
params.getAttributes().addAll( QueryItem.getQueryItems( attributes ) );
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityAttributeStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityAttributeStore.java 2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityAttributeStore.java 2014-03-20 15:05:57 +0000
@@ -61,12 +61,6 @@
}
@Override
- public TrackedEntityAttribute getByGroupBy()
- {
- return (TrackedEntityAttribute) getCriteria( Restrictions.eq( "groupBy", true ) ).uniqueResult();
- }
-
- @Override
@SuppressWarnings( "unchecked" )
public Collection<TrackedEntityAttribute> getWithoutGroup()
{
@@ -82,8 +76,8 @@
@Override
@SuppressWarnings( "unchecked" )
- public Collection<TrackedEntityAttribute> getDisplayedInList( boolean displayInListNoProgram )
+ public Collection<TrackedEntityAttribute> getDisplayInList( boolean displayInList )
{
- return getCriteria( Restrictions.eq( "displayInListNoProgram", displayInListNoProgram ) ).list();
+ return getCriteria( Restrictions.eq( "displayInList", displayInList ) ).list();
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2014-03-20 10:49:17 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2014-03-20 15:05:57 +0000
@@ -288,6 +288,9 @@
executeSql( "ALTER TABLE trackedentityattribute DROP COLUMN mandatory" );
executeSql( "update datavalue set storedby='aggregated_from_tracker' where storedby='DHIS-System'");
+
+ executeSql( "ALTER TABLE trackedentityattribute DROP COLUMN groupBy" );
+
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramTrackedEntityAttribute.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramTrackedEntityAttribute.hbm.xml 2014-03-20 14:11:07 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramTrackedEntityAttribute.hbm.xml 2014-03-20 15:05:57 +0000
@@ -17,7 +17,7 @@
<property name="sortOrder" column="sort_order" />
- <property name="displayedInList" column="displayinlist" />
+ <property name="displayInList" column="displayinlist" />
<property name="mandatory" column="mandatory" />
=== 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-03-20 05:43:18 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityAttribute.hbm.xml 2014-03-20 15:05:57 +0000
@@ -19,8 +19,6 @@
<property name="valueType" column="valuetype" not-null="true" />
- <property name="groupBy" column="groupby" />
-
<many-to-one name="attributeGroup" column="trackedentityattributegroupid" class="org.hisp.dhis.trackedentity.TrackedEntityAttributeGroup"
foreign-key="fk_attribute_group" />
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeServiceTest.java 2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeServiceTest.java 2014-03-20 15:05:57 +0000
@@ -93,20 +93,6 @@
}
@Test
- public void testGetTrackedEntityAttributeByGroupBy()
- {
- attributeA.setGroupBy( true );
- attributeB.setGroupBy( false );
- attributeC.setGroupBy( false );
-
- attributeStore.save( attributeA );
- attributeStore.save( attributeB );
- attributeStore.save( attributeC );
-
- assertEquals( attributeA, attributeStore.getByGroupBy() );
- }
-
- @Test
public void testGetTrackedEntityAttributesWithoutGroup()
{
attributeStore.save( attributeA );
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStoreTest.java 2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStoreTest.java 2014-03-20 15:05:57 +0000
@@ -176,20 +176,6 @@
}
@Test
- public void testGetTrackedEntityAttributeByGroupBy()
- {
- attributeA.setGroupBy( true );
- attributeB.setGroupBy( false );
- attributeC.setGroupBy( false );
-
- attributeService.addTrackedEntityAttribute( attributeA );
- attributeService.addTrackedEntityAttribute( attributeB );
- attributeService.addTrackedEntityAttribute( attributeC );
-
- assertEquals( attributeA, attributeService.getTrackedEntityAttributeByGroupBy() );
- }
-
- @Test
public void testGetTrackedEntityAttributesWithoutGroup()
{
attributeService.addTrackedEntityAttribute( attributeA );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetAttributesByProgramAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetAttributesByProgramAction.java 2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetAttributesByProgramAction.java 2014-03-20 15:05:57 +0000
@@ -118,7 +118,7 @@
attributes = new ArrayList<TrackedEntityAttribute>(
attributeService.getTrackedEntityAttributesWithoutProgram() );
Collection<TrackedEntityAttribute> attribuesInList = attributeService
- .getTrackedEntityAttributesDisplayedInList( true );
+ .getTrackedEntityAttributesDisplayInList( true );
attributes.removeAll( attribuesInList );
attributes.addAll( attribuesInList );
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetTrackedEntityInstanceAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetTrackedEntityInstanceAction.java 2014-03-20 14:06:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetTrackedEntityInstanceAction.java 2014-03-20 15:05:57 +0000
@@ -241,7 +241,7 @@
{
for ( ProgramTrackedEntityAttribute programAttribute : p.getAttributes() )
{
- if ( !programAttribute.getDisplayedInList() )
+ if ( !programAttribute.isDisplayInList() )
{
attributes.remove( programAttribute.getAttribute() );
}
@@ -257,7 +257,7 @@
{
attributes = program.getTrackedEntityAttributes();
for( ProgramTrackedEntityAttribute programAttribute : program.getAttributes() ){
- mandatoryMap.put( programAttribute.getAttribute().getId(), programAttribute.isMandatory() );
+ mandatoryMap.put( programAttribute.getAttribute().getId(), programAttribute.getMandatory() );
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SearchTrackedEntityInstanceAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SearchTrackedEntityInstanceAction.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SearchTrackedEntityInstanceAction.java 2014-03-20 15:05:57 +0000
@@ -228,7 +228,7 @@
else
{
attributes = new ArrayList<TrackedEntityAttribute>(
- attributeService.getTrackedEntityAttributesDisplayedInList( true ) );
+ attributeService.getTrackedEntityAttributesDisplayInList( true ) );
Collections.sort( attributes, new TrackedEntityAttributeSortOrderInListNoProgramComparator() );
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SelectAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SelectAction.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SelectAction.java 2014-03-20 15:05:57 +0000
@@ -117,7 +117,7 @@
organisationUnit = selectionManager.getSelectedOrganisationUnit();
Collection<TrackedEntityAttribute> _attributes = attributeService.getTrackedEntityAttributesWithoutProgram();
- _attributes.addAll( attributeService.getTrackedEntityAttributesDisplayedInList( true ));
+ _attributes.addAll( attributeService.getTrackedEntityAttributesDisplayInList( true ));
attributes = new ArrayList<TrackedEntityAttribute>( _attributes );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java 2014-03-20 14:06:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java 2014-03-20 15:05:57 +0000
@@ -352,7 +352,7 @@
if ( program == null )
{
- attributes = new ArrayList<TrackedEntityAttribute>( attributeService.getTrackedEntityAttributesDisplayedInList( true ) );
+ attributes = new ArrayList<TrackedEntityAttribute>( attributeService.getTrackedEntityAttributesDisplayInList( true ) );
Collection<Program> programs = programService.getAllPrograms();
for ( Program p : programs )
@@ -370,7 +370,7 @@
attributes = program.getTrackedEntityAttributes();
for ( ProgramTrackedEntityAttribute programAttribute : program.getAttributes() )
{
- mandatoryMap.put( programAttribute.getAttribute().getId(), programAttribute.isMandatory() );
+ mandatoryMap.put( programAttribute.getAttribute().getId(), programAttribute.getMandatory() );
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/UpdateMobileSettingAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/UpdateMobileSettingAction.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/UpdateMobileSettingAction.java 2014-03-20 15:05:57 +0000
@@ -148,11 +148,11 @@
for ( TrackedEntityAttribute patientAttribute : allTrackedEntityAttributes )
{
- patientAttribute.setGroupBy( false );
- if ( patientAttribute.getId() == groupingAttributeId )
- {
- patientAttribute.setGroupBy( true );
- }
+// patientAttribute.setGroupBy( false );
+// if ( patientAttribute.getId() == groupingAttributeId )
+// {
+// patientAttribute.setGroupBy( true );
+// }
patientAttributeService.updateTrackedEntityAttribute( patientAttribute );
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/ShowAttributeInListNoProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/ShowAttributeInListNoProgramAction.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/ShowAttributeInListNoProgramAction.java 2014-03-20 15:05:57 +0000
@@ -84,11 +84,11 @@
throws Exception
{
availableAttributes = new ArrayList<TrackedEntityAttribute>(
- attributeService.getTrackedEntityAttributesDisplayedInList( false ) );
+ attributeService.getTrackedEntityAttributesDisplayInList( false ) );
Collections.sort( availableAttributes, IdentifiableObjectNameComparator.INSTANCE );
selectedAttributes = new ArrayList<TrackedEntityAttribute>(
- attributeService.getTrackedEntityAttributesDisplayedInList( true ) );
+ attributeService.getTrackedEntityAttributesDisplayInList( true ) );
Collections.sort( availableAttributes, IdentifiableObjectNameComparator.INSTANCE );
return SUCCESS;