[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17780: Unused import

2014-12-23 Thread noreply

revno: 17780
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2014-12-23 10:29:34 +0100
message:
  Unused import
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.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/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2014-12-22 21:47:45 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2014-12-23 09:29:34 +
@@ -369,7 +369,7 @@
 {
 for ( DataSet dataSet : dataSets )
 {
-if( dataSet != null && !dataSet.isAllowFuturePeriods() )
+if ( dataSet != null && !dataSet.isAllowFuturePeriods() )
 {
 return false;
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java	2014-12-22 21:47:45 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java	2014-12-23 09:29:34 +
@@ -33,7 +33,6 @@
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.datavalue.DataValue;
 import org.hisp.dhis.datavalue.DataValueService;

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17781: support validation for xml in /api/schemas/type endpoint

2014-12-23 Thread noreply

revno: 17781
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-12-23 10:40:40 +0100
message:
  support validation for xml in /api/schemas/type endpoint
added:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/ValidationViolations.java
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/ValidationViolation.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SchemaController.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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/ValidationViolation.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/ValidationViolation.java	2014-12-22 15:37:24 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/ValidationViolation.java	2014-12-23 09:40:40 +
@@ -31,6 +31,7 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import org.hisp.dhis.common.DxfNamespaces;
 
 /**
@@ -39,6 +40,7 @@
 @JsonPropertyOrder( {
 "message"
 } )
+@JacksonXmlRootElement( localName = "validationViolation", namespace = DxfNamespaces.DXF_2_0 )
 public class ValidationViolation
 {
 private String property;

=== added file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/ValidationViolations.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/ValidationViolations.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/ValidationViolations.java	2014-12-23 09:40:40 +
@@ -0,0 +1,71 @@
+package org.hisp.dhis.dxf2.schema;
+
+/*
+ * Copyright (c) 2004-2014, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import org.hisp.dhis.common.DxfNamespaces;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Temporary wrapper for ValidationViolation
+ *
+ * @author Morten Olav Hansen 
+ */
+@JacksonXmlRootElement( localName = "validationViolations", namespace = DxfNamespaces.DXF_2_0 )
+public class ValidationViolations
+{
+private List validationViolations = new ArrayList<>();
+
+public ValidationViolations()
+{
+}
+
+public ValidationViolations( List validationViolations )
+{
+this.validationViolations = validationViolations;
+}
+
+@JsonProperty
+@JacksonXmlElementWrapper( localName = "validationViolations", namespace = DxfNamespaces.DXF_2_0, useWrapping = false )
+@JacksonXmlProperty( localName = "validationViolation", namespace = DxfNamespaces.DXF_2_0 )
+public List getValidationViolations()
+{
+return validationViolations;

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17782: Cleanup

2014-12-23 Thread noreply

revno: 17782
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2014-12-23 10:38:34 +0100
message:
  Cleanup
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.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/user/UserService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java	2014-12-22 11:16:13 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java	2014-12-23 09:38:34 +
@@ -40,20 +40,11 @@
 
 /**
  * @author Chau Thu Tran
- * @version $Id$
  */
 public interface UserService
 {
 String ID = UserService.class.getName();
 
-boolean isSuperUser( UserCredentials userCredentials );
-
-boolean isLastSuperUser( UserCredentials userCredentials );
-
-boolean isSuperRole( UserAuthorityGroup userAuthorityGroup );
-
-boolean isLastSuperRole( UserAuthorityGroup userAuthorityGroup );
-
 // -
 // User
 // -
@@ -169,6 +160,20 @@
  */
 public Set getCoDimensionConstraints( UserCredentials userCredentials );
 
+boolean isSuperUser( UserCredentials userCredentials );
+
+boolean isLastSuperUser( UserCredentials userCredentials );
+
+boolean isSuperRole( UserAuthorityGroup userAuthorityGroup );
+
+boolean isLastSuperRole( UserAuthorityGroup userAuthorityGroup );
+
+Collection getUsersByName( String name );
+
+Collection getUsernames( String query, Integer max );
+
+int countDataSetUserAuthorityGroups( DataSet dataSet );
+
 // -
 // UserCredentials
 // -
@@ -308,7 +313,9 @@
  * @return true if current user can update this user, else false.
  */
 boolean canUpdate( UserCredentials userCredentials );
-
+
+boolean credentialsNonExpired( UserCredentials credentials );
+
 // -
 // UserAuthorityGroup
 // -
@@ -401,12 +408,4 @@
  * @param userRoles the collection of user roles.
  */
 void canIssueFilter( Collection userRoles );
-
-Collection getUsersByName( String name );
-
-Collection getUsernames( String query, Integer max );
-
-int countDataSetUserAuthorityGroups( DataSet dataSet );
-
-boolean credentialsNonExpired( UserCredentials credentials );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java	2014-12-22 11:16:13 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java	2014-12-23 09:38:34 +
@@ -121,75 +121,8 @@
 }
 
 // -
-// Implementing methods
+// UserService implementation
 // -
-
-@Override
-public boolean isSuperUser( UserCredentials userCredentials )
-{
-if ( userCredentials == null )
-{
-return false;
-}
-
-for ( UserAuthorityGroup group : userCredentials.getUserAuthorityGroups() )
-{
-if ( group.getAuthorities().contains( "ALL" ) )
-{
-return true;
-}
-}
-
-return false;
-}
-
-@Override
-public boolean isLastSuperUser( UserCredentials userCredentials )
-{
-if ( !isSuperUser( userCredentials ) )
-{
-return false; // Cannot be last if not super user
-}
-
-Collection users = userCredentialsStore.getAllUserCredentials();
-
-for ( UserCredentials user : users )
-{
-if ( isSuperUser( user ) && !user.equals( userCredentials ) )
-{
-return false;
-}
-}
-
-return true;
-}
-
-@Override
-public boolean isSuperRole( UserAuthorityGroup userAuthorityGroup )
-{
-if ( userAuthorityGroup == null )
-{
-return false;
-}
-
-return ( userAuthorityGroup.getAuthorities().contains( "ALL" ) );
-}
-
-@Override
-public boolean isLastSuperRole( UserAuthori

Re: [Dhis2-devs] DHIS2 Portal Demo Page broken

2014-12-23 Thread Jan Henrik Øverland
Hi, there was a problem with access rights in the demo db which is now
fixed. The portal has also been updated with the latest stable plugins.

https://apps.dhis2.org/portal/table.html
https://apps.dhis2.org/portal/chart.html
https://apps.dhis2.org/portal/map.html

On Mon, Dec 22, 2014 at 2:32 PM, Halvdan Grelland 
wrote:

> FYI this seems to be a permissions issue. Giving the superuser role the
> ALL permission fixes it.
>
> 2014-12-22 13:35 GMT+01:00 Jan Henrik Øverland <
> janhenrik.overl...@gmail.com>:
>
>> Hi Farai, will look at it as soon as I have the time.
>>
>> Jan
>>
>> On Thu, Dec 18, 2014 at 7:36 AM, Farai Mutero  wrote:
>>
>>> Hi Guys
>>>
>>> It seems like DHIS2 Portal page is broken (charts, tables and maps not
>>> rendering). Could you kindly assist?
>>>
>>> https://apps.dhis2.org/portal/
>>>
>>>
>>> Regards
>>>
>>> --
>>> Farai Mutero
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17783: UserService, method for checking write/update user access

2014-12-23 Thread noreply

revno: 17783
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2014-12-23 11:59:45 +0100
message:
  UserService, method for checking write/update user access
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml


--
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/user/UserService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java	2014-12-23 09:38:34 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java	2014-12-23 10:59:45 +
@@ -174,6 +174,18 @@
 
 int countDataSetUserAuthorityGroups( DataSet dataSet );
 
+/**
+ * Tests whether the current user is allowed to create a user associated
+ * with the given user group identifiers. Returns true if current user has 
+ * the F_USER_ADD authority. Returns true if the current user has the 
+ * F_USER_ADD_WITHIN_MANAGED_GROUP authority and can manage any of the given
+ * user groups. Returns false otherwise.
+ * 
+ * @param userGroups the user group identifiers.
+ * @return true if the current user can create user, false if not.
+ */
+boolean canAddOrUpdateUser( Collection userGroups );
+
 // -
 // UserCredentials
 // -

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java	2014-12-23 09:38:34 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java	2014-12-23 10:59:45 +
@@ -77,6 +77,13 @@
 {
 this.userStore = userStore;
 }
+
+private UserGroupService userGroupService;
+
+public void setUserGroupService( UserGroupService userGroupService )
+{
+this.userGroupService = userGroupService;
+}
 
 private UserCredentialsStore userCredentialsStore;
 
@@ -407,6 +414,42 @@
 return true;
 }
 
+public boolean canAddOrUpdateUser( Collection uids )
+{
+	User currentUser = currentUserService.getCurrentUser();
+	
+	if ( currentUser == null )
+	{
+	return false;
+	}
+	
+	boolean canAdd = currentUser.getUserCredentials().isAuthorized( UserGroup.AUTH_USER_ADD );
+	
+	if ( canAdd )
+	{
+	return true;
+	}
+	
+	boolean canAddInGroup = currentUser.getUserCredentials().isAuthorized( UserGroup.AUTH_USER_ADD_IN_GROUP );
+	
+	if ( !canAddInGroup )
+	{
+	return false;
+	}
+	
+	for ( String uid : uids )
+	{
+	UserGroup userGroup = userGroupService.getUserGroup( uid );
+
+if ( currentUser.canManage( userGroup ) )
+{
+return true;
+}
+	}
+	
+	return true;
+}
+
 // -
 // UserAuthorityGroup
 // -

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2014-12-22 11:16:13 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2014-12-23 10:59:45 +
@@ -591,6 +591,7 @@
 
   
 
+
 
 
 

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17784: User invites/creation. Centralized code for checking permissions.

2014-12-23 Thread noreply

revno: 17784
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2014-12-23 12:52:48 +0100
message:
  User invites/creation. Centralized code for checking permissions.
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2014-12-22 10:31:50 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2014-12-23 11:52:48 +
@@ -52,7 +52,6 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserGroup;
 import org.hisp.dhis.user.UserGroupService;
 import org.hisp.dhis.user.UserService;
 import org.hisp.dhis.user.Users;
@@ -258,7 +257,11 @@
 
 User parsed = renderService.fromXml( request.getInputStream(), getEntityClass() );
 parsed.setUid( uid );
-checkUserGroups( parsed );
+
+if ( !userService.canAddOrUpdateUser( IdentifiableObjectUtils.getUids( parsed.getGroups() ) ) )
+{
+throw new CreateAccessDeniedException( "You must have permissions to create user, or ability to manage at least one user group for the user." );
+}
 
 ImportTypeSummary summary = importService.importObject( currentUserService.getCurrentUser().getUid(), parsed,
 ImportStrategy.UPDATE );
@@ -285,7 +288,11 @@
 
 User parsed = renderService.fromJson( request.getInputStream(), getEntityClass() );
 parsed.setUid( uid );
-checkUserGroups( parsed );
+
+if ( !userService.canAddOrUpdateUser( IdentifiableObjectUtils.getUids( parsed.getGroups() ) ) )
+{
+throw new CreateAccessDeniedException( "You must have permissions to create user, or ability to manage at least one user group for the user." );
+}
 
 ImportTypeSummary summary = importService.importObject( currentUserService.getCurrentUser().getUid(), parsed,
 ImportStrategy.UPDATE );
@@ -362,17 +369,15 @@
  */
 private void createUser( User user, HttpServletResponse response ) throws Exception
 {
-if ( currentUserService.getCurrentUser() == null )
-{
-throw new CreateAccessDeniedException( "Internal error: currentUserService.getCurrentUser() returns null." );
-}
-
 if ( !aclService.canCreate( currentUserService.getCurrentUser(), getEntityClass() ) )
 {
 throw new CreateAccessDeniedException( "You don't have the proper permissions to create this object." );
 }
 
-checkUserGroups( user );
+if ( !userService.canAddOrUpdateUser( IdentifiableObjectUtils.getUids( user.getGroups() ) ) )
+{
+throw new CreateAccessDeniedException( "You must have permissions to create user, or ability to manage at least one user group for the user." );
+}
 
 user.getUserCredentials().getCogsDimensionConstraints().addAll(
 currentUserService.getCurrentUser().getUserCredentials().getCogsDimensionConstraints() );
@@ -386,45 +391,4 @@
 
 userGroupService.addUserToGroups( user, IdentifiableObjectUtils.getUids( user.getGroups() ) );
 }
-
-/**
- * Before adding or updating the user, checks to see that any specified user
- * groups exist.
- * 
- * Also, if the current user doesn't have the F_USER_ADD authority, that
- * means they have the weaker F_USER_ADD_WITHIN_MANAGED_GROUP authority.
- * In this case, the new user must be added to a group that is managed
- * by the current user.
- *
- * @param user user object parsed from the request
- */
-private void checkUserGroups( User user )
-{
-User currentUser = currentUserService.getCurrentUser();
-
-if ( currentUser != null && user.getGroups() != null )
-{
-boolean authorizedToAdd = currentUser.getUserCredentials().isAuthorized( UserGroup.AUTH_USER_ADD );
-
-for ( UserGroup ug : user.getGroups() )
-{
-UserGroup group = userGroupService.getUserGroup( ug.getUid() );
-
-if ( group == null )
-{
-throw new CreateAccessDeniedException( "Can't add/update user, can't find user group: " + ug.getUid() );
-}
-
-if ( !authorizedToAdd && currentUser.canManage( group ) )
-{
-autho

[Dhis2-devs] Agregation Builder creation with diferent datasets

2014-12-23 Thread Joao Mazuze
Hi all,
Can someone explain me how do I create  aggregation builder using dataelements 
from different datasets?

_
João Gabriel Mazuze
National Database Manager
Projecto CHASS-SMT
Abt Associates Inc.
Av. Marginal, 4067
Cidade de Maputo, Moçambique
Fax: (+ 258)  21486767
Tel:  (+ 258)  21493525/6/8
Cell: (+258) 82 4236279
www.chasssmt.com

[Description: Description: Description: Description: Description: Description: 
Description: Description: Description: Logotipo CHASS-SMT]
Somos um projecto financiado  pelo PEPFAR-II, através da USAID, para reforçar o 
Sistema de Saúde das Provincias de  Sofala, Manica e Tete. Pretendemos melhorar 
a ligação e integração do HIV  com os Cuidados Primários de Saúde e outros a 
ele relacionados em coordenação com as Direcções Provinciais de Saúde e outros 
parceiros. Através do projecto CHASS-SMT, o Governo Americano apoia o Governo 
Moçambicano na melhoria da qualidade dos Serviços de Saúde no país.




This message may contain privileged and confidential information intended 
solely for the addressee. Please do not read, disseminate or copy it unless you 
are the intended recipient. If this message has been received in error, we 
kindly ask that you notify the sender immediately by return email and delete 
all copies of the message from your system.
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Bug 1402247] [NEW] event visualizer: stacked line charts not working with optionsets

2014-12-23 Thread Jan Henrik Øverland
As the column chart shows there is only data for Male for W49.

A bar/column can represent a single value, but a line needs to go at least
from A to B :)


** Attachment added: "Screenshot from 2014-12-23 15:39:03.png"
   
https://bugs.launchpad.net/bugs/1402247/+attachment/4286462/+files/Screenshot%20from%202014-12-23%2015%3A39%3A03.png

** Changed in: dhis2
   Status: New => Invalid

** Changed in: dhis2
 Assignee: (unassigned) => Jan Henrik Øverland (janhenrik-overland)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1402247

Title:
  event visualizer: stacked line charts not working with optionsets

Status in DHIS 2:
  Invalid

Bug description:
  Event visualiser stacked line charts are not stacked when having two
  options as the series, and period as category. The exact same data
  with stacked bar charts work as expected. Screenshots of how it looks
  attached.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1402247/+subscriptions

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17785: Minor

2014-12-23 Thread noreply

revno: 17785
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2014-12-23 17:19:37 +0100
message:
  Minor
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2014-12-23 11:52:48 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2014-12-23 16:19:37 +
@@ -387,8 +387,8 @@
 
 ImportTypeSummary summary = importService.importObject( currentUserService.getCurrentUser().getUid(), user, ImportStrategy.CREATE );
 
-renderService.toJson( response.getOutputStream(), summary );
-
 userGroupService.addUserToGroups( user, IdentifiableObjectUtils.getUids( user.getGroups() ) );
+
+renderService.toJson( response.getOutputStream(), summary );
 }
 }

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17786: implemented support for add/remove of users from a userRole, added new property on userRole calle...

2014-12-23 Thread noreply

revno: 17786
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-12-23 17:35:42 +0100
message:
  implemented support for add/remove of users from a userRole, added new 
property on userRole called users (exposes members.userCredentials.user)
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserRoleController.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/user/UserAuthorityGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java	2014-12-19 16:13:54 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java	2014-12-23 16:35:42 +
@@ -45,7 +45,9 @@
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.schema.annotation.PropertyRange;
 
+import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 
 /**
@@ -157,6 +159,25 @@
 }
 
 @JsonProperty
+@JsonView( { DetailedView.class } )
+@JacksonXmlElementWrapper( localName = "users", namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlProperty( localName = "user", namespace = DxfNamespaces.DXF_2_0 )
+public List getUsers()
+{
+List users = new ArrayList<>();
+
+for ( UserCredentials userCredentials : members )
+{
+if ( userCredentials.getUser() != null )
+{
+users.add( userCredentials.getUser() );
+}
+}
+
+return users;
+}
+
+@JsonProperty
 @JsonSerialize( contentAs = BaseIdentifiableObject.class )
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlElementWrapper( localName = "dataSets", namespace = DxfNamespaces.DXF_2_0 )

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserRoleController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserRoleController.java	2014-10-01 08:39:12 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserRoleController.java	2014-12-23 16:35:42 +
@@ -28,16 +28,23 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.hibernate.exception.DeleteAccessDeniedException;
+import org.hisp.dhis.hibernate.exception.UpdateAccessDeniedException;
 import org.hisp.dhis.schema.descriptors.UserRoleSchemaDescriptor;
+import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserService;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.hisp.dhis.webapi.webdomain.WebMetaData;
 import org.hisp.dhis.webapi.webdomain.WebOptions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 
+import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 /**
@@ -63,4 +70,70 @@
 
 return entityList;
 }
+
+@RequestMapping( value = "/{id}/users/{userId}", method = { RequestMethod.POST, RequestMethod.PUT } )
+public void addUserToRole( @PathVariable( value = "id" ) String pvId, @PathVariable( "userId" ) String pvUserId, HttpServletResponse response )
+{
+UserAuthorityGroup userAuthorityGroup = userService.getUserAuthorityGroup( pvId );
+
+if ( userAuthorityGroup == null )
+{
+ContextUtils.notFoundResponse( response, "UserRole does not exist: " + pvId );
+return;
+}
+
+User user = userService.getUser( pvUserId );
+
+if ( user == null )
+{
+ContextUtils.notFoundResponse( response, "User does not exist: " + pvId );
+return;
+}
+
+if ( !aclService.canUpdate( currentUserService.getCurrentUser(), userAuthorityGroup ) )
+{
+throw new UpdateAccessDeniedException( "You don't have the proper permissions to update this object." );
+}
+
+if ( !user.getUserCredentials().getUserAuthorityGroups().contains( userAuthorityGroup ) )
+{
+user.getUserCredentials().getUserAuthorityGroups().add( userAuthorityGroup );
+userService.updateUserCredentials( user.getUserCredentials() );
+}
+
+response.setStatus( HttpServletResponse.SC_NO_CONTENT );
+}
+
+@RequestMapping( value = "/{id}/users/{userId}", 

Re: [Dhis2-devs] About expired password in DHIS2

2014-12-23 Thread Seide, Germine
Hello Halvdan,
It works with the last version.
Thank you!
Germine.

De : Halvdan Grelland [mailto:halvda...@gmail.com]
Envoyé : Monday, December 22, 2014 8:25 PM
À : Seide, Germine
Cc : DHIS 2 Developers list; DHIS 2 Users list
Objet : Re: [Dhis2-devs] About expired password in DHIS2

Hi,

A fix was submitted for this very bug in September.
Please update your instance to the latest revision of 2.15. You could also 
consider upgrading to a more recent major version, we are currently on 2.17.

You can download the latest version of DHIS2 
here

Let me know if you have any issues after upgrading.

Halvdan

2014-12-23 1:48 GMT+01:00 Seide, Germine 
mailto:gse...@futuresgroup.com>>:
Hello Halvdan,
Thank you for your feedback.
I am using Google chrome and DHIS 2.15. I am working on a test server. I 
attached to the email the errors that come up when I try to change the password
Germine.


[cid:image001.jpg@01D01EA6.31C54280]
[cid:image002.jpg@01D01EA6.31C54280]

De : Halvdan Grelland [mailto:halvda...@gmail.com]
Envoyé : Monday, December 22, 2014 4:05 PM
À : Seide, Germine
Cc : DHIS 2 Developers list; DHIS 2 Users list
Objet : Re: [Dhis2-devs] About expired password in DHIS2

Hi Germine,

In order to diagnose the issue we're going to need some more information.

First and foremost: what browser are you using and what version of DHIS2 are 
you running?

Please do the following:
Try to log into DHIS2 so that the screen which you've attached a screenshot of 
appears. Then open the javascript console (in Google Chrome go to View -> 
Developer -> Javascript Console, you could also right click the page and select 
'inspect element', then go to the 'console' tab in Chrome or Firefox).

Proceed to try and change the password. Are there errors or any other form of 
feedback popping up in the console? If you go to the 'network' tab (in the 
developer tools), are there any listings marked in red?

Also, if you have access to the server logs, please check if there is any 
activity or errors reported when trying to log in.

Thanks,
Halvdan Grelland

2014-12-22 21:03 GMT+01:00 Seide, Germine 
mailto:gse...@futuresgroup.com>>:
Hello,
I activated the option to reset password in 3 months and each time I log in to 
DHIS2, the system is asking to change my password. When I type my credentials 
nothing happens.

Can somebody help me fix that issue.

[cid:image003.jpg@01D01EA6.31C54280]


Germine


___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : 
dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17787: program attributes, wip (not reflected in UI)

2014-12-23 Thread noreply

revno: 17787
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-12-23 18:19:20 +0100
message:
  program attributes, wip (not reflected in UI)
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/Attribute.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/attribute/hibernate/Attribute.hbm.xml
  
dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/attribute/AddAttributeAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/attribute/UpdateAttributeAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addAttributeForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateAttributeForm.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/attribute/Attribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/Attribute.java	2014-12-19 15:41:50 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/Attribute.java	2014-12-23 17:19:20 +
@@ -75,6 +75,8 @@
 
 private boolean userGroupAttribute;
 
+private boolean programAttribute;
+
 private boolean mandatory;
 
 private Integer sortOrder;
@@ -248,6 +250,19 @@
 this.userGroupAttribute = userGroupAttribute;
 }
 
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+public boolean isProgramAttribute()
+{
+return programAttribute;
+}
+
+public void setProgramAttribute( boolean programAttribute )
+{
+this.programAttribute = programAttribute;
+}
+
 public Set getAttributeValues()
 {
 return attributeValues;
@@ -291,6 +306,7 @@
 organisationUnitGroupSetAttribute = attribute.isOrganisationUnitGroupSetAttribute();
 userAttribute = attribute.isUserAttribute();
 userGroupAttribute = attribute.isUserGroupAttribute();
+programAttribute = attribute.isProgramAttribute();
 mandatory = attribute.isMandatory();
 sortOrder = attribute.getSortOrder() == null ? sortOrder : attribute.getSortOrder();
 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2014-12-19 16:13:54 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2014-12-23 17:19:20 +
@@ -34,6 +34,7 @@
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import org.hisp.dhis.attribute.AttributeValue;
 import org.hisp.dhis.common.BaseIdentifiableObject;
 import org.hisp.dhis.common.DxfNamespaces;
 import org.hisp.dhis.common.IdentifiableObject;
@@ -120,6 +121,11 @@
 
 private TrackedEntity trackedEntity;
 
+/**
+ * Set of the dynamic attributes values that belong to this data element.
+ */
+private Set attributeValues = new HashSet<>();
+
 // -
 // Constructors
 // -
@@ -540,6 +546,20 @@
 this.trackedEntity = trackedEntity;
 }
 
+@JsonProperty( "attributeValues" )
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlElementWrapper( localName = "attributeValues", namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlProperty( localName = "attributeValue", namespace = DxfNamespaces.DXF_2_0 )
+public Set getAttributeValues()
+{
+return attributeValues;
+}
+
+public void setAttributeValues( Set attributeValues )
+{
+this.attributeValues = attributeValues;
+}
+
 @Override
 public void mergeWith( IdentifiableObject other )
 {
@@ -583,6 +603,9 @@
 
 instanceReminders.clear();
 instanceReminders.addAll( program.getInstanceRe

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17788: finished program attribute impl

2014-12-23 Thread noreply

revno: 17788
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-12-23 19:03:44 +0100
message:
  finished program attribute impl
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeStore.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/attribute/DefaultAttributeService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/attribute/hibernate/HibernateAttributeStore.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/AddProgramAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/ShowAddProgramFormAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/ShowUpdateProgramFormAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/UpdateProgramAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.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/attribute/AttributeService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeService.java	2014-03-18 08:10:10 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeService.java	2014-12-23 18:03:44 +
@@ -172,6 +172,13 @@
 Set getUserGroupAttributes();
 
 /**
+ * Gets attributes which are associated with programs.
+ *
+ * @return a set of attributes which are associated with programs.
+ */
+Set getProgramAttributes();
+
+/**
  * Gets the number of attributes.
  * 
  * @return the number of attributes.

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeStore.java	2014-03-18 08:10:10 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeStore.java	2014-12-23 18:03:44 +
@@ -28,10 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.common.GenericNameableObjectStore;
+
 import java.util.Set;
 
-import org.hisp.dhis.common.GenericNameableObjectStore;
-
 /**
  * @author mortenoh
  */
@@ -42,7 +42,7 @@
 
 /**
  * Get all attributes that are enabled for data elements.
- * 
+ *
  * @return All attributes with attribute.dataElement = true
  */
 Set getDataElementAttributes();
@@ -56,7 +56,7 @@
 
 /**
  * Get all attributes that are enabled for indicators.
- * 
+ *
  * @return All attributes with attribute.indicator = true
  */
 Set getIndicatorAttributes();
@@ -77,7 +77,7 @@
 
 /**
  * Get all attributes that are enabled for organisation units.
- * 
+ *
  * @return All attributes with attribute.organisationUnit = true
  */
 Set getOrganisationUnitAttributes();
@@ -98,7 +98,7 @@
 
 /**
  * Get all attributes that are enabled for users.
- * 
+ *
  * @return All attributes with attribute.organisationUnit = true
  */
 Set getUserAttributes();
@@ -109,4 +109,11 @@
  * @return All attributes with attribute.organisationUnitGroup = true
  */
 Set getUserGroupAttributes();
+
+/**
+ * Get all attributes that are enabled for program.
+ *
+ * @return All attributes with attribute.program = true
+ */
+Set getProgramAttributes();
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/attribute/DefaultAttributeService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/attribute/DefaultAttributeService.java	2014-09-08 13:02:43 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/attribute/DefaultAttributeService.java	2014-12-23 18:03:44 +
@@ -28,8 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.i18n.I18nUtils.i18n;
-
 import org.hisp.dhis.common.GenericStore;
 

[Dhis2-devs] Search by attribute value in individual record

2014-12-23 Thread rin.channara
Hi DHIS2 developers,

I can’t search result if I use “Khmer Unicode” in field Name or other field in 
individual record. if I use “English or latin”, it can search and show result.

So the “search by attribute value” in individual record enable search “UTF-08”?


thank you

channara___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] Annual plans and monitoring

2014-12-23 Thread Simon Muyambo
Any ideas on how to effectively use DHIS2 for annual planning and monitoring

 

The stages normally for each org unit is to

1.   Adopt strategic objectives and targets covering a period of 3 to 5 
years

2.   Make annual plan for the next year with specific outputs, activities 
and budgets

3.   Break each activity into monthly sub activities with targets to be 
achieved

4.   All this is done before the start of the planned year

5.   During the year each month actual performance against budget and 
planned activities is updated. Instead of waiting until end of year to find 
what went wrong, the input and output indicators are measured in almost real 
time and timely interventions can be implemented

 

Regards

Simon Muyambo

 

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] Annual plans and monitoring

2014-12-23 Thread Guy Ekani
Hello Everyone,
It will be grateful for the Dhis2-users we are, to have answer to this use case 
who interest the Monitoring and Evaluation Officer of our Health Programmes in 
this new year.
Thank you Simon to raise it, = EKANI Guy Cameroon



  

 Le Mercredi 24 décembre 2014 6h55, Simon Muyambo  a 
écrit :
   

 #yiv2051441523 #yiv2051441523 -- _filtered #yiv2051441523 {panose-1:2 4 5 3 5 
4 6 3 2 4;} _filtered #yiv2051441523 {font-family:Calibri;panose-1:2 15 5 2 2 2 
4 3 2 4;}#yiv2051441523 #yiv2051441523 p.yiv2051441523MsoNormal, #yiv2051441523 
li.yiv2051441523MsoNormal, #yiv2051441523 div.yiv2051441523MsoNormal 
{margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}#yiv2051441523 a:link, 
#yiv2051441523 span.yiv2051441523MsoHyperlink 
{color:blue;text-decoration:underline;}#yiv2051441523 a:visited, #yiv2051441523 
span.yiv2051441523MsoHyperlinkFollowed 
{color:purple;text-decoration:underline;}#yiv2051441523 
p.yiv2051441523MsoListParagraph, #yiv2051441523 
li.yiv2051441523MsoListParagraph, #yiv2051441523 
div.yiv2051441523MsoListParagraph 
{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;font-size:12.0pt;}#yiv2051441523
 p.yiv2051441523msolistparagraphcxspfirst, #yiv2051441523 
li.yiv2051441523msolistparagraphcxspfirst, #yiv2051441523 
div.yiv2051441523msolistparagraphcxspfirst 
{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;line-height:115%;font-size:12.0pt;}#yiv2051441523
 p.yiv2051441523msolistparagraphcxspmiddle, #yiv2051441523 
li.yiv2051441523msolistparagraphcxspmiddle, #yiv2051441523 
div.yiv2051441523msolistparagraphcxspmiddle 
{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;line-height:115%;font-size:12.0pt;}#yiv2051441523
 p.yiv2051441523msolistparagraphcxsplast, #yiv2051441523 
li.yiv2051441523msolistparagraphcxsplast, #yiv2051441523 
div.yiv2051441523msolistparagraphcxsplast 
{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;line-height:115%;font-size:12.0pt;}#yiv2051441523
 span.yiv2051441523EmailStyle21 {color:#1F497D;}#yiv2051441523 
.yiv2051441523MsoChpDefault {font-size:10.0pt;} _filtered #yiv2051441523 
{margin:72.0pt 72.0pt 72.0pt 72.0pt;}#yiv2051441523 
div.yiv2051441523WordSection1 {}#yiv2051441523 _filtered #yiv2051441523 {} 
_filtered #yiv2051441523 {}#yiv2051441523 ol {margin-bottom:0cm;}#yiv2051441523 
ul {margin-bottom:0cm;}#yiv2051441523 Any ideas on how to effectively use DHIS2 
for annual planning and monitoring  The stages normally for each org unit is 
to1.   Adopt strategic objectives and targets covering a period of 3 to 5 
years2.   Make annual plan for the next year with specific outputs, 
activities and budgets3.   Break each activity into monthly sub activities 
with targets to be achieved4.   All this is done before the start of the 
planned year5.   During the year each month actual performance against 
budget and planned activities is updated. Instead of waiting until end of year 
to find what went wrong, the input and output indicators are measured in almost 
real time and timely interventions can be implemented  RegardsSimon Muyambo   

__ Information from ESET NOD32 Antivirus, version of virus signature 
database 10921 (20141223) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
___
Mailing list: https://launchpad.net/~dhis2-users
Post to    : dhis2-us...@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help  : https://help.launchpad.net/ListHelp


   ___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp