dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43702
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22147: tracked entity attribute search scope - added one more scope
------------------------------------------------------------
revno: 22147
committer: Abyot Asalefew Gizaw <abyot@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-03-07 11:32:45 +0100
message:
tracked entity attribute search scope - added one more scope
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeSearchScope.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm
--
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/trackedentity/TrackedEntityAttributeSearchScope.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeSearchScope.java 2016-02-29 11:22:40 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeSearchScope.java 2016-03-07 10:32:45 +0000
@@ -34,32 +34,5 @@
*/
public enum TrackedEntityAttributeSearchScope
{
-
- NOT_SEARCHABLE( "not_searchable" ), OWN_OUS( "own_organisations" ), SEARCH_OUS( "search_organisations" );
-
- private final String value;
-
- private TrackedEntityAttributeSearchScope( String value )
- {
- this.value = value;
- }
-
- public static TrackedEntityAttributeSearchScope fromValue( String value )
- {
- for ( TrackedEntityAttributeSearchScope trackedEntityAttributeSearchScope : TrackedEntityAttributeSearchScope
- .values() )
- {
- if ( trackedEntityAttributeSearchScope.value.equalsIgnoreCase( value ) )
- {
- return trackedEntityAttributeSearchScope;
- }
- }
-
- return null;
- }
-
- public String getValue()
- {
- return value;
- }
+ NOT_SEARCHABLE, DATA_CAPTURE_ORG_UNITS, SEARCH_ORG_UNITS, ALL_ORG_UNITS
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2016-02-29 11:22:40 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2016-03-07 10:32:45 +0000
@@ -259,7 +259,9 @@
executeSql( "UPDATE trackedentityattribute SET valuetype='number' WHERE valuetype='age'" );
executeSql( "update trackedentityattribute set searchscope='NOT_SEARCHABLE' where confidential=true" );
- executeSql( "update trackedentityattribute set searchscope='SEARCH_OUS' where searchscope is null" );
+ executeSql( "update trackedentityattribute set searchscope='SEARCH_ORG_UNITS' where searchscope is null" );
+ executeSql( "update trackedentityattribute set searchscope='SEARCH_ORG_UNITS' where searchscope='SEARCH_OUS'" );
+ executeSql( "update trackedentityattribute set searchscope='DATA_CAPTURE_ORG_UNITS' where searchscope='OWN_OUS'" );
executeSql( "DROP TABLE orgunitgroupprograms" );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2016-02-29 11:22:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2016-03-07 10:32:45 +0000
@@ -549,5 +549,6 @@
not_available_for_search_and_analytics=Not available for search and analytics
search_scope=Search scope
not_searchable=Not searchable
-within_own_ous=Within data capture organisations
-within_search_ous=Within search organisations
\ No newline at end of file
+across_data_capture_orgunits=Across data capture organisation units
+across_search_orgunits=Across search organisation units
+across_all_orgunits=Across all organisation units
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm 2016-02-29 11:22:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm 2016-03-07 10:32:45 +0000
@@ -93,8 +93,9 @@
<td><label for="searchScope">$i18n.getString( "search_scope" ) <br /></label></td>
<td>
<select id="searchScope" name="searchScope" >
- <option value='SEARCH_OUS'>$i18n.getString('within_search_ous')</option>
- <option value='OWN_OUS'>$i18n.getString('within_own_ous')</option>
+ <option value='SEARCH_ORG_UNITS'>$i18n.getString('across_search_orgunits')</option>
+ <option value='DATA_CAPTURE_ORG_UNITS'>$i18n.getString('across_data_capture_orgunits')</option>
+ <option value='ALL_ORG_UNITS'>$i18n.getString('across_all_orgunits')</option>
<option value='NOT_SEARCHABLE'>$i18n.getString('not_searchable')</option>
</select>
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm 2016-02-29 11:22:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm 2016-03-07 10:32:45 +0000
@@ -39,7 +39,7 @@
<td><input type="text" id="shortName" name="shortName" value="$!encoder.htmlEncode( $attribute.shortName )" ></td>
</tr>
<tr>
- <td><label for="code">$i18n.getString( "code" )</td>
+ <td><label for="code">$i18n.getString( "code" )</label></td>
<td><input type="text" id="code" name="code" value="$!encoder.htmlEncode( $attribute.code )"></label></td>
</tr>
<tr>
@@ -90,8 +90,9 @@
<td><label for="searchScope">$i18n.getString( "search_scope" ) <br /></label></td>
<td>
<select id="searchScope" name="searchScope" >
- <option value='SEARCH_OUS' #if( $attribute.searchScope=='SEARCH_OUS' ) selected #end>$i18n.getString('within_search_ous')</option>
- <option value='OWN_OUS' #if( $attribute.searchScope=='OWN_OUS' ) selected #end>$i18n.getString('within_own_ous')</option>
+ <option value='SEARCH_ORG_UNITS' #if( $attribute.searchScope=='SEARCH_ORG_UNITS' ) selected #end>$i18n.getString('across_search_orgunits')</option>
+ <option value='DATA_CAPTURE_ORG_UNITS' #if( $attribute.searchScope=='DATA_CAPTURE_ORG_UNITS' ) selected #end>$i18n.getString('across_data_capture_orgunits')</option>
+ <option value='ALL_ORG_UNITS' #if( $attribute.searchScope=='ALL_ORG_UNITS' ) selected #end>$i18n.getString('across_all_orgunits')</option>
<option value='NOT_SEARCHABLE' #if( $attribute.searchScope=='NOT_SEARCHABLE' ) selected #end>$i18n.getString('not_searchable')</option>
</select>
</td>