Re: [Dhis2-devs] Field filters on /api/metadata

2015-01-07 Thread Lars Helge Øverland
Great.

On Wed, Jan 7, 2015 at 9:48 AM, Mahendra Kariya 
mahendra.kar...@thoughtworks.com wrote:

 Hi Lars,

 This will work for us. :)

___
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 17902: Analytic, reduced logging

2015-01-07 Thread noreply

revno: 17902
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 10:52:24 +0100
message:
  Analytic, reduced logging
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.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-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java	2015-01-06 21:00:39 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java	2015-01-07 09:52:24 +
@@ -164,11 +164,11 @@
 
 final String sql = create index  + indexName +  on  + inx.getTable() +  ( + inx.getColumn() + );
 
-log.debug( Create index SQL:  + sql );
+log.debug( Create index:  + indexName +  SQL:  + sql );
 
 jdbcTemplate.execute( sql );
 
-log.info( Created index:  + indexName );
+log.debug( Created index:  + indexName );
 }
 
 return null;
@@ -299,7 +299,7 @@
  */
 protected void populateAndLog( String sql, String tableName )
 {
-log.info( Populating  + tableName );
+log.debug( Populate table:  + tableName +  SQL:  + sql );
 
 Timer t = new SystemTimer().start();
 

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2015-01-06 21:00:39 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2015-01-07 09:52:24 +
@@ -386,7 +386,7 @@
 sql.append(  where level   + aggregationLevel );
 sql.append(  and de in ( + getQuotedCommaDelimitedString( dataElements ) + ) );
 
-log.info( Aggregation level SQL:  + sql.toString() );
+log.debug( Aggregation level SQL:  + sql.toString() );
 
 jdbcTemplate.execute( sql.toString() );
 }
@@ -409,7 +409,7 @@
 
 final String sql = statementBuilder.getVacuum( table.getTempTableName() );
 
-log.info( Vacuum SQL:  + sql );
+log.debug( Vacuum SQL:  + sql );
 
 jdbcTemplate.execute( sql );
 }

___
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 17901: Unused code

2015-01-07 Thread noreply

revno: 17901
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 10:52:03 +0100
message:
  Unused code
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.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/CompleteDataSetRegistrationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.java	2015-01-07 04:25:08 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.java	2015-01-07 09:52:03 +
@@ -28,6 +28,19 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.webapi.utils.ContextUtils.CONTENT_TYPE_JSON;
+import static org.hisp.dhis.webapi.utils.ContextUtils.CONTENT_TYPE_XML;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.commons.lang.StringUtils;
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.IdentifiableObjectManager;
@@ -61,21 +74,8 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseStatus;
 import org.springframework.web.client.HttpClientErrorException;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import static org.hisp.dhis.webapi.utils.ContextUtils.CONTENT_TYPE_JSON;
-import static org.hisp.dhis.webapi.utils.ContextUtils.CONTENT_TYPE_XML;
-
 /**
  * @author Morten Olav Hansen morte...@gmail.com
  */

___
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] Problem with smslib download

2015-01-07 Thread Lars Helge Øverland
Was a problem with our maven repo, try again now.

Lars


On Wed, Jan 7, 2015 at 5:09 AM, Morten Olav Hansen morte...@gmail.com
wrote:

 It was probably cut off in the middle.. I have seen this happen before if
 you are accessing dhis2.org outside of Norway..

 Maybe the mobile team could find a maven repo that is more mainstream to
 use for this? the original reason for it, was that this version of smslib
 was not available in maven.

 A quick google seems to suggest this repo
 http://smslib.org/maven2/v3/org/smslib/smslib/

 They are using a different repo for smslib 4, not sure if they want to
 update or not

 --
 Morten

 (In Vietnam now, its almost impossible to access it at all, but this also
 due to an undersea cable in SE asia that was cut... again)

 On Sun Jan 04 2015 at 9:04:14 PM Knut Staring knu...@gmail.com wrote:

 Hello all,

 I'm trying to build DHIS2 locally, but maven hangs trying to download
 smslib:

 [INFO] Building DHIS API 2.18-SNAPSHOT
 [INFO]
 
 Downloading:
 http://maven.dhis2.org/amplecode-local/org/smslib/smslib/3.5.3/smsl
 ib-3.5.3.jar
 24/348 KB

 [ERROR] Failed to execute goal on project dhis-api: Could not resolve
 dependenci
 es for project org.hisp.dhis:dhis-api:jar:2.18-SNAPSHOT: Could not
 transfer arti
 fact org.smslib:smslib:jar:3.5.3 from/to amplecode_maven2_repo (
 http://maven.dhi
 s2.org/amplecode-local): GET request of:
 org/smslib/smslib/3.5.3/smslib-3.5.3.ja
 r from amplecode_maven2_repo failed: Premature end of Content-Length
 delimited m
 essage body (expected: 356263; received: 24174 - [Help 1]

 --
 Knut Staring
 Dept. of Informatics, University of Oslo
 Liberia: +231 770 496 123 or +231 886 146 381
 Norway: +4791880522
 Skype: knutstar
 http://dhis2.org
  ___
 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


Re: [Dhis2-devs] Problem with smslib download

2015-01-07 Thread Long Ngo Thanh
Hi,

The repo from smslib them self was unstable before so we moved it to the
dhis repo. I think it's safer to keep it in dhis maven repo

Long
On Wed Jan 07 2015 at 3:57:05 PM Lars Helge Øverland larshe...@gmail.com
wrote:

 Was a problem with our maven repo, try again now.

 Lars


 On Wed, Jan 7, 2015 at 5:09 AM, Morten Olav Hansen morte...@gmail.com
 wrote:

 It was probably cut off in the middle.. I have seen this happen before if
 you are accessing dhis2.org outside of Norway..

 Maybe the mobile team could find a maven repo that is more mainstream to
 use for this? the original reason for it, was that this version of smslib
 was not available in maven.

 A quick google seems to suggest this repo http://smslib.org/maven2/
 v3/org/smslib/smslib/

 They are using a different repo for smslib 4, not sure if they want to
 update or not

 --
 Morten

 (In Vietnam now, its almost impossible to access it at all, but this also
 due to an undersea cable in SE asia that was cut... again)

 On Sun Jan 04 2015 at 9:04:14 PM Knut Staring knu...@gmail.com wrote:

 Hello all,

 I'm trying to build DHIS2 locally, but maven hangs trying to download
 smslib:

 [INFO] Building DHIS API 2.18-SNAPSHOT
 [INFO] 
 
 Downloading: http://maven.dhis2.org/amplecode-local/org/smslib/
 smslib/3.5.3/smsl
 ib-3.5.3.jar
 24/348 KB

 [ERROR] Failed to execute goal on project dhis-api: Could not resolve
 dependenci
 es for project org.hisp.dhis:dhis-api:jar:2.18-SNAPSHOT: Could not
 transfer arti
 fact org.smslib:smslib:jar:3.5.3 from/to amplecode_maven2_repo (
 http://maven.dhi
 s2.org/amplecode-local): GET request of: org/smslib/smslib/3.5.3/
 smslib-3.5.3.ja
 r from amplecode_maven2_repo failed: Premature end of Content-Length
 delimited m
 essage body (expected: 356263; received: 24174 - [Help 1]

 --
 Knut Staring
 Dept. of Informatics, University of Oslo
 Liberia: +231 770 496 123 or +231 886 146 381
 Norway: +4791880522
 Skype: knutstar
 http://dhis2.org
  ___
 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

___
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 17898: context-menu plugin, don't clear out highlight when fn is called

2015-01-07 Thread noreply

revno: 17898
committer: Morten Olav Hansen morte...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 16:17:32 +0700
message:
  context-menu plugin, don't clear out highlight when fn is called
modified:
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js


--
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-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js	2014-05-06 03:55:23 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js	2015-01-07 09:17:32 +
@@ -84,7 +84,8 @@
 var targetFn = $target.data('target-fn');
 var fn = config.functionResolver(targetFn);
 
-dhis2.contextmenu.disable();
+dhis2.contextmenu.disable(false);
+$menu.attr('fn-active', true);
 fn(context);
 
 return false;
@@ -144,24 +145,45 @@
   });
 
   $(document).on('click.context', function() {
-dhis2.contextmenu.disable();
-$menu.removeData('id');
+if( !dhis2.contextmenu.visibleUiDialog() ) {
+  dhis2.contextmenu.disable();
+  $menu.removeData('id');
+}
   });
 
   $(document).keyup(function( e ) {
 if( e.keyCode == 27 ) {
-  dhis2.contextmenu.disable();
+  if( !dhis2.contextmenu.visibleUiDialog() ) {
+dhis2.contextmenu.disable();
+  }
 }
   });
 };
 
-dhis2.contextmenu.disable = function() {
+dhis2.contextmenu.visibleUiDialog = function() {
+  if( $('.ui-dialog').is(':visible') ) {
+return true;
+  }
+
+  if( Boolean($menu.attr('fn-active')) ) {
+$menu.removeAttr('fn-active');
+return true;
+  }
+
+  return false;
+};
+
+dhis2.contextmenu.disable = function( clearHighlight ) {
+  clearHighlight = $.type(clearHighlight) === 'boolean' ? clearHighlight : true;
+
   var config = dhis2.contextmenu.config;
   var $list = $('#' + config.listId);
   var $menu = $('#' + config.menuId);
 
-  $list.find('tr').removeClass(config.menuItemActiveClass);
-  $list.find('td').removeClass(config.menuItemActiveClass);
+  if( clearHighlight ) {
+$list.find('tr').removeClass(config.menuItemActiveClass);
+$list.find('td').removeClass(config.menuItemActiveClass);
+  }
 
   if( $menu.is(:visible) ) {
 $menu.hide();

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js	2014-11-17 09:27:53 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js	2015-01-07 09:17:32 +
@@ -143,12 +143,12 @@
 }
 
 function setCreatedBy( user ) {
-	if ( user  user.name ) {
-		$('#sharingUser').text(user.name);
-	}
-	else {
-		$('#sharingUser').text([None]);
-	}
+  if( user  user.name ) {
+$('#sharingUser').text(user.name);
+  }
+  else {
+$('#sharingUser').text([None]);
+  }
 }
 
 function showSharingDialogWithContext( context ) {
@@ -159,7 +159,7 @@
 
 function showSharingDialog( type, uid ) {
   loadSharingSettings(type, uid).done(function( data ) {
-	setCreatedBy(data.object.user);
+setCreatedBy(data.object.user);
 setPublicAccess(data.object.publicAccess);
 setExternalAccess(data.object.externalAccess);
 setUserGroupAccesses(data.object.userGroupAccesses);
@@ -185,7 +185,7 @@
   height: 500,
   buttons: {
 'Cancel': function() {
-  $(this).dialog('close');
+  $(this).dialog('destroy');
 },
 'Save': function() {
   var me = $(this);
@@ -195,7 +195,7 @@
   data.object.userGroupAccesses = getUserGroupAccesses();
 
   saveSharingSettings(type, uid, data).done(function() {
-me.dialog('close');
+me.dialog('destroy');
   });
 }
   }

___
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] Problem with smslib download

2015-01-07 Thread Morten Olav Hansen
Ok, it seems that for the next version (smslib v4) they have moved it.. so
it should be good to use, so when you do the update remember to change repo
also

Btw, 3.5.4 is out..

On Wed Jan 07 2015 at 4:18:17 PM Long Ngo Thanh long.hispviet...@gmail.com
wrote:

 Hi,

 The repo from smslib them self was unstable before so we moved it to the
 dhis repo. I think it's safer to keep it in dhis maven repo

 Long

 On Wed Jan 07 2015 at 3:57:05 PM Lars Helge Øverland larshe...@gmail.com
 wrote:

 Was a problem with our maven repo, try again now.

 Lars


 On Wed, Jan 7, 2015 at 5:09 AM, Morten Olav Hansen morte...@gmail.com
 wrote:

 It was probably cut off in the middle.. I have seen this happen before
 if you are accessing dhis2.org outside of Norway..

 Maybe the mobile team could find a maven repo that is more mainstream to
 use for this? the original reason for it, was that this version of smslib
 was not available in maven.

 A quick google seems to suggest this repo http://smslib.org/maven2/
 v3/org/smslib/smslib/

 They are using a different repo for smslib 4, not sure if they want to
 update or not

 --
 Morten

 (In Vietnam now, its almost impossible to access it at all, but this
 also due to an undersea cable in SE asia that was cut... again)

 On Sun Jan 04 2015 at 9:04:14 PM Knut Staring knu...@gmail.com wrote:

 Hello all,

 I'm trying to build DHIS2 locally, but maven hangs trying to download
 smslib:

 [INFO] Building DHIS API 2.18-SNAPSHOT
 [INFO] 
 
 Downloading: http://maven.dhis2.org/amplecode-local/org/smslib/
 smslib/3.5.3/smsl
 ib-3.5.3.jar
 24/348 KB

 [ERROR] Failed to execute goal on project dhis-api: Could not resolve
 dependenci
 es for project org.hisp.dhis:dhis-api:jar:2.18-SNAPSHOT: Could not
 transfer arti
 fact org.smslib:smslib:jar:3.5.3 from/to amplecode_maven2_repo (
 http://maven.dhi
 s2.org/amplecode-local): GET request of: org/smslib/smslib/3.5.3/
 smslib-3.5.3.ja
 r from amplecode_maven2_repo failed: Premature end of Content-Length
 delimited m
 essage body (expected: 356263; received: 24174 - [Help 1]

 --
 Knut Staring
 Dept. of Informatics, University of Oslo
 Liberia: +231 770 496 123 or +231 886 146 381
 Norway: +4791880522
 Skype: knutstar
 http://dhis2.org
  ___
 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


___
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 17899: Analytics, removed unused methods

2015-01-07 Thread noreply

revno: 17899
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 10:19:38 +0100
message:
  Analytics, removed unused methods
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.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-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.java	2015-01-07 02:53:15 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.java	2015-01-07 09:19:38 +
@@ -28,25 +28,24 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
 import org.apache.commons.lang.StringUtils;
 import org.hisp.dhis.analytics.Partitions;
+import org.hisp.dhis.calendar.Calendar;
 import org.hisp.dhis.calendar.DateTimeUnit;
 import org.hisp.dhis.common.ListMap;
 import org.hisp.dhis.common.NameableObject;
-import org.hisp.dhis.period.Cal;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.period.YearlyPeriodType;
 import org.hisp.dhis.system.util.UniqueArrayList;
 import org.joda.time.DateTime;
 
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-
 /**
  * @author Lars Helge Overland
  */
@@ -69,7 +68,7 @@
 
 if ( lastYears != null )
 {
-org.hisp.dhis.calendar.Calendar calendar = PeriodType.getCalendar();
+Calendar calendar = PeriodType.getCalendar();
 DateTimeUnit dateTimeUnit = calendar.today();
 dateTimeUnit = calendar.minusYears( dateTimeUnit, lastYears - 1 );
 dateTimeUnit.setMonth( 1 );
@@ -143,20 +142,4 @@
 
 return map;
 }
-
-/**
- * Returns the year of the given date.
- */
-public static int year( Date date )
-{
-return new Cal( date ).getYear();
-}
-
-/**
- * Returns the max date within the year of the given date.
- */
-public static Date maxOfYear( Date date )
-{
-return new Cal( year( date ), 12, 31, true ).time();
-}
 }

___
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 17900: Reduced logging of data value sets

2015-01-07 Thread noreply

revno: 17900
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 10:30:41 +0100
message:
  Reduced logging of data value sets
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueSetController.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/DataValueSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueSetController.java	2014-12-07 13:56:05 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueSetController.java	2015-01-07 09:30:41 +
@@ -89,13 +89,13 @@
 String ds = dataSet.iterator().next();
 String ou = orgUnit.iterator().next();
 
-log.info( Get XML data value set for data set:  + ds + , period:  + period + , org unit:  + ou );
+log.debug( Get XML data value set for data set:  + ds + , period:  + period + , org unit:  + ou );
 
 dataValueSetService.writeDataValueSetXml( ds, period, ou, response.getOutputStream(), exportOptions );
 }
 else
 {
-log.info( Get XML bulk data value set for start date:  + startDate + , end date:  + endDate );
+log.debug( Get XML bulk data value set for start date:  + startDate + , end date:  + endDate );
 
 dataValueSetService.writeDataValueSetXml( dataSet, startDate, endDate, orgUnit, children, response.getOutputStream(), exportOptions );
 }
@@ -121,13 +121,13 @@
 String ds = dataSet.iterator().next();
 String ou = orgUnit.iterator().next();
 
-log.info( Get JSON data value set for data set:  + ds + , period:  + period + , org unit:  + ou );
+log.debug( Get JSON data value set for data set:  + ds + , period:  + period + , org unit:  + ou );
 
 dataValueSetService.writeDataValueSetJson( ds, period, ou, response.getOutputStream(), exportOptions );
 }
 else
 {
-log.info( Get JSON bulk data value set for start date:  + startDate + , end date:  + endDate );
+log.debug( Get JSON bulk data value set for start date:  + startDate + , end date:  + endDate );
 
 dataValueSetService.writeDataValueSetJson( dataSet, startDate, endDate, orgUnit, children, response.getOutputStream(), exportOptions );
 }
@@ -153,13 +153,13 @@
 String ds = dataSet.iterator().next();
 String ou = orgUnit.iterator().next();
 
-log.info( Get CSV data value set for data set:  + ds + , period:  + period + , org unit:  + ou );
+log.debug( Get CSV data value set for data set:  + ds + , period:  + period + , org unit:  + ou );
 
 dataValueSetService.writeDataValueSetCsv( ds, period, ou, response.getWriter(), exportOptions );
 }
 else
 {
-log.info( Get CSV bulk data value set for start date:  + startDate + , end date:  + endDate );
+log.debug( Get CSV bulk data value set for start date:  + startDate + , end date:  + endDate );
 
 dataValueSetService.writeDataValueSetCsv( dataSet, startDate, endDate, orgUnit, children, response.getWriter(), exportOptions );
 }
@@ -176,7 +176,7 @@
 {
 ImportSummary summary = dataValueSetService.saveDataValueSet( in, importOptions );
 
-log.info( Data values set saved );
+log.debug( Data values set saved );
 
 response.setContentType( CONTENT_TYPE_XML );
 JacksonUtils.toXml( response.getOutputStream(), summary );
@@ -189,7 +189,7 @@
 {
 ImportSummary summary = dataValueSetService.saveDataValueSetJson( in, importOptions );
 
-log.info( Data values set saved );
+log.debug( Data values set saved );
 
 response.setContentType( CONTENT_TYPE_JSON );
 JacksonUtils.toJson( response.getOutputStream(), summary );
@@ -202,7 +202,7 @@
 {
 ImportSummary summary = dataValueSetService.saveDataValueSetCsv( in, importOptions );
 
-log.info( Data values set saved );
+log.debug( Data values set saved );
 
 response.setContentType( CONTENT_TYPE_XML );
 JacksonUtils.toXml( 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


Re: [Dhis2-devs] Field filters on /api/metadata

2015-01-07 Thread Lars Helge Øverland
Hi Mahendra,

would this work?

/api/metaData?assumeTrue=trueorganisationUnits=false

I know you might ask for removing org units completely including
associations.

Lars
___
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] ByPassing DHIS2 Login Page to Get to The Data Visualizer App

2015-01-07 Thread Arthur Gwatidzo
Hi Devs,

 

I am trying to make an app that performs auto-login into DHIS2(bypassing the
login screen and landing the user to the Data Visualizer app) through a
script. 

I have created a user and assigned this user to a public user role that has
the authority of Viewing the Data Visualizer module only.

 

With the code below, I am still being landed to the DHIS2 login page, even
though I have specified the login to be done through my script.

 

I am not getting any errors in the console nor even the network tab.

 

What could be the problem? See the snippet codes below

 

 

HTML Code

===

html

header

 titleVEA Public Website/title

 link rel=stylesheet href=styles/style.css type=text/css
media=screen /

 script type=text/javascript
src=js/plugins/jquery-1.11.1.min.js/script

 script type=text/javascript src=js/autologin.js/script

/header

body

 header

   nav id=navg

ul class=nav-list

   lia href =
#Home/a/li

   lia href = #About
Us/a/li

   lia
href=http://localhost:8080/dhis/dhis-web-visualizer/index.html;
onclick=autologging();VEA Dashboard/a

   lia href = #Contact
Us/a/li

/ul

   

   /nav

 /header

 h3centerPublic VEA Website/center/h3

/body

/html

 

 

Script Code : autologin.js

===

 

function autologging(){

   setTimeout(function() {

   $.ajax({

type: POST,

url:
http://localhost:8080/dhis/dhis-web-commons/security/login.action;,

cache: false,

async:false,

crossDomain: true,

  //  contentType: application/text,

data: { j_username: vea_public, j_password: V3apublic }

   }).done(function( data,textStatus,xhr ) {

alert( 'Welcome to the VEA Dashboard!' + xhr.status );

  window.location
=http://localhost:8080/dhis/dhis-web-visualizer/index.html;;

   });

 }, 3000);

}

 

 

 

Kind Regards,

 

Arthur  Gwatidzo

 

Description: cid:image001.png@01CCADE7.1D5397D0

Software Development and Information Systems 

Health Information Systems Program

---

Email:mailto:arthu...@hisp.org arthu...@hisp.org

Cell:  +27(0)768983930 

Skype:  Arthur.Gwatidzo

Web: http://www.hisp.org/ http://www.hisp.org

 

66 Rigel Avenue North, Waterkloof Ridge
Pretoria, 0181
South Africa
E -25.7847787 S 28.2347984

This message may contain privileged and confidential information intended
only for the person or entity to which it is addressed. Any review,
retransmission, dissemination, copy or other use of, or taking of any action
in reliance upon this information by persons or entities other than the
intended recipient, is prohibited. If you received this message in error,
please notify the sender immediately by e-mail, facsimile or telephone and
thereafter delete the material from any computer. Any views expressed in
this message are those of the individual sender, except where the sender
specifically states them to be the view of the entity transmitting the
message.

 

___
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] ByPassing DHIS2 Login Page to Get to The Data Visualizer App

2015-01-07 Thread Jan Henrik Øverland
Ok good. And I think the setTimeout is not necessary. It will just delay
the whole process.

On Wed, Jan 7, 2015 at 1:17 PM, Arthur Gwatidzo arthu...@hisp.org wrote:

 Hi Jan,



 Thank you so much.



 Your solution has worked.



 Thanks again.



 Regards,



 Arthur



 *From:* Jan Henrik Øverland [mailto:janhenrik.overl...@gmail.com]
 *Sent:* 07 January 2015 02:09 PM
 *To:* Arthur Gwatidzo
 *Cc:* dhis2-devs
 *Subject:* Re: [Dhis2-devs] ByPassing DHIS2 Login Page to Get to The Data
 Visualizer App



 Hi Arthur, I guess the href in this line



 a href=*http://localhost:8080/dhis/dhis-web-visualizer/index.html
 http://localhost:8080/dhis/dhis-web-visualizer/index.html* onclick
 =autologging();VEA *Dashboard*/a



 will redirect the user to the href url before the script has logged him
 in. Try



 a href=# onclick=javascript:autologging();VEA Dashboard/a



 instead and see if it works.



 On Wed, Jan 7, 2015 at 12:54 PM, Arthur Gwatidzo arthu...@hisp.org
 wrote:

 Hi Devs,



 I am trying to make an app that performs auto-login into DHIS2(bypassing
 the login screen and landing the user to the Data Visualizer app) through a
 script.

 I have created a user and assigned this user to a public user role that
 has the authority of “Viewing the Data Visualizer module” only.



 With the code below, I am still being landed to the DHIS2 login page, even
 though I have specified the login to be done through my script.



 I am not getting any errors in the console nor even the network tab.



 What could be the problem? See the snippet codes below





 HTML Code

 ===

 html

 header

  titleVEA Public *Website*/title

  link rel=*stylesheet* href=*styles/style.css* type=
 *text/css* media=*screen* /

  script type=*text/javascript* src=
 *js/plugins/jquery-1.11.1.min.js*/script

  script type=*text/javascript* src=*js/autologin.js*/
 script

 /header

 body

  header

nav id=*navg*

 ul class=*nav-list*

lia href = *#*Home/a
 /li

lia href = *#*About
 Us/a/li

lia 
 href=*http://localhost:8080/dhis/dhis-web-visualizer/index.html
 http://localhost:8080/dhis/dhis-web-visualizer/index.html* onclick
 =autologging();VEA *Dashboard*/a

lia href = *#*Contact
 Us/a/li

 /ul



/nav

  /header

  h3centerPublic VEA *Website*/center/h3

 /body

 /html





 Script Code :* autologin.js*

 ===



 *function* autologging(){

setTimeout(*function*() {

$.ajax({

 type: POST,

 url: 
 http://localhost:8080/dhis/dhis-web-commons/security/login.action;,

 cache: *false*,

 async:*false*,

 crossDomain: *true*,

   //  contentType: application/text,

 data: { j_username: vea_public, j_password: V3apublic }

}).done(*function*( data,textStatus,xhr ) {

 alert( 'Welcome to the VEA Dashboard!' + xhr.status );

   window.location =
 http://localhost:8080/dhis/dhis-web-visualizer/index.html;;

});

  }, 3000);

 }







 Kind Regards,



 Arthur  Gwatidzo



 [image: Description: cid:image001.png@01CCADE7.1D5397D0]

 Software Development and Information Systems

 *Health Information Systems Program*

 ---

 Email:   arthu...@hisp.org

 Cell:  +27(0)768983930

 Skype:  Arthur.Gwatidzo

 Web*: *   http://www.hisp.org



 66 Rigel Avenue North, Waterkloof Ridge
 Pretoria, 0181
 South Africa
 E -25.7847787 S 28.2347984

 This message may contain privileged and confidential information intended
 only for the person or entity to which it is addressed. Any review,
 retransmission, dissemination, copy or other use of, or taking of any
 action in reliance upon this information by persons or entities other than
 the intended recipient, is prohibited. If you received this message in
 error, please notify the sender immediately by e-mail, facsimile or
 telephone and thereafter delete the material from any computer. Any views
 expressed in this message are those of the individual sender, except where
 the sender specifically states them to be the view of the entity
 transmitting the message.




 ___
 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

Re: [Dhis2-devs] ByPassing DHIS2 Login Page to Get to The Data Visualizer App

2015-01-07 Thread Jan Henrik Øverland
Hi Arthur, I guess the href in this line

a href=*http://localhost:8080/dhis/dhis-web-visualizer/index.html
http://localhost:8080/dhis/dhis-web-visualizer/index.html* onclick
=autologging();VEA *Dashboard*/a

will redirect the user to the href url before the script has logged him in.
Try

a href=# onclick=javascript:autologging();VEA Dashboard/a

instead and see if it works.

On Wed, Jan 7, 2015 at 12:54 PM, Arthur Gwatidzo arthu...@hisp.org wrote:

 Hi Devs,



 I am trying to make an app that performs auto-login into DHIS2(bypassing
 the login screen and landing the user to the Data Visualizer app) through a
 script.

 I have created a user and assigned this user to a public user role that
 has the authority of “Viewing the Data Visualizer module” only.



 With the code below, I am still being landed to the DHIS2 login page, even
 though I have specified the login to be done through my script.



 I am not getting any errors in the console nor even the network tab.



 What could be the problem? See the snippet codes below





 HTML Code

 ===

 html

 header

  titleVEA Public *Website*/title

  link rel=*stylesheet* href=*styles/style.css* type=
 *text/css* media=*screen* /

  script type=*text/javascript* src=
 *js/plugins/jquery-1.11.1.min.js*/script

  script type=*text/javascript* src=*js/autologin.js*/
 script

 /header

 body

  header

nav id=*navg*

 ul class=*nav-list*

lia href = *#*Home/a
 /li

lia href = *#*About
 Us/a/li

lia 
 href=*http://localhost:8080/dhis/dhis-web-visualizer/index.html
 http://localhost:8080/dhis/dhis-web-visualizer/index.html* onclick
 =autologging();VEA *Dashboard*/a

lia href = *#*Contact
 Us/a/li

 /ul



/nav

  /header

  h3centerPublic VEA *Website*/center/h3

 /body

 /html





 Script Code :* autologin.js*

 ===



 *function* autologging(){

setTimeout(*function*() {

$.ajax({

 type: POST,

 url: 
 http://localhost:8080/dhis/dhis-web-commons/security/login.action;,

 cache: *false*,

 async:*false*,

 crossDomain: *true*,

   //  contentType: application/text,

 data: { j_username: vea_public, j_password: V3apublic }

}).done(*function*( data,textStatus,xhr ) {

 alert( 'Welcome to the VEA Dashboard!' + xhr.status );

   window.location =
 http://localhost:8080/dhis/dhis-web-visualizer/index.html;;

});

  }, 3000);

 }







 Kind Regards,



 Arthur  Gwatidzo



 [image: Description: cid:image001.png@01CCADE7.1D5397D0]

 Software Development and Information Systems

 *Health Information Systems Program*

 ---

 Email:   arthu...@hisp.org

 Cell:  +27(0)768983930

 Skype:  Arthur.Gwatidzo

 Web*: *   http://www.hisp.org



 66 Rigel Avenue North, Waterkloof Ridge
 Pretoria, 0181
 South Africa
 E -25.7847787 S 28.2347984

 This message may contain privileged and confidential information intended
 only for the person or entity to which it is addressed. Any review,
 retransmission, dissemination, copy or other use of, or taking of any
 action in reliance upon this information by persons or entities other than
 the intended recipient, is prohibited. If you received this message in
 error, please notify the sender immediately by e-mail, facsimile or
 telephone and thereafter delete the material from any computer. Any views
 expressed in this message are those of the individual sender, except where
 the sender specifically states them to be the view of the entity
 transmitting the message.



 ___
 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


Re: [Dhis2-devs] ByPassing DHIS2 Login Page to Get to The Data Visualizer App

2015-01-07 Thread Arthur Gwatidzo
Hi Jan,

 

Thank you so much.

 

Your solution has worked.

 

Thanks again.

 

Regards,

 

Arthur

 

From: Jan Henrik Øverland [mailto:janhenrik.overl...@gmail.com] 
Sent: 07 January 2015 02:09 PM
To: Arthur Gwatidzo
Cc: dhis2-devs
Subject: Re: [Dhis2-devs] ByPassing DHIS2 Login Page to Get to The Data 
Visualizer App

 

Hi Arthur, I guess the href in this line

 

a href=http://localhost:8080/dhis/dhis-web-visualizer/index.html; 
onclick=autologging();VEA Dashboard/a

 

will redirect the user to the href url before the script has logged him in. Try

 

a href=# onclick=javascript:autologging();VEA Dashboard/a

 

instead and see if it works.

 

On Wed, Jan 7, 2015 at 12:54 PM, Arthur Gwatidzo arthu...@hisp.org wrote:

Hi Devs,

 

I am trying to make an app that performs auto-login into DHIS2(bypassing the 
login screen and landing the user to the Data Visualizer app) through a script. 

I have created a user and assigned this user to a public user role that has the 
authority of “Viewing the Data Visualizer module” only.

 

With the code below, I am still being landed to the DHIS2 login page, even 
though I have specified the login to be done through my script.

 

I am not getting any errors in the console nor even the network tab.

 

What could be the problem? See the snippet codes below

 

 

HTML Code

===

html

header

 titleVEA Public Website/title

 link rel=stylesheet href=styles/style.css type=text/css 
media=screen /

 script type=text/javascript 
src=js/plugins/jquery-1.11.1.min.js/script

 script type=text/javascript src=js/autologin.js/script

/header

body

 header

   nav id=navg

ul class=nav-list

   lia href = #Home/a/li

   lia href = #About 
Us/a/li

   lia 
href=http://localhost:8080/dhis/dhis-web-visualizer/index.html; 
onclick=autologging();VEA Dashboard/a

   lia href = #Contact 
Us/a/li

/ul

   

   /nav

 /header

 h3centerPublic VEA Website/center/h3

/body

/html

 

 

Script Code : autologin.js

===

 

function autologging(){

   setTimeout(function() {

   $.ajax({

type: POST,

url: 
http://localhost:8080/dhis/dhis-web-commons/security/login.action;,

cache: false,

async:false,

crossDomain: true,

  //  contentType: application/text,

data: { j_username: vea_public, j_password: V3apublic }

   }).done(function( data,textStatus,xhr ) {

alert( 'Welcome to the VEA Dashboard!' + xhr.status );

  window.location 
=http://localhost:8080/dhis/dhis-web-visualizer/index.html;;

   });

 }, 3000);

}

 

 

 

Kind Regards,

 

Arthur  Gwatidzo

 

Description: cid:image001.png@01CCADE7.1D5397D0

Software Development and Information Systems 

Health Information Systems Program

---

Email:   arthu...@hisp.org

Cell:  +27(0)768983930 

Skype:  Arthur.Gwatidzo

Web: http://www.hisp.org/ http://www.hisp.org

 

66 Rigel Avenue North, Waterkloof Ridge
Pretoria, 0181
South Africa
E -25.7847787 S 28.2347984

This message may contain privileged and confidential information intended only 
for the person or entity to which it is addressed. Any review, retransmission, 
dissemination, copy or other use of, or taking of any action in reliance upon 
this information by persons or entities other than the intended recipient, is 
prohibited. If you received this message in error, please notify the sender 
immediately by e-mail, facsimile or telephone and thereafter delete the 
material from any computer. Any views expressed in this message are those of 
the individual sender, except where the sender specifically states them to be 
the view of the entity transmitting the message.

 


___
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 17905: Implemented web api endpoints for setting messageconversation followup. Cleaned up message.js cod...

2015-01-07 Thread noreply
Merge authors:
  Halvdan Hoem Grelland (halvdanhg)

revno: 17905 [merge]
committer: Halvdan Hoem Grelland halvda...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 14:34:50 +0100
message:
  Implemented web api endpoints for setting messageconversation followup. 
Cleaned up message.js code. Added batch followup to dashboard messaging. Minor 
fixes.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.java
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/message/MessageServiceTest.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MessageConversationController.java
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisCheckboxMenu.js
  
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/message.js
  
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.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/message/MessageService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java	2014-11-18 12:55:20 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java	2015-01-06 16:21:58 +
@@ -102,7 +102,7 @@
 
 ListMessageConversation getMessageConversations( boolean followUpOnly, boolean unreadOnly, int first, int max );
 
-CollectionMessageConversation getMessageConversations( String[] messageConversationUids );
+CollectionMessageConversation getMessageConversations( User user, String[] messageConversationUids );
 
 int getMessageConversationCount();
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java	2014-12-21 17:57:33 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java	2015-01-06 16:21:58 +
@@ -327,9 +327,20 @@
 }
 
 @Override
-public CollectionMessageConversation getMessageConversations( String[] messageConversationUids )
+public CollectionMessageConversation getMessageConversations( User user, String[] messageConversationUids )
 {
-return messageConversationStore.getMessageConversations( messageConversationUids );
+CollectionMessageConversation conversations = messageConversationStore.getMessageConversations( messageConversationUids );
+
+// Set transient properties
+// TODO See getMessageConversation(String)
+
+for ( MessageConversation mc : conversations )
+{
+mc.setFollowUp( mc.isFollowUp( user ) );
+mc.setRead( mc.isRead( user ) );
+}
+
+return conversations;
 }
 
 @Override

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.java	2014-10-16 06:17:19 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.java	2015-01-07 12:59:57 +
@@ -29,6 +29,7 @@
  */
 
 import org.hibernate.Query;
+import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
 import org.hisp.dhis.jdbc.StatementBuilder;
 import org.hisp.dhis.message.MessageConversation;
@@ -40,6 +41,7 @@
 
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 
@@ -128,15 +130,12 @@
 }
 
 @Override
-@SuppressWarnings(unchecked)
-public CollectionMessageConversation getMessageConversations( String[] messageConversationUids )
+@SuppressWarnings( unchecked )
+public CollectionMessageConversation getMessageConversations( String[] uids )
 {
-String hql = ( FROM MessageConversation where uid in :messageConversationUids );
-
-Query query = getQuery( hql );
-query.setParameterList( messageConversationUids, messageConversationUids );
-
-return query.list();
+   

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17906: Typo

2015-01-07 Thread noreply

revno: 17906
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 15:30:52 +0100
message:
  Typo
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties


--
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-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/resources/org/hisp/dhis/dataadmin/i18n_module.properties	2015-01-07 13:01:27 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties	2015-01-07 14:30:52 +
@@ -69,7 +69,7 @@
 organisation_units_violating_compulsory_group_sets=Organisation units violating compulsory group sets
 organisation_units_violation_exclusive_group_sets=Organisation units violating exclusive group sets
 organisation_unit_groups_without_group_sets=Organisation unit groups without group sets
-category_option_combos_not_in_data_element_category_combo=Category option combos not in data element category combo in dat entry form
+category_option_combos_not_in_data_element_category_combo=Category option combos not in data element category combo in data entry form
 data_integrity_checks_performed=Data integrity checks performed
 data_elements_assigned_to_period_types_with_different_period_types=Data elements assigned to data sets with different period types
 category_option_group_set_structure=Category option group set structure

___
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] get blank attribute in individual records

2015-01-07 Thread Tran Chau (HISP Vietnam)
Hi Channara,

Thanks for the video.

I will try to find out the problem and inform you.

.

Best regards,
Tran Chau.

On Wed, Jan 7, 2015 at 10:09 AM, channara rin rin.chann...@gmail.com
wrote:

 Hi tran,
 i used:
 Version:2.17Build revision:17684Build date:2015-01-06 02:03


 On Tue, Jan 6, 2015 at 10:35 PM, Tran Chau (HISP Vietnam) 
 tran.hispviet...@gmail.com wrote:

 Hi Channara,

 Can you give me a video or snapshots to describe this bug ?
 Also give me the version you use for testing..

 .
 Best regards,
 Tran Chau.

 On Tue, Jan 6, 2015 at 6:13 PM, channara rin rin.chann...@gmail.com
 wrote:

 Hi all,
 I am so strange happen to me, After i import individual record through
 web API, and then i go to find instance in individual record, i saw all the
 individual records that i imported. But when i click on one individual
 record to fill some attribute and services of data element. and then i
 click complete button. *After that i back to find instance, then i
 got the blank all attributes fields.*

 *DHIS2 lastest version

 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




___
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] Authority missing for See Data Element/Indicators App

2015-01-07 Thread Carlos Nyembwe
Hi all,
For this new, I'm happy and this proves the efforts the devs deploy

Regards
Carlos

On Wed, Jan 7, 2015 at 7:34 PM, Adebusoye Anifalaje bus...@hisp.org wrote:

 Thank you Lars.


 Busoye

 On 7 Jan 2015, at 14:29, Lars Helge Øverland larshe...@gmail.com wrote:

 Hi Busoye,

 its actually See data dictionary module. I will rename this in the UI.
 You can use it for now.

 regards,

 Lars


 On Wed, Jan 7, 2015 at 8:19 PM, Adebusoye Anifalaje bus...@hisp.org
 wrote:

 Addendum: I checked on the Demo instance and

 Version: 2.17Build revision:17673
 Regards,Busoye


 On 7 Jan 2015, at 14:11, Adebusoye Anifalaje bus...@hisp.org wrote:

 Hi Devs,

 There is currently no authority to allow a user to see the Data Element
 app. Similar to See Data Entry Module, we need to assign authorities to
 user roles which allow them to see the Data Element/Indicator app and then
 to list data elements but not edit them. It would be so much easier to
 assign this as an authority to a user role rather than use the sharing
 function.

 Is there a reason why this is not included or am I missing it somewhere?

 Regards,
 Busoye
 ___
 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




-- 
*Carlos Nyembwe*
*Informaticien*

*Skype: carloscnk1*
*Téléphone: (+243)813166381*
___
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] Downgrade dhis 2.16 to 2.15

2015-01-07 Thread Guy Ekani
Hello everyone,
Please, It's possible to downgrade a database from dhis 2.16 to 2.15 ?
Sincerely, = EKANI Guy 



___
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 17904: Added integrity check for identifying category option combos in custom forms which are not part o...

2015-01-07 Thread noreply

revno: 17904
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 14:01:27 +0100
message:
  Added integrity check for identifying category option combos in custom forms 
which are not part of category combo of the data element
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java
  
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityAction.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/dataIntegrityForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseDataIntegrity.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/dataintegrity/DataIntegrityService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java	2014-09-30 09:08:21 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java	2015-01-07 13:01:27 +
@@ -32,8 +32,10 @@
 import java.util.List;
 import java.util.SortedMap;
 
+import org.hisp.dhis.common.SetMap;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementGroup;
+import org.hisp.dhis.dataelement.DataElementOperand;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.Section;
 import org.hisp.dhis.indicator.Indicator;
@@ -91,6 +93,12 @@
 // -
 
 /**
+ * Returns all operands in data entry forms where the category option combo
+ * is not part of the category combo of the data element.
+ */
+SetMapDataSet, DataElementOperand getCategoryOptionCombosNotInDataElementCategoryCombo();
+
+/**
  * Gets all section with invalid category combinations. Invalid means that
  * the data elements in the sections don't have the same category combination.
  */

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java	2014-10-16 06:17:19 +
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java	2015-01-07 13:01:27 +
@@ -41,13 +41,18 @@
 import java.util.SortedMap;
 import java.util.TreeMap;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.ListMap;
+import org.hisp.dhis.common.SetMap;
 import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.constant.ConstantService;
 import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementGroupSet;
+import org.hisp.dhis.dataelement.DataElementOperand;
 import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.dataentryform.DataEntryFormService;
 import org.hisp.dhis.dataset.DataSet;
@@ -81,6 +86,8 @@
 public class DefaultDataIntegrityService
 implements DataIntegrityService
 {
+private static final Log log = LogFactory.getLog( DefaultDataIntegrityService.class );
+
 private static final String FORMULA_SEPARATOR = #;
 
 // -
@@ -250,7 +257,7 @@
 
 return targets;
 }
-
+
 @Override
 public SortedMapDataSet, CollectionDataElement getDataElementsInDataSetNotInForm()
 {
@@ -291,6 +298,45 @@
 // DataSet
 // -
 
+public SetMapDataSet, DataElementOperand getCategoryOptionCombosNotInDataElementCategoryCombo()
+{
+SetMapDataSet, DataElementOperand map = new SetMap();
+
+CollectionDataSet dataSets = dataSetService.getAllDataSets();
+
+

Re: [Dhis2-devs] get blank attribute in individual records

2015-01-07 Thread Tran Chau (HISP Vietnam)
Hi Channara,

I need your help to find out the problem. Can you :

1. Try register a new patient in *Find/Add Instance  Add new*
2. Send me log file, program definition screenshot, program stage
definition screen shot and any other information that might be useful to
analyze.
3. Also try same thing on demo server and show me.

.

Best regards,
Tran Chau


On Wed, Jan 7, 2015 at 9:15 PM, Tran Chau (HISP Vietnam) 
tran.hispviet...@gmail.com wrote:

 Hi Channara,

 Thanks for the video.

 I will try to find out the problem and inform you.

 .

 Best regards,
 Tran Chau.

 On Wed, Jan 7, 2015 at 10:09 AM, channara rin rin.chann...@gmail.com
 wrote:

 Hi tran,
 i used:
 Version:2.17Build revision:17684Build date:2015-01-06 02:03


 On Tue, Jan 6, 2015 at 10:35 PM, Tran Chau (HISP Vietnam) 
 tran.hispviet...@gmail.com wrote:

 Hi Channara,

 Can you give me a video or snapshots to describe this bug ?
 Also give me the version you use for testing..

 .
 Best regards,
 Tran Chau.

 On Tue, Jan 6, 2015 at 6:13 PM, channara rin rin.chann...@gmail.com
 wrote:

 Hi all,
 I am so strange happen to me, After i import individual record through
 web API, and then i go to find instance in individual record, i saw all the
 individual records that i imported. But when i click on one individual
 record to fill some attribute and services of data element. and then i
 click complete button. *After that i back to find instance, then i
 got the blank all attributes fields.*

 *DHIS2 lastest version

 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





___
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 17910: Display categories which associated with the selected category option in the Category Option Deta...

2015-01-07 Thread noreply

revno: 17910
committer: Tran Chautran.hispviet...@gmail.com
branch nick: dhis2
timestamp: Thu 2015-01-08 09:24:11 +0700
message:
  Display categories which associated with the selected category option in the 
Category Option Details.
modified:
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementCategoryOption.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/categoryOption.js
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/categoryOption.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-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementCategoryOption.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementCategoryOption.vm	2014-11-15 13:26:06 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementCategoryOption.vm	2015-01-08 02:24:11 +
@@ -5,6 +5,20 @@
 name: $!encoder.jsonEncode( ${dataElementCategoryOption.name} ),
 shortName: $!encoder.jsonEncode( ${dataElementCategoryOption.shortName} ),
 startDate: $!format.formatDate( ${dataElementCategoryOption.startDate} ),
-endDate: $!format.formatDate( ${dataElementCategoryOption.endDate} )
+endDate: $!format.formatDate( ${dataElementCategoryOption.endDate} ),
+categories: [
+			#if( $dataElementCategoryOption.categories )
+#set( $size = $dataElementCategoryOption.categories.size() )
+#set( $categories =  )
+#foreach( $category in $dataElementCategoryOption.categories)
+	{
+		id: $category.id,
+		uid: $category.uid,
+		name : $!encoder.jsonEncode( ${category.name} )
+	}#if( $velocityCount  $size ),#end
+#end
+			#end
+		]
+	
   }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties	2014-12-13 10:38:39 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties	2015-01-08 02:24:11 +
@@ -238,4 +238,5 @@
 edit_data_element_category_option_combo = Edit data element category option combo
 average_sum_in_org_unit_hierarchy=Average (sum in org unit hierarchy)
 approve_data=Approve data
-decimals_in_data_output=Decimals in data output
\ No newline at end of file
+decimals_in_data_output=Decimals in data output
+categories = Categories
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/categoryOption.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/categoryOption.js	2014-11-15 13:26:06 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/categoryOption.js	2015-01-08 02:24:11 +
@@ -71,6 +71,15 @@
 		setInnerHTML( 'startDateField', json.dataElementCategoryOption.startDate );
 		setInnerHTML( 'endDateField', json.dataElementCategoryOption.endDate );
 		setInnerHTML( 'idField', json.dataElementCategoryOption.uid );
+		
+		var categories = ;
+		for( var i in json.dataElementCategoryOption.categories )
+		{
+			categories += json.dataElementCategoryOption.categories[i].name + ; ;
+		}
+		categories = categories.substr( 0, categories.length - 2 );
+		setInnerHTML( 'categoriesField', categories );
+		
 showDetails();
 	});
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/categoryOption.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/categoryOption.vm	2014-11-15 13:26:06 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/categoryOption.vm	2015-01-08 02:24:11 +
@@ -68,6 +68,7 @@
   plabel$i18n.getString( name ):/labelbr/span id=nameField/span/p
   

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17907: Missing prototype def

2015-01-07 Thread noreply

revno: 17907
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 18:49:40 +0100
message:
  Missing prototype def
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ValidateCategoryOptionGroupAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/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-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ValidateCategoryOptionGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ValidateCategoryOptionGroupAction.java	2014-03-18 08:10:10 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ValidateCategoryOptionGroupAction.java	2015-01-07 17:49:40 +
@@ -106,7 +106,6 @@
 {
 if ( name != null )
 {
-
 CategoryOptionGroup match = dataElementCategoryService.getCategoryOptionGroupByName( name );
 
 if ( match != null  (id == null || match.getId() != id.intValue()) )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml	2014-12-04 06:39:46 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml	2015-01-07 17:49:40 +
@@ -3,6 +3,8 @@
   xsi:schemaLocation=
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd;
 
+  bean id=org.hisp.dhis.dd.action.NoAction class=org.hisp.dhis.dd.action.NoAction /
+
   !-- Data Element --
 
   bean id=org.hisp.dhis.dd.action.dataelement.GetDataElementListAction class=org.hisp.dhis.dd.action.dataelement.GetDataElementListAction
@@ -69,7 +71,8 @@
 
   !-- Data Element Group --
 
-  bean id=org.hisp.dhis.dd.action.dataelementgroup.ShowAddDataElementGroupForm class=org.hisp.dhis.dd.action.dataelementgroup.ShowAddDataElementGroupForm
+  bean id=org.hisp.dhis.dd.action.dataelementgroup.ShowAddDataElementGroupForm class=org.hisp.dhis.dd.action.dataelementgroup.ShowAddDataElementGroupForm
+  	scope=prototype
 property name=attributeService ref=org.hisp.dhis.attribute.AttributeService /
   /bean
 
@@ -290,7 +293,8 @@
 
   !-- Indicator --
 
-  bean id=org.hisp.dhis.dd.action.indicator.ShowAddIndicatorForm class=org.hisp.dhis.dd.action.indicator.ShowAddIndicatorForm
+  bean id=org.hisp.dhis.dd.action.indicator.ShowAddIndicatorForm class=org.hisp.dhis.dd.action.indicator.ShowAddIndicatorForm
+  	scope=prototype
 	property name=indicatorService ref=org.hisp.dhis.indicator.IndicatorService /
 property name=attributeService ref=org.hisp.dhis.attribute.AttributeService /
 property name=mappingService ref=org.hisp.dhis.mapping.MappingService /
@@ -396,6 +400,11 @@
 property name=dataElementCategoryService ref=org.hisp.dhis.dataelement.DataElementCategoryService /
   /bean
   
+  bean id=org.hisp.dhis.dd.action.category.ValidateDataElementCategoryOptionAction class=org.hisp.dhis.dd.action.category.ValidateDataElementCategoryOptionAction
+scope=prototype
+property name=dataElementCategoryService ref=org.hisp.dhis.dataelement.DataElementCategoryService /
+  /bean
+  
   !-- CategoryCombo --
 
   bean id=org.hisp.dhis.dd.action.categorycombo.GetDataElementCategoryListAction class=org.hisp.dhis.dd.action.categorycombo.GetDataElementCategoryListAction
@@ -433,17 +442,6 @@
 property name=dataElementCategoryService ref=org.hisp.dhis.dataelement.DataElementCategoryService /
   /bean
 
-  !-- Validate CategoryOption --
-
-  bean id=org.hisp.dhis.dd.action.category.ValidateDataElementCategoryOptionAction class=org.hisp.dhis.dd.action.category.ValidateDataElementCategoryOptionAction
-scope=prototype
-property name=dataElementCategoryService ref=org.hisp.dhis.dataelement.DataElementCategoryService /
-  /bean
-
-  !-- Other --
-
-  bean id=org.hisp.dhis.dd.action.NoAction class=org.hisp.dhis.dd.action.NoAction /
-
   !-- CategoryOptionGroup  --
   
   bean id=org.hisp.dhis.dd.action.categoryoptiongroup.AddCategoryOptionGroupAction class=org.hisp.dhis.dd.action.categoryoptiongroup.AddCategoryOptionGroupAction

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : 

[Dhis2-devs] Authority missing for See Data Element/Indicators App

2015-01-07 Thread Adebusoye Anifalaje
Hi Devs,

There is currently no authority to allow a user to see the Data Element app. 
Similar to See Data Entry Module, we need to assign authorities to user roles 
which allow them to see the Data Element/Indicator app and then to list data 
elements but not edit them. It would be so much easier to assign this as an 
authority to a user role rather than use the sharing function.

Is there a reason why this is not included or am I missing it somewhere?

Regards,
Busoye
___
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] Authority missing for See Data Element/Indicators App

2015-01-07 Thread Adebusoye Anifalaje
Addendum: I checked on the Demo instance and 

Version: 2.17
Build revision:17673

Regards,
Busoye


 On 7 Jan 2015, at 14:11, Adebusoye Anifalaje bus...@hisp.org wrote:
 
 Hi Devs,
 
 There is currently no authority to allow a user to see the Data Element app. 
 Similar to See Data Entry Module, we need to assign authorities to user roles 
 which allow them to see the Data Element/Indicator app and then to list data 
 elements but not edit them. It would be so much easier to assign this as an 
 authority to a user role rather than use the sharing function.
 
 Is there a reason why this is not included or am I missing it somewhere?
 
 Regards,
 Busoye
 ___
 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 17908: Made CategoryOptionGroupStore extend GenericNameableObjectStore

2015-01-07 Thread noreply

revno: 17908
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 18:57:12 +0100
message:
  Made CategoryOptionGroupStore extend GenericNameableObjectStore
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupStore.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ValidateCategoryOptionGroupAction.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/CategoryOptionGroupStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupStore.java	2014-10-17 18:44:58 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupStore.java	2015-01-07 17:57:12 +
@@ -1,11 +1,39 @@
 package org.hisp.dhis.dataelement;
 
+/*
+ * 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 java.util.List;
 
-import org.hisp.dhis.common.GenericIdentifiableObjectStore;
+import org.hisp.dhis.common.GenericNameableObjectStore;
 
 public interface CategoryOptionGroupStore
-extends GenericIdentifiableObjectStoreCategoryOptionGroup
+extends GenericNameableObjectStoreCategoryOptionGroup
 {
 ListCategoryOptionGroup getCategoryOptionGroups( CategoryOptionGroupSet groupSet );
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ValidateCategoryOptionGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ValidateCategoryOptionGroupAction.java	2015-01-07 17:49:40 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ValidateCategoryOptionGroupAction.java	2015-01-07 17:57:12 +
@@ -108,7 +108,7 @@
 {
 CategoryOptionGroup match = dataElementCategoryService.getCategoryOptionGroupByName( name );
 
-if ( match != null  (id == null || match.getId() != id.intValue()) )
+if ( match != null  (id == null || match.getId() != id) )
 {
 message = i18n.getString( name_in_use );
 

___
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 17909: Deletion handling for category option groups

2015-01-07 Thread noreply

revno: 17909
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 19:22:38 +0100
message:
  Deletion handling for category option groups
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/ChartService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/hibernate/HibernateAnalyticalObjectStore.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/ChartDeletionHandler.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableDeletionHandler.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.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/chart/ChartService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/ChartService.java	2014-09-15 20:06:58 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/ChartService.java	2015-01-07 18:22:38 +
@@ -33,6 +33,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.hisp.dhis.dataelement.CategoryOptionGroup;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataset.DataSet;
@@ -118,4 +119,6 @@
 int countDataElementCharts( DataElement dataElement );
 
 int countOrganisationUnitCharts( OrganisationUnit organisationUnit );
+
+int countCategoryOptionGroups( CategoryOptionGroup categoryOptionGroup );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java	2014-04-28 11:24:08 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java	2015-01-07 18:22:38 +
@@ -28,6 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.dataelement.CategoryOptionGroup;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.indicator.Indicator;
@@ -46,4 +47,6 @@
 int countDataElementAnalyticalObject( DataElement dataElement );
 
 int countOrganisationUnitAnalyticalObject( OrganisationUnit organisationUnit );
+
+int countCategoryOptionGroupAnalyticalObject( CategoryOptionGroup categoryOptionGroup );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java	2014-04-28 11:24:08 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java	2015-01-07 18:22:38 +
@@ -29,6 +29,7 @@
  */
 
 import org.hisp.dhis.common.Grid;
+import org.hisp.dhis.dataelement.CategoryOptionGroup;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.i18n.I18nFormat;
@@ -156,4 +157,6 @@
 int countDataElementReportTables( DataElement dataElement );
 
 int countOrganisationUnitReportTables( OrganisationUnit organisationUnit );
+
+int countCategoryOptionGroups( CategoryOptionGroup categoryOptionGroup );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/hibernate/HibernateAnalyticalObjectStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/hibernate/HibernateAnalyticalObjectStore.java	2014-04-28 11:24:08 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/hibernate/HibernateAnalyticalObjectStore.java	2015-01-07 18:22:38 +
@@ -31,6 +31,7 @@
 import org.hibernate.Query;
 import org.hisp.dhis.common.AnalyticalObjectStore;
 import org.hisp.dhis.common.BaseAnalyticalObject;
+import org.hisp.dhis.dataelement.CategoryOptionGroup;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.indicator.Indicator;
@@ -77,4 +78,13 @@
 
 return ((Long) query.uniqueResult()).intValue();
 }
+
+@Override
+public int countCategoryOptionGroupAnalyticalObject( CategoryOptionGroup categoryOptionGroup )
+{
+Query query = getQuery( select count(distinct c) from  + clazz.getName() +  c where :categoryOptionGroup in elements(c.categoryOptionGroups) );
+query.setEntity( categoryOptionGroup, 

Re: [Dhis2-devs] Authority missing for See Data Element/Indicators App

2015-01-07 Thread Lars Helge Øverland
Hi Busoye,

its actually See data dictionary module. I will rename this in the UI.
You can use it for now.

regards,

Lars


On Wed, Jan 7, 2015 at 8:19 PM, Adebusoye Anifalaje bus...@hisp.org wrote:

 Addendum: I checked on the Demo instance and

 Version: 2.17Build revision:17673
 Regards,Busoye


 On 7 Jan 2015, at 14:11, Adebusoye Anifalaje bus...@hisp.org wrote:

 Hi Devs,

 There is currently no authority to allow a user to see the Data Element
 app. Similar to See Data Entry Module, we need to assign authorities to
 user roles which allow them to see the Data Element/Indicator app and then
 to list data elements but not edit them. It would be so much easier to
 assign this as an authority to a user role rather than use the sharing
 function.

 Is there a reason why this is not included or am I missing it somewhere?

 Regards,
 Busoye
 ___
 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


Re: [Dhis2-devs] Authority missing for See Data Element/Indicators App

2015-01-07 Thread Adebusoye Anifalaje
Thank you Lars.


Busoye

 On 7 Jan 2015, at 14:29, Lars Helge Øverland larshe...@gmail.com wrote:
 
 Hi Busoye,
 
 its actually See data dictionary module. I will rename this in the UI. You 
 can use it for now.
 
 regards,
 
 Lars
 
 
 On Wed, Jan 7, 2015 at 8:19 PM, Adebusoye Anifalaje bus...@hisp.org 
 mailto:bus...@hisp.org wrote:
 Addendum: I checked on the Demo instance and 
 
 Version: 2.17
 Build revision:17673
 
 Regards,
 Busoye
 
 
 On 7 Jan 2015, at 14:11, Adebusoye Anifalaje bus...@hisp.org 
 mailto:bus...@hisp.org wrote:
 
 Hi Devs,
 
 There is currently no authority to allow a user to see the Data Element app. 
 Similar to See Data Entry Module, we need to assign authorities to user 
 roles which allow them to see the Data Element/Indicator app and then to 
 list data elements but not edit them. It would be so much easier to assign 
 this as an authority to a user role rather than use the sharing function.
 
 Is there a reason why this is not included or am I missing it somewhere?
 
 Regards,
 Busoye
 ___
 Mailing list: https://launchpad.net/~dhis2-devs 
 https://launchpad.net/~dhis2-devs
 Post to : dhis2-devs@lists.launchpad.net 
 mailto:dhis2-devs@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-devs 
 https://launchpad.net/~dhis2-devs
 More help   : https://help.launchpad.net/ListHelp 
 https://help.launchpad.net/ListHelp
 
 
 ___
 Mailing list: https://launchpad.net/~dhis2-devs 
 https://launchpad.net/~dhis2-devs
 Post to : dhis2-devs@lists.launchpad.net 
 mailto:dhis2-devs@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-devs 
 https://launchpad.net/~dhis2-devs
 More help   : https://help.launchpad.net/ListHelp 
 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 17903: Script

2015-01-07 Thread noreply

revno: 17903
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Wed 2015-01-07 13:14:33 +0100
message:
  Script
modified:
  resources/sql/div.sql
  resources/sql/integritychecks.sql


--
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 'resources/sql/div.sql'
--- resources/sql/div.sql	2015-01-05 18:22:31 +
+++ resources/sql/div.sql	2015-01-07 12:14:33 +
@@ -211,6 +211,15 @@
 inner join categoryoptioncombo coc on (dv.categoryoptioncomboid=coc.categoryoptioncomboid)
 inner join categoryoptioncombo aoc on (dv.attributeoptioncomboid=aoc.categoryoptioncomboid)
 limit 1;
+
+-- Display validation rules which includes the given data element uid
+
+select distinct vr.uid, vr.name
+from validationrule vr
+inner join expression le on vr.leftexpressionid=le.expressionid
+inner join expression re on vr.rightexpressionid=re.expressionid
+where le.expression ~ 'OuudMtJsh2z'
+or re.expression  ~ 'OuudMtJsh2z'
   
 -- (Write) Delete all data values for category combo
 

=== modified file 'resources/sql/integritychecks.sql'
--- resources/sql/integritychecks.sql	2014-12-05 10:06:08 +
+++ resources/sql/integritychecks.sql	2015-01-07 12:14:33 +
@@ -105,6 +105,20 @@
 create index aggregatedindicatorvalue_index on aggregatedindicatorvalue (indicatorid, periodid, organisationunitid, value);
 create index aggregateddatasetcompleteness_index on aggregateddatasetcompleteness  (datasetid, periodid, organisationunitid, value);
 
+-- Get category option combos from data values which are not part of the category combo of the data element
+
+select distinct de.name as data_element, dv.dataelementid, de_cc.name as data_element_category_combo, oc_cc.name as option_combo_category_combo, con.categoryoptioncomboname, dv.categoryoptioncomboid
+from datavalue dv
+left join dataelement de on dv.dataelementid=de.dataelementid
+left join categorycombo de_cc on de.categorycomboid=de_cc.categorycomboid
+inner join categorycombos_optioncombos cc_oc on dv.categoryoptioncomboid=cc_oc.categoryoptioncomboid
+left join categorycombo oc_cc on cc_oc.categorycomboid=oc_cc.categorycomboid
+left join _categoryoptioncomboname con on dv.categoryoptioncomboid=con.categoryoptioncomboid
+where not exists (
+  select 1 from _dataelementcategoryoptioncombo dc
+  where dc.dataelementid=dv.dataelementid
+  and dc.categoryoptioncomboid=dv.categoryoptioncomboid);
+
 -- Get category option combos without category options
 
 select * from categoryoptioncombo where categoryoptioncomboid not in (select distinct categoryoptioncomboid from categoryoptioncombos_categoryoptions);

___
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