[Dhis2-devs] SMS Routing and GSM Operator

2016-01-06 Thread Guy Ekani
Happy new year 2016 to the community,
Please I would like to know how can i make the link between the SMS that an 
user sent to the short code that  our gsm operator gave us and DHIS 
I'm able to send sms to user via Dhis SMS-apps, but when user sent SMS to 
report data i didn't see it.
Is the link that i have to give my Gsm operator has this format ? 
https://www.dhiswebsite.org/sms/smsinput.action?message=MESSAGE=123456789=8080
Any help or suggestion will be appreciated


Gateway type = Generic HTTP gateway
Hosting = BaosystemsDHIS = 2.21- version:20853


 = 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


Re: [Dhis2-devs] [Dhis2-users] Org unit is being unassigned after edit

2016-01-06 Thread Lars Helge Øverland
Thanks Hannah. I have already updated all versions.

Lars

On Wed, Jan 6, 2016 at 7:00 AM, Hannan Khan  wrote:

> Dear Lars
>
> Thank you very much for your prompt action. It is working well.
>
> Please update the 20 and 21 war as well.
>
> Best regards
>
> Hannan Khan
> HISP Bangladesh
>
> On Tue, Jan 5, 2016 at 6:33 PM, Lars Helge Øverland 
> wrote:
>
>> Hi Hannah and Uwe,
>>
>> this should be fixed now in 2.19 > trunk. New builds are triggered on ci.
>> Thanks for reporting.
>>
>> regards,
>>
>> Lars
>>
>>
>> On Mon, Jan 4, 2016 at 8:58 PM, uwe wahser  wrote:
>>
>>> Just to support: I saw the same in 2.21
>>>
>>>
>>>
>>> Am 31.12.2015 um 07:31 schrieb Hannan Khan:
>>>
>>> Dear All
>>>
>>> Happy new year.
>>>
>>> Sorry to disturb you all during this holidays, but this is urgent.
>>>
>>> When ever we are editing orgunit, correct the spelling, code etc., all
>>> it data sets are become unassigned. so we have to reassigned all data sets
>>> again which is quite cumbersome.
>>>
>>> Fatima earlier reported this issue with build 19273. I waited and try
>>> with new build.
>>>
>>> we are using version 19 build 19285.  how we resolve this? need urgent
>>> help.
>>>
>>> Regards
>>>
>>> Hannan
>>> HISP Bangladesh
>>>
>>>
>>> ___
>>> 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
>>>
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> http://www.dhis2.org 
>>
>>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.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


[Dhis2-devs] Search person by incidence date range

2016-01-06 Thread Nayeem Al Mifthah
Dear All

I want to search a entities by incidence date range, Is it possible on
tracker?


*Nayeem Al Mifthah*
Consultant (Team Leader of HMIS)
Management Information System
Directorate General of Health Services (DGHS), Bangladesh
Supported by: UNICEF-Bangladesh
Email: n.mift...@gmail.com  | nay...@mis.dghs.gov.bd
Cell:+8801914030574
Skype: nayeem.a.m
___
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 21614: Improved adx export

2016-01-06 Thread noreply

revno: 21614
committer: bobjolliffe 
branch nick: dhis2
timestamp: Wed 2016-01-06 11:26:52 +
message:
  Improved adx export
added:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataSetMetadata.java
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/DefaultAdxDataService.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/adx/AdxDataService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataService.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataService.java	2016-01-06 11:26:52 +
@@ -55,6 +55,7 @@
 String DATAVALUE = "dataValue";
 String VALUE = "value";
 String ANNOTATION = "annotation";
+String ERROR = "error";
 
 //--
 // DHIS 2 specific constants

=== added file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataSetMetadata.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataSetMetadata.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataSetMetadata.java	2016-01-06 11:26:52 +
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2015, UiO
+ * 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.
+ *
+ * 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 HOLDER 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.
+ */
+package org.hisp.dhis.dxf2.adx;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import org.apache.xerces.util.XMLChar;
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementCategory;
+import org.hisp.dhis.dataelement.DataElementCategoryCombo;
+import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
+import org.hisp.dhis.dataset.DataSet;
+
+/**
+ *
+ * @author bobj
+ */
+public class AdxDataSetMetadata {
+
+private final DataSet dataSet;
+   
+// lookup categoryoptions per catoptcombo
+private final Map> categoryOptionMap;
+
+AdxDataSetMetadata(DataSet dataSet) throws AdxException
+{
+this.dataSet = dataSet;
+
+categoryOptionMap = new HashMap<>();
+
+Set catCombos = new HashSet<>();
+
+catCombos.add(dataSet.getCategoryCombo());
+for (DataElement dataElement : dataSet.getDataElements())
+{
+catCombos.add(dataElement.getCategoryCombo());
+}
+
+for (DataElementCategoryCombo categoryCombo : catCombos)
+{
+for (DataElementCategoryOptionCombo catOptCombo : categoryCombo.getOptionCombos())
+{
+addExplodedCategoryAttributes(catOptCombo);
+}
+}
+}
+
+private void addExplodedCategoryAttributes( DataElementCategoryOptionCombo coc ) 
+throws AdxException
+{
+Map categoryAttributes = new HashMap<>();
+
+if (!coc.isDefault())
+{
+for (DataElementCategory category : coc.getCategoryCombo().getCategories()) 
+{
+String 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21613: TC: TEIS with events here today

2016-01-06 Thread noreply

revno: 21613
committer: Markus Bekken 
branch nick: dhis2
timestamp: Wed 2016-01-06 10:00:50 +0100
message:
  TC: TEIS with events here today
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app_ar.properties
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/tei.html


--
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-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties	2015-12-30 13:04:58 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties	2016-01-06 09:00:50 +
@@ -384,9 +384,14 @@
 value_not_unique=Value not unique
 custom_form_has_invalid_attribute=Custom form has invalid attribute.
 custom_form_has_invalid_dataelement=Custom form has invalid data element.
+events_today_persons=Only those with an event today
 has_no_dataelements=has no dataelements.
 section=Section
 display_mode=Display mode
 tracker_capture_display_mode=Tracker capture display mode
+events_today_all=All events today
+events_today_completeoractive=Complete or active
+events_today_skipped=Skipped
+events_today_scheduled=Scheduled
 print_form=Print form
-value_must_be_email=Please enter a valid email address
\ No newline at end of file
+value_must_be_email=Please enter a valid email address

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app_ar.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app_ar.properties	2015-12-11 19:41:20 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app_ar.properties	2016-01-06 09:00:50 +
@@ -263,4 +263,9 @@
 help=\u0645\u0633\u0627\u0639\u062f\u0629
 log_out=\u062a\u0633\u062c\u064a\u0644 \u062e\u0631\u0648\u062c
 about_dhis2=\u062d\u0648\u0644 DHIS 2
-value_must_be_email = \u064a\u062c\u0628 \u0623\u0646 \u062a\u0643\u0648\u0646 \u0642\u064a\u0645\u0629 \u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a(\u062c\u0648\u062c\u0644 \u062a\u0631\u062c\u0645\u0629)
\ No newline at end of file
+events_today_persons=\u0641\u0642\u0637 \u062a\u0644\u0643 \u0627\u0644\u062a\u064a \u062d\u062f\u062b \u0627\u0644\u064a\u0648\u0645(\u062c\u0648\u062c\u0644 \u062a\u0631\u062c\u0645\u0629)
+events_today_all = \u062c\u0645\u064a\u0639 \u0623\u062d\u062f\u0627\u062b \u0627\u0644\u064a\u0648\u0645(\u062c\u0648\u062c\u0644 \u062a\u0631\u062c\u0645\u0629)
+events_today_completeoractive = \u0643\u0627\u0645\u0644\u0629 \u0623\u0648 \u0646\u0634\u0627\u0637\u0627(\u062c\u0648\u062c\u0644 \u062a\u0631\u062c\u0645\u0629)
+events_today_skipped = \u062a\u062e\u0637\u064a(\u062c\u0648\u062c\u0644 \u062a\u0631\u062c\u0645\u0629)
+events_today_scheduled = \u0627\u0644\u0645\u0642\u0631\u0631(\u062c\u0648\u062c\u0644 \u062a\u0631\u062c\u0645\u0629)
+value_must_be_email = \u064a\u062c\u0628 \u0623\u0646 \u062a\u0643\u0648\u0646 \u0642\u064a\u0645\u0629 \u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a(\u062c\u0648\u062c\u0644 \u062a\u0631\u062c\u0645\u0629)

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2015-12-23 09:29:34 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2016-01-06 09:00:50 +
@@ -25,10 +25,14 @@
 EntityQueryFactory,
 CurrentSelection,
 TEIGridService,
-TEIService) {  
-
-
+TEIService,
+EventReportService,
+ModalService,$q) {  
 $scope.maxOptionSize = 30;
+$scope.eventsTodayFilters = [{name: $translate.instant('events_today_all'), value: 'all'},{name: $translate.instant('events_today_completeoractive'),value: 'completedOrActive', status:['COMPLETED', 'ACTIVE']},{name: $translate.instant('events_today_skipped') , value: 'skipped', 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21615: ADX, code style

2016-01-06 Thread noreply

revno: 21615
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 12:43:22 +0100
message:
  ADX, code style
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataSetMetadata.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/DefaultAdxDataService.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-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java	2016-01-06 11:43:22 +
@@ -61,7 +61,7 @@
 /**
  * Cache for system settings. Does not accept nulls.
  */
-private static Cache SETTING_CACHE = CacheBuilder.newBuilder()
+private static final Cache SETTING_CACHE = CacheBuilder.newBuilder()
 .expireAfterAccess( 1, TimeUnit.HOURS )
 .initialCapacity( 200 )
 .maximumSize( 400 )

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataSetMetadata.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataSetMetadata.java	2016-01-06 11:26:52 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/adx/AdxDataSetMetadata.java	2016-01-06 11:43:22 +
@@ -1,3 +1,5 @@
+package org.hisp.dhis.dxf2.adx;
+
 /*
  * Copyright (c) 2015, UiO
  * All rights reserved.
@@ -23,7 +25,6 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-package org.hisp.dhis.dxf2.adx;
 
 import java.util.HashMap;
 import java.util.HashSet;
@@ -40,67 +41,73 @@
  *
  * @author bobj
  */
-public class AdxDataSetMetadata {
-
+public class AdxDataSetMetadata
+{
 private final DataSet dataSet;
-   
-// lookup categoryoptions per catoptcombo
+
+// Lookup category options per catoptcombo
+
 private final Map> categoryOptionMap;
 
-AdxDataSetMetadata(DataSet dataSet) throws AdxException
+AdxDataSetMetadata( DataSet dataSet )
+throws AdxException
 {
 this.dataSet = dataSet;
-
+
 categoryOptionMap = new HashMap<>();
-
+
 Set catCombos = new HashSet<>();
+
+catCombos.add( dataSet.getCategoryCombo() );
 
-catCombos.add(dataSet.getCategoryCombo());
-for (DataElement dataElement : dataSet.getDataElements())
+for ( DataElement dataElement : dataSet.getDataElements() )
 {
-catCombos.add(dataElement.getCategoryCombo());
+catCombos.add( dataElement.getCategoryCombo() );
 }
-
-for (DataElementCategoryCombo categoryCombo : catCombos)
+
+for ( DataElementCategoryCombo categoryCombo : catCombos )
 {
-for (DataElementCategoryOptionCombo catOptCombo : categoryCombo.getOptionCombos())
+for ( DataElementCategoryOptionCombo catOptCombo : categoryCombo.getOptionCombos() )
 {
-addExplodedCategoryAttributes(catOptCombo);
+addExplodedCategoryAttributes( catOptCombo );
 }
 }
 }
-
-private void addExplodedCategoryAttributes( DataElementCategoryOptionCombo coc ) 
-throws AdxException
+
+private void addExplodedCategoryAttributes( DataElementCategoryOptionCombo coc )
+throws AdxException
 {
 Map categoryAttributes = new HashMap<>();
-
-if (!coc.isDefault())
-{
-for (DataElementCategory category : coc.getCategoryCombo().getCategories()) 
+
+if ( !coc.isDefault() )
+{
+for ( DataElementCategory category : coc.getCategoryCombo().getCategories() )
 {
 String categoryCode = category.getCode();
-if (categoryCode == null || !XMLChar.isValidName(categoryCode)) {
-throw new AdxException(
-"Category code for " + category.getName() + " is missing or invalid: " + categoryCode);
-}
-
-String catOptCode = category.getCategoryOption(coc).getCode();
-if (catOptCode == null || catOptCode.isEmpty()) {
-throw new AdxException(
- 

Re: [Dhis2-devs] SMS Routing and GSM Operator

2016-01-06 Thread Raja Zubair
Hi Guy,

You don't see any thing on View Received SMS page ? Even if sms is not
processable still it will saved (with UN-HANDLED status) as soon as it
reaches this API end point . If you don't see any thing there, then this
API endpoint is not reachable from sms gateway.


Regards

Zubair

On Wed, Jan 6, 2016 at 10:55 AM, Guy Ekani  wrote:

> Happy new year 2016 to the community,
>
> Please I would like to know how can i make the link between the SMS that
> an user sent to the short code that  our gsm operator gave us and DHIS
>
> I'm able to send sms to user via Dhis SMS-apps, but when user sent SMS to
> report data i didn't see it.
>
> Is the link that i have to give my Gsm operator has this format ?
>
> https://www.dhiswebsite.org/sms/smsinput.action?message=MESSAGE=123456789=8080
>
> Any help or suggestion will be appreciated
>
>
> Gateway type = Generic HTTP gateway
> Hosting = Baosystems
> DHIS = 2.21- version:20853
>
>
>
> =
> 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
>
>
___
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] SMS Routing and GSM Operator

2016-01-06 Thread Guy Ekani
Yes Raja, i dont see anything on View Received SMS page.
 = EKANI Guy 
 



  

Le Mercredi 6 janvier 2016 11h34, Raja Zubair  
a écrit :
 

 Hi Guy,
You don't see any thing on View Received SMS page ? Even if sms is not 
processable still it will saved (with UN-HANDLED status) as soon as it reaches 
this API end point . If you don't see any thing there, then this API endpoint 
is not reachable from sms gateway.

RegardsZubair
On Wed, Jan 6, 2016 at 10:55 AM, Guy Ekani  wrote:

Happy new year 2016 to the community,
Please I would like to know how can i make the link between the SMS that an 
user sent to the short code that  our gsm operator gave us and DHIS 
I'm able to send sms to user via Dhis SMS-apps, but when user sent SMS to 
report data i didn't see it.
Is the link that i have to give my Gsm operator has this format ? 
https://www.dhiswebsite.org/sms/smsinput.action?message=MESSAGE=123456789=8080
Any help or suggestion will be appreciated


Gateway type = Generic HTTP gateway
Hosting = BaosystemsDHIS = 2.21- version:20853


 = 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





  ___
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 21621: Rename methods

2016-01-06 Thread noreply

revno: 21621
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 15:03:52 +0100
message:
  Rename methods
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java
  
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/mapping/DefaultMappingService.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/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/common/AnalyticalObjectStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java	2016-01-06 13:45:38 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java	2016-01-06 14:03:52 +
@@ -58,17 +58,17 @@
 
 List getAnalyticalObjects( CategoryOptionGroup categoryOptionGroup );
 
-int countAnalyticalObject( Indicator indicator );
-
-int countAnalyticalObject( DataElement dataElement );
-
-int countAnalyticalObject( DataSet dataSet );
-
-int countAnalyticalObject( ProgramIndicator programIndicator );
-
-int countAnalyticalObject( Period period );
-
-int countAnalyticalObject( OrganisationUnit organisationUnit );
-
-int countAnalyticalObject( CategoryOptionGroup categoryOptionGroup );
+int countAnalyticalObjects( Indicator indicator );
+
+int countAnalyticalObjects( DataElement dataElement );
+
+int countAnalyticalObjects( DataSet dataSet );
+
+int countAnalyticalObjects( ProgramIndicator programIndicator );
+
+int countAnalyticalObjects( Period period );
+
+int countAnalyticalObjects( OrganisationUnit organisationUnit );
+
+int countAnalyticalObjects( 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	2016-01-06 13:50:29 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/hibernate/HibernateAnalyticalObjectStore.java	2016-01-06 14:03:52 +
@@ -106,7 +106,7 @@
 }
 
 @Override
-public int countAnalyticalObject( Indicator indicator )
+public int countAnalyticalObjects( Indicator indicator )
 {
 Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c join c.dataDimensionItems d where d.indicator = :indicator" );
 query.setEntity( "indicator", indicator );
@@ -115,7 +115,7 @@
 }
 
 @Override
-public int countAnalyticalObject( DataElement dataElement )
+public int countAnalyticalObjects( DataElement dataElement )
 {
 Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c join c.dataDimensionItems d where d.dataElement = :dataElement" );
 query.setEntity( "dataElement", dataElement );
@@ -124,7 +124,7 @@
 }
 
 @Override
-public int countAnalyticalObject( DataSet dataSet )
+public int countAnalyticalObjects( DataSet dataSet )
 {
 Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c join c.dataDimensionItems d where d.dataSet = :dataSet" );
 query.setEntity( "dataSet", dataSet );
@@ -133,7 +133,7 @@
 }
 
 @Override
-public int countAnalyticalObject( ProgramIndicator programIndicator )
+public int countAnalyticalObjects( ProgramIndicator programIndicator )
 {
 Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c join c.dataDimensionItems d where d.programIndicator = :programIndicator" );
 query.setEntity( "dataSet", programIndicator );
@@ -142,7 +142,7 @@
 }
 
 @Override
-public int countAnalyticalObject( Period period )
+public int countAnalyticalObjects( Period period )
 {
 Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c where :period in elements(c.periods)" );
 query.setEntity( "period", period );
@@ -151,7 +151,7 @@
 }
 
 @Override
-public int countAnalyticalObject( OrganisationUnit organisationUnit )
+public int countAnalyticalObjects( OrganisationUnit organisationUnit )
 {
 Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c where 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21616: Adjusted cat combo isValid

2016-01-06 Thread noreply

revno: 21616
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 13:12:21 +0100
message:
  Adjusted cat combo isValid
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.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/DataElementCategoryCombo.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java	2016-01-06 12:12:21 +
@@ -111,7 +111,7 @@
  */
 public boolean isValid()
 {
-if ( categories == null || categories.isEmpty() || optionCombos == null || optionCombos.isEmpty() )
+if ( categories == null || categories.isEmpty() )
 {
 return false;
 }

___
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 21623: AnalyticalObjectService for event report and event chart

2016-01-06 Thread noreply

revno: 21623
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 15:37:53 +0100
message:
  AnalyticalObjectService for event report and event chart
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventchart/EventChartService.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReportService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/DefaultEventChartService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/DefaultEventReportService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/EventReportDeletionHandler.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/eventchart/EventChartService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventchart/EventChartService.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventchart/EventChartService.java	2016-01-06 14:37:53 +
@@ -30,10 +30,13 @@
 
 import java.util.List;
 
+import org.hisp.dhis.common.AnalyticalObjectService;
+
 /**
 * @author Lars Helge Overland
 */
 public interface EventChartService
+extends AnalyticalObjectService
 {
 int saveEventChart( EventChart eventChart );
 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReportService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReportService.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReportService.java	2016-01-06 14:37:53 +
@@ -30,10 +30,13 @@
 
 import java.util.List;
 
+import org.hisp.dhis.common.AnalyticalObjectService;
+
 /**
 * @author Lars Helge Overland
 */
 public interface EventReportService
+extends AnalyticalObjectService
 {
 int saveEventReport( EventReport report );
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/DefaultEventChartService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/DefaultEventChartService.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/DefaultEventChartService.java	2016-01-06 14:37:53 +
@@ -30,7 +30,9 @@
 
 import java.util.List;
 
-import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
+import org.hisp.dhis.common.AnalyticalObjectStore;
+import org.hisp.dhis.common.GenericAnalyticalObjectService;
+import org.hisp.dhis.common.hibernate.HibernateAnalyticalObjectStore;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
@@ -38,11 +40,12 @@
 */
 @Transactional
 public class DefaultEventChartService
+extends GenericAnalyticalObjectService
 implements EventChartService
 {
-private HibernateIdentifiableObjectStore eventChartStore;
+private HibernateAnalyticalObjectStore eventChartStore;
 
-public void setEventChartStore( HibernateIdentifiableObjectStore eventChartStore )
+public void setEventChartStore( HibernateAnalyticalObjectStore eventChartStore )
 {
 this.eventChartStore = eventChartStore;
 }
@@ -52,6 +55,12 @@
 // -
 
 @Override
+protected AnalyticalObjectStore getAnalyticalObjectStore()
+{
+return eventChartStore;
+}
+
+@Override
 public int saveEventChart( EventChart eventChart )
 {
 return eventChartStore.save( eventChart );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/DefaultEventReportService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/DefaultEventReportService.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/DefaultEventReportService.java	2016-01-06 14:37:53 +
@@ -30,7 +30,9 @@
 
 import java.util.List;
 
-import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
+import org.hisp.dhis.common.AnalyticalObjectStore;
+import org.hisp.dhis.common.GenericAnalyticalObjectService;
+import org.hisp.dhis.common.hibernate.HibernateAnalyticalObjectStore;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
@@ -38,11 +40,12 @@
 */
 @Transactional
 public class DefaultEventReportService
+extends GenericAnalyticalObjectService
 implements EventReportService
 {
-private HibernateIdentifiableObjectStore eventReportStore;
+private 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21618: Analysis, aggregatable value types (wip).

2016-01-06 Thread noreply

revno: 21618
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 14:15:57 +0100
message:
  Analysis, aggregatable value types (wip).
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-12-29 16:07:55 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2016-01-06 13:15:57 +
@@ -4388,7 +4388,7 @@
 }
 else {
 Ext.Ajax.request({
-url: ns.core.init.contextPath + '/api/programs.json?filter=id:eq:' + programId + '=programStages[id,displayName|rename(name)],programIndicators[id,' + namePropertyUrl + '],programTrackedEntityAttributes[trackedEntityAttribute[id,' + namePropertyUrl + ',valueType,optionSet[id,displayName|rename(name)],legendSet[id,displayName|rename(name)]]]=false',
+url: ns.core.init.contextPath + '/api/programs.json?filter=id:eq:' + programId + '=programStages[id,displayName|rename(name)],programIndicators[id,' + namePropertyUrl + '],programTrackedEntityAttributes[trackedEntityAttribute[id,' + namePropertyUrl + ',valueType,confidential,optionSet[id,displayName|rename(name)],legendSet[id,displayName|rename(name)]]]=false',
 success: function(r) {
 var program = Ext.decode(r.responseText).programs[0],
 stages,
@@ -4404,10 +4404,11 @@
 attributes = Ext.Array.pluck(program.programTrackedEntityAttributes, 'trackedEntityAttribute');
 programIndicators = program.programIndicators;
 
-// mark as attribute
-for (var i = 0; i < attributes.length; i++) {
-attributes[i].isAttribute = true;
-}
+// filter confidential, mark as attribute
+attributes.filter(function(item) {
+item.isAttribute = true;
+return !item.confidential;
+});
 
 // attributes cache
 if (Ext.isArray(attributes) && attributes.length) {
@@ -4415,9 +4416,9 @@
 }
 
 // mark as program indicator
-for (var i = 0; i < programIndicators.length; i++) {
-programIndicators[i].isProgramIndicator = true;
-}
+programIndicators.forEach(function(item) {
+item.isProgramIndicator = true;
+});
 
 // program indicator cache
 if (Ext.isArray(programIndicators) && programIndicators.length) {

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2015-12-29 16:07:55 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2016-01-06 13:15:57 +
@@ -4045,7 +4045,7 @@
 }
 else {
 Ext.Ajax.request({
-url: ns.core.init.contextPath + '/api/programs.json?filter=id:eq:' + programId + '=programStages[id,displayName|rename(name)],programIndicators[id,' + namePropertyUrl + '],programTrackedEntityAttributes[trackedEntityAttribute[id,' + namePropertyUrl + ',valueType,optionSet[id,displayName|rename(name)],legendSet[id,displayName|rename(name)]]]=false',
+url: ns.core.init.contextPath + '/api/programs.json?filter=id:eq:' + programId + '=programStages[id,displayName|rename(name)],programIndicators[id,' + namePropertyUrl + '],programTrackedEntityAttributes[trackedEntityAttribute[id,' + namePropertyUrl + ',valueType,confidential,optionSet[id,displayName|rename(name)],legendSet[id,displayName|rename(name)]]]=false',
 success: function(r) {
 var program = Ext.decode(r.responseText).programs[0],
 stages,
@@ -4061,10 +4061,11 @@
 

Re: [Dhis2-devs] Search person by incidence date range

2016-01-06 Thread Markus Bekken
Dear Nayeem,
at the moment you can do an advanced search based on enrollment date, but not 
incidence date. Would it cover your usecase if the advanced search accomodated 
the incidence date in the same way as enrollment date?

Markus

> 6. jan. 2016 kl. 12.02 skrev Nayeem Al Mifthah :
> 
> Dear All
> 
> I want to search a entities by incidence date range, Is it possible on 
> tracker?
> 
> 
> Nayeem Al Mifthah
> Consultant (Team Leader of HMIS)
> Management Information System
> Directorate General of Health Services (DGHS), Bangladesh
> Supported by: UNICEF-Bangladesh
> Email: n.mift...@gmail.com   | 
> nay...@mis.dghs.gov.bd 
> Cell:+8801914030574
> Skype: nayeem.a.m
> ___
> 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 21619: AnalyticalObjectStore, impl methods for getting objects by dimensional item objects

2016-01-06 Thread noreply

revno: 21619
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 14:45:38 +0100
message:
  AnalyticalObjectStore, impl methods for getting objects by dimensional item 
objects
added:
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/AnalyticalObjectStoreTest.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
  
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/mapping/DefaultMappingService.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/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/common/AnalyticalObjectStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java	2016-01-06 13:45:38 +
@@ -1,5 +1,7 @@
 package org.hisp.dhis.common;
 
+import java.util.List;
+
 /*
  * Copyright (c) 2004-2016, University of Oslo
  * All rights reserved.
@@ -42,17 +44,31 @@
 public interface AnalyticalObjectStore
 extends GenericIdentifiableObjectStore
 {
-int countDataSetAnalyticalObject( DataSet dataSet );
-
-int countIndicatorAnalyticalObject( Indicator indicator );
-
-int countDataElementAnalyticalObject( DataElement dataElement );
-
-int countProgramIndicatorAnalyticalObject( ProgramIndicator programIndicator );
-
-int countPeriodAnalyticalObject( Period period );
-
-int countOrganisationUnitAnalyticalObject( OrganisationUnit organisationUnit );
-
-int countCategoryOptionGroupAnalyticalObject( CategoryOptionGroup categoryOptionGroup );
+List getAnalyticalObjects( Indicator indicator );
+
+List getAnalyticalObjects( DataElement dataElement );
+
+List getAnalyticalObjects( DataSet dataSet );
+
+List getAnalyticalObjects( ProgramIndicator programIndicator );
+
+List getAnalyticalObjects( Period period );
+
+List getAnalyticalObjects( OrganisationUnit organisationUnit );
+
+List getAnalyticalObjects( CategoryOptionGroup categoryOptionGroup );
+
+int countAnalyticalObject( Indicator indicator );
+
+int countAnalyticalObject( DataElement dataElement );
+
+int countAnalyticalObject( DataSet dataSet );
+
+int countAnalyticalObject( ProgramIndicator programIndicator );
+
+int countAnalyticalObject( Period period );
+
+int countAnalyticalObject( OrganisationUnit organisationUnit );
+
+int countAnalyticalObject( CategoryOptionGroup categoryOptionGroup );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java	2016-01-06 13:45:38 +
@@ -135,6 +135,11 @@
 {
 }
 
+public MapView( String layer )
+{
+this.layer = layer;
+}
+
 // -
 // Analytical
 // -

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2016-01-06 13:45:38 +
@@ -231,7 +231,7 @@
 public ReportTable()
 {
 }
-
+
 /**
  * Default constructor.
  *

=== 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	2016-01-04 02:27:49 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/hibernate/HibernateAnalyticalObjectStore.java	2016-01-06 13:45:38 +
@@ -39,6 +39,8 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.program.ProgramIndicator;
 
+import java.util.List;
+
 /**
  * @author Morten Olav Hansen 
  */
@@ -46,9 +48,65 

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

2016-01-06 Thread noreply

revno: 21620
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 14:50:29 +0100
message:
  Minor
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/hibernate/HibernateAnalyticalObjectStore.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-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	2016-01-06 13:45:38 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/hibernate/HibernateAnalyticalObjectStore.java	2016-01-06 13:50:29 +
@@ -53,7 +53,7 @@
 @SuppressWarnings("unchecked")
 public List getAnalyticalObjects( Indicator indicator )
 {
-String hql = "select distinct c from " + clazz.getSimpleName() + " c join c.dataDimensionItems d where d.indicator = :indicator";
+String hql = "select distinct c from " + clazz.getName() + " c join c.dataDimensionItems d where d.indicator = :indicator";
 return getQuery( hql ).setEntity( "indicator", indicator ).list();
 }
 

___
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 21617: Removed unused code

2016-01-06 Thread noreply

revno: 21617
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 13:12:35 +0100
message:
  Removed unused code
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.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-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java	2016-01-05 18:33:07 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java	2016-01-06 12:12:35 +
@@ -5,7 +5,6 @@
 import org.hisp.dhis.analytics.AggregationType;
 import org.hisp.dhis.attribute.AttributeService;
 import org.hisp.dhis.common.ValueType;
-import org.hisp.dhis.external.conf.DhisConfigurationProvider;
 import org.hisp.dhis.legend.LegendService;
 import org.hisp.dhis.option.OptionService;
 import org.hisp.dhis.option.OptionSet;

___
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 21624: Impl BaseAnalyticalObject.removeDataDimensionItem

2016-01-06 Thread noreply

revno: 21624
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 15:52:32 +0100
message:
  Impl BaseAnalyticalObject.removeDataDimensionItem
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DataDimensionItem.java
  
dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/BaseAnalyticalObjectTest.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableDeletionHandler.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/common/BaseAnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java	2016-01-06 14:52:32 +
@@ -268,6 +268,21 @@
 }
 
 /**
+ * Removes a data dimension object.
+ * 
+ * @return true if a data dimension was removed, false if not.
+ */
+public boolean removeDataDimensionItem( DimensionalItemObject object )
+{
+if ( object != null && DataDimensionItem.DATA_DIMENSION_CLASSES.contains( object.getClass() ) )
+{
+return dataDimensionItems.remove( DataDimensionItem.create( object ) );
+}
+
+return false;
+}
+
+/**
  * Adds all given data dimension objects.
  */
 public void addAllDataDimensionItems( Collection objects )

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DataDimensionItem.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DataDimensionItem.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DataDimensionItem.java	2016-01-06 14:52:32 +
@@ -208,6 +208,56 @@
 
 return null;
 }
+
+// -
+// Equals and hashCode
+// -
+
+@Override
+public int hashCode()
+{
+final int prime = 31;
+int result = 1;
+result = prime * result + ( ( getDimensionalItemObject() == null ) ? 0 : getDimensionalItemObject().hashCode() );
+return result;
+}
+
+@Override
+public boolean equals( Object obj )
+{
+if ( this == obj )
+{
+return true;
+}
+
+if ( obj == null )
+{
+return false;
+}
+
+if ( getClass() != obj.getClass() )
+{
+return false;
+}
+
+DataDimensionItem other = (DataDimensionItem) obj;
+
+DimensionalItemObject object = getDimensionalItemObject();
+
+if ( object == null )
+{
+if ( other.getDimensionalItemObject() != null )
+{
+return false;
+}
+}
+else if ( !object.equals( other.getDimensionalItemObject() ) )
+{
+return false;
+}
+
+return true;
+}
 
 // -
 // Get and set methods

=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/BaseAnalyticalObjectTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/BaseAnalyticalObjectTest.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/BaseAnalyticalObjectTest.java	2016-01-06 14:52:32 +
@@ -37,6 +37,7 @@
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.eventchart.EventChart;
+import org.hisp.dhis.mapping.MapView;
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityAttributeDimension;
 import org.junit.Test;
@@ -189,4 +190,38 @@
 assertFalse( deA.equals( dsD ) );
 assertFalse( dsA.equals( dsD ) );
 }
+
+@Test
+public void testAddDataDimensionItem()
+{
+DataElement deA = new DataElement();
+deA.setAutoFields();
+
+MapView mv = new MapView( MapView.LAYER_THEMATIC1 );
+
+mv.addDataDimensionItem( deA );
+
+assertEquals( 1, mv.getDataDimensionItems().size() );
+}
+
+@Test
+public void testRemoveDataDimensionItem()
+{
+DataElement deA = new DataElement();
+DataElement deB = new DataElement();
+deA.setAutoFields();
+deB.setAutoFields();
+
+MapView mv = new MapView( 

Re: [Dhis2-devs] Search person by incidence date range

2016-01-06 Thread Abyot Gizaw
That is a proper solution, but then we have to make sure a selected program
has incident date.

The reason we skipped this was because all programs do not have incident
date like enrollment.

---

Thank you,
Abyot.
(sent from mobile)
On Jan 6, 2016 17:53, "Nayeem Al Mifthah"  wrote:

> Dear Markus
> It will be great if we can search by incidence date in advance search.
> On 6 Jan 2016 19:38, "Markus Bekken"  wrote:
>
>> Dear Nayeem,
>> at the moment you can do an advanced search based on enrollment date, but
>> not incidence date. Would it cover your usecase if the advanced search
>> accomodated the incidence date in the same way as enrollment date?
>>
>> Markus
>>
>> 6. jan. 2016 kl. 12.02 skrev Nayeem Al Mifthah :
>>
>> Dear All
>>
>> I want to search a entities by incidence date range, Is it possible on
>> tracker?
>>
>>
>> *Nayeem Al Mifthah*
>> Consultant (Team Leader of HMIS)
>> Management Information System
>> Directorate General of Health Services (DGHS), Bangladesh
>> Supported by: UNICEF-Bangladesh
>> Email: n.mift...@gmail.com  | nay...@mis.dghs.gov.bd
>> Cell:+8801914030574
>> Skype: nayeem.a.m
>> ___
>> 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 21625: Improved deletion handler to remove data elements, data sets, indicators, periods, organisation u...

2016-01-06 Thread noreply

revno: 21625
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 16:52:21 +0100
message:
  Improved deletion handler to remove data elements, data sets, indicators, 
periods, organisation units, cat option groups from favorites (pivot tables, 
charts, maps) when deleted. Introduced class 
GenericAnalyticalObjectDeletionHandler to centralize deletion handler code.
added:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/GenericAnalyticalObjectDeletionHandler.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObject.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/GenericAnalyticalObjectService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/MapViewDeletionHandler.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/reporttable/ReportTableDeletionHandler.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/common/AnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObject.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObject.java	2016-01-06 15:52:21 +
@@ -32,13 +32,16 @@
 import java.util.List;
 import java.util.Map;
 
+import org.hisp.dhis.dataelement.CategoryOptionGroup;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.period.Period;
 import org.hisp.dhis.program.Program;
 
 /**
 * @author Lars Helge Overland
 */
 public interface AnalyticalObject
+extends IdentifiableObject
 {
 void populateAnalyticalProperties();
 
@@ -54,5 +57,15 @@
 
 OrganisationUnit getRelativeOrganisationUnit();
 
+List getPeriods();
+
+List getOrganisationUnits();
+
+List getCategoryOptionGroups();
+
 Program getProgram();
+
+boolean addDataDimensionItem( DimensionalItemObject object );
+
+boolean removeDataDimensionItem( DimensionalItemObject object );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectService.java	2016-01-06 14:25:55 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectService.java	2016-01-06 15:52:21 +
@@ -41,8 +41,10 @@
 /**
  * @author Lars Helge Overland
  */
-public interface AnalyticalObjectService
+public interface AnalyticalObjectService
 {
+void update( T object );
+
 List getAnalyticalObjects( Indicator indicator );
 
 List getAnalyticalObjects( DataElement dataElement );

=== 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	2016-01-06 14:03:52 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectStore.java	2016-01-06 15:52:21 +
@@ -41,7 +41,7 @@
 /**
  * @author Morten Olav Hansen 
  */
-public interface AnalyticalObjectStore
+public interface AnalyticalObjectStore
 extends GenericIdentifiableObjectStore
 {
 List getAnalyticalObjects( Indicator indicator );

=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/GenericAnalyticalObjectDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/GenericAnalyticalObjectDeletionHandler.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/GenericAnalyticalObjectDeletionHandler.java	2016-01-06 15:52:21 +
@@ -0,0 +1,94 @@
+package org.hisp.dhis.common;
+
+/*
+ * Copyright (c) 2004-2016, 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 

Re: [Dhis2-devs] Search person by incidence date range

2016-01-06 Thread Nayeem Al Mifthah
Dear Markus
It will be great if we can search by incidence date in advance search.
On 6 Jan 2016 19:38, "Markus Bekken"  wrote:

> Dear Nayeem,
> at the moment you can do an advanced search based on enrollment date, but
> not incidence date. Would it cover your usecase if the advanced search
> accomodated the incidence date in the same way as enrollment date?
>
> Markus
>
> 6. jan. 2016 kl. 12.02 skrev Nayeem Al Mifthah :
>
> Dear All
>
> I want to search a entities by incidence date range, Is it possible on
> tracker?
>
>
> *Nayeem Al Mifthah*
> Consultant (Team Leader of HMIS)
> Management Information System
> Directorate General of Health Services (DGHS), Bangladesh
> Supported by: UNICEF-Bangladesh
> Email: n.mift...@gmail.com  | nay...@mis.dghs.gov.bd
> Cell:+8801914030574
> Skype: nayeem.a.m
> ___
> 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 21622: Introduced AnalyticalObjectService and GenericAnalyticalObjectService. Centralizes methods for ha...

2016-01-06 Thread noreply

revno: 21622
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 15:25:55 +0100
message:
  Introduced AnalyticalObjectService and GenericAnalyticalObjectService. 
Centralizes methods for handling analytical objects.
added:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/GenericAnalyticalObjectService.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/ChartService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingService.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/eventchart/EventChartDeletionHandler.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/MapViewDeletionHandler.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	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/ChartService.java	2016-01-06 14:25:55 +
@@ -32,10 +32,9 @@
 import java.util.List;
 import java.util.Map;
 
-import org.hisp.dhis.dataelement.CategoryOptionGroup;
+import org.hisp.dhis.common.AnalyticalObjectService;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -48,6 +47,7 @@
  * @author Lars Helge Overland
  */
 public interface ChartService
+extends AnalyticalObjectService
 {
 String ID = ChartService.class.getName();
 
@@ -108,16 +108,4 @@
 int getChartCount();
 
 int getChartCountByName( String name );
-
-int countDataSetCharts( DataSet dataSet );
-
-int countIndicatorCharts( Indicator indicator );
-
-int countDataElementCharts( DataElement dataElement );
-
-int countPeriodCharts( Period period );
-
-int countOrganisationUnitCharts( OrganisationUnit organisationUnit );
-
-int countCategoryOptionGroups( CategoryOptionGroup categoryOptionGroup );
 }

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectService.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObjectService.java	2016-01-06 14:25:55 +
@@ -0,0 +1,73 @@
+package org.hisp.dhis.common;
+
+/*
+ * Copyright (c) 2004-2016, 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, 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21628: smtp+remote put into systemSettings; systemSettings can now be encrypted; encryptionExceptions fr...

2016-01-06 Thread noreply
Merge authors:
  Stian Sandvold (stian-sandvold)

revno: 21628 [merge]
committer: Stian Sandvold 
branch nick: dhis2
timestamp: Wed 2016-01-06 19:20:43 +0100
message:
  smtp+remote put into systemSettings; systemSettings can now be encrypted; 
encryptionExceptions from changing password is now thrown on server, but not 
handled yet. old default password is now default only for systemSettings; Can 
be overwritten by encryption.password;
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/ConfigurationPopulator.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/synch/DefaultSynchronizationManager.java
  
dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/conf/ConfigurationKey.java
  
dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.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/setting/SettingKey.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java	2016-01-06 18:19:09 +
@@ -58,6 +58,7 @@
 EMAIL_USERNAME( "keyEmailUsername" ),
 EMAIL_TLS( "keyEmailTls", Boolean.TRUE, Boolean.class ),
 EMAIL_SENDER( "keyEmailSender" ),
+EMAIL_PASSWORD( "keyEmailPassword", "", String.class, true ),
 INSTANCE_BASE_URL( "keyInstanceBaseUrl" ),
 SCHEDULED_TASKS( "keySchedTasks", ListMap.class ),
 SMS_CONFIG( "keySmsConfig", SmsConfiguration.class ),
@@ -112,7 +113,10 @@
 APP_BASE_URL( "appBaseUrl" ),
 APP_STORE_URL( "appStoreUrl", "https://www.dhis2.org/appstore;, String.class ),
 APP_STORE_INDEX_URL( "appStoreIndexUrl", "https://s3-eu-west-1.amazonaws.com/dhis2-appstore/appstore.json;, String.class ),
-STYLE( "currentStyle", "light_blue/light_blue.css", String.class );
+STYLE( "currentStyle", "light_blue/light_blue.css", String.class ),
+REMOTE_INSTANCE_URL( "keyRemoteInstanceUrl", "", String.class ),
+REMOTE_INSTANCE_USERNAME( "keyRemoteInstanceUsername", "", String.class ),
+REMOTE_INSTANCE_PASSWORD( "keyRemoteInstancePassword", "", String.class, true );
 
 private final String name;
 
@@ -120,6 +124,8 @@
 
 private final Class clazz;
 
+private boolean confidential;
+
 // -
 // Constructors
 // -
@@ -129,6 +135,7 @@
 this.name = name;
 this.defaultValue = null;
 this.clazz = String.class;
+this.confidential = false;
 }
 
 private SettingKey( String name, Class clazz )
@@ -136,13 +143,23 @@
 this.name = name;
 this.defaultValue = null;
 this.clazz = clazz;
+this.confidential = false;
 }
-
+
 private SettingKey( String name, Serializable defaultValue, Class clazz )
 {
 this.name = name;
 this.defaultValue = defaultValue;
 this.clazz = clazz;
+this.confidential = false;
+}
+
+private SettingKey( String name, Serializable defaultValue, Class clazz, boolean confidential )
+{
+this.name = name;
+this.defaultValue = defaultValue;
+this.clazz = clazz;
+this.confidential = confidential;
 }
 
 // -
@@ -207,6 +224,7 @@
 return name;
 }
 
+
 public Serializable getDefaultValue()
 {
 return defaultValue;
@@ -216,4 +234,6 @@
 {
 return clazz;
 }
+
+public boolean getConfidential() { return confidential; }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java	2016-01-04 02:27:49 +

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21629: Revert because of a bug with missing password

2016-01-06 Thread noreply

revno: 21629
committer: Stian Sandvold 
branch nick: dhis2
timestamp: Wed 2016-01-06 19:37:13 +0100
message:
  Revert because of a bug with missing password
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/ConfigurationPopulator.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/synch/DefaultSynchronizationManager.java
  
dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/conf/ConfigurationKey.java
  
dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.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/setting/SettingKey.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java	2016-01-06 18:19:09 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java	2016-01-06 18:37:13 +
@@ -58,7 +58,6 @@
 EMAIL_USERNAME( "keyEmailUsername" ),
 EMAIL_TLS( "keyEmailTls", Boolean.TRUE, Boolean.class ),
 EMAIL_SENDER( "keyEmailSender" ),
-EMAIL_PASSWORD( "keyEmailPassword", "", String.class, true ),
 INSTANCE_BASE_URL( "keyInstanceBaseUrl" ),
 SCHEDULED_TASKS( "keySchedTasks", ListMap.class ),
 SMS_CONFIG( "keySmsConfig", SmsConfiguration.class ),
@@ -113,10 +112,7 @@
 APP_BASE_URL( "appBaseUrl" ),
 APP_STORE_URL( "appStoreUrl", "https://www.dhis2.org/appstore;, String.class ),
 APP_STORE_INDEX_URL( "appStoreIndexUrl", "https://s3-eu-west-1.amazonaws.com/dhis2-appstore/appstore.json;, String.class ),
-STYLE( "currentStyle", "light_blue/light_blue.css", String.class ),
-REMOTE_INSTANCE_URL( "keyRemoteInstanceUrl", "", String.class ),
-REMOTE_INSTANCE_USERNAME( "keyRemoteInstanceUsername", "", String.class ),
-REMOTE_INSTANCE_PASSWORD( "keyRemoteInstancePassword", "", String.class, true );
+STYLE( "currentStyle", "light_blue/light_blue.css", String.class );
 
 private final String name;
 
@@ -124,8 +120,6 @@
 
 private final Class clazz;
 
-private boolean confidential;
-
 // -
 // Constructors
 // -
@@ -135,7 +129,6 @@
 this.name = name;
 this.defaultValue = null;
 this.clazz = String.class;
-this.confidential = false;
 }
 
 private SettingKey( String name, Class clazz )
@@ -143,23 +136,13 @@
 this.name = name;
 this.defaultValue = null;
 this.clazz = clazz;
-this.confidential = false;
 }
-
+
 private SettingKey( String name, Serializable defaultValue, Class clazz )
 {
 this.name = name;
 this.defaultValue = defaultValue;
 this.clazz = clazz;
-this.confidential = false;
-}
-
-private SettingKey( String name, Serializable defaultValue, Class clazz, boolean confidential )
-{
-this.name = name;
-this.defaultValue = defaultValue;
-this.clazz = clazz;
-this.confidential = confidential;
 }
 
 // -
@@ -224,7 +207,6 @@
 return name;
 }
 
-
 public Serializable getDefaultValue()
 {
 return defaultValue;
@@ -234,6 +216,4 @@
 {
 return clazz;
 }
-
-public boolean getConfidential() { return confidential; }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java	2016-01-06 18:19:09 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java	2016-01-06 18:37:13 +
@@ -44,8 +44,6 @@
 
 private Serializable value;
 
-private boolean confidential;
-
 // -
 // 

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

2016-01-06 Thread noreply

revno: 21630
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 19:40:21 +0100
message:
  Minor
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/GenericAnalyticalObjectDeletionHandler.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/hibernate/HibernateAnalyticalObjectStore.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-core/src/main/java/org/hisp/dhis/common/GenericAnalyticalObjectDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/GenericAnalyticalObjectDeletionHandler.java	2016-01-06 15:52:21 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/GenericAnalyticalObjectDeletionHandler.java	2016-01-06 18:40:21 +
@@ -88,6 +88,7 @@
 for ( T analyticalObject : analyticalObjects )
 {
 updateOperation.accept( analyticalObject, itemObject );
+
 getAnalyticalObjectService().update( analyticalObject );
 }
 }

=== 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	2016-01-06 14:03:52 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/hibernate/HibernateAnalyticalObjectStore.java	2016-01-06 18:40:21 +
@@ -69,7 +69,7 @@
 @SuppressWarnings("unchecked")
 public List getAnalyticalObjects( DataSet dataSet )
 {
-String hql = "select distinct c from " + clazz.getName() + " c join c.dataDimensionItems d where d.dataElement = :dataElement";
+String hql = "select distinct c from " + clazz.getName() + " c join c.dataDimensionItems d where d.dataSet = :dataSet";
 return getQuery( hql ).setEntity( "dataSet", dataSet ).list(); 
 }
 
@@ -77,7 +77,7 @@
 @SuppressWarnings("unchecked")
 public List getAnalyticalObjects( ProgramIndicator programIndicator )
 {
-String hql = "select distinct c from " + clazz.getName() + " c join c.dataDimensionItems d where d.dataElement = :dataElement";
+String hql = "select distinct c from " + clazz.getName() + " c join c.dataDimensionItems d where d.programIndicator = :programIndicator";
 return getQuery( hql ).setEntity( "programIndicator", programIndicator ).list(); 
 }
 

___
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 21631: Minor

2016-01-06 Thread noreply

revno: 21631
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 20:08:10 +0100
message:
  Minor
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/EventChartDeletionHandler.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/EventReportDeletionHandler.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-core/src/main/java/org/hisp/dhis/eventchart/EventChartDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/EventChartDeletionHandler.java	2016-01-06 16:48:58 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/EventChartDeletionHandler.java	2016-01-06 19:08:10 +
@@ -32,6 +32,9 @@
 
 import org.hisp.dhis.common.AnalyticalObjectService;
 import org.hisp.dhis.common.GenericAnalyticalObjectDeletionHandler;
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramStage;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -66,6 +69,24 @@
 }
 
 @Override
+public void deleteIndicator( Indicator indicator )
+{
+//TODO
+}
+
+@Override
+public void deleteDataElement( DataElement dataElement )
+{
+//TODO
+}
+
+@Override
+public void deleteDataSet( DataSet dataSet )
+{
+//TODO
+}
+
+@Override
 public void deleteProgramStage( ProgramStage programStage )
 {
 Collection charts = eventChartService.getAllEventCharts();

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/EventReportDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/EventReportDeletionHandler.java	2016-01-06 16:48:58 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/EventReportDeletionHandler.java	2016-01-06 19:08:10 +
@@ -32,6 +32,9 @@
 
 import org.hisp.dhis.common.AnalyticalObjectService;
 import org.hisp.dhis.common.GenericAnalyticalObjectDeletionHandler;
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramStage;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -64,8 +67,26 @@
 {
 return eventReportService;
 }
+
+@Override
+public void deleteIndicator( Indicator indicator )
+{
+//TODO
+}
 
 @Override
+public void deleteDataElement( DataElement dataElement )
+{
+//TODO
+}
+
+@Override
+public void deleteDataSet( DataSet dataSet )
+{
+//TODO
+}
+
+@Override
 public void deleteProgramStage( ProgramStage programStage )
 {
 Collection charts = eventReportService.getAllEventReports();

___
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 21632: Added default password back to encryption.password; Fixed some nullpointer bugs in DefaultSystemS...

2016-01-06 Thread noreply

revno: 21632
committer: Stian Sandvold 
branch nick: dhis2
timestamp: Wed 2016-01-06 20:24:34 +0100
message:
  Added default password back to encryption.password; Fixed some nullpointer 
bugs in DefaultSystemSettings
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/ConfigurationPopulator.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/synch/DefaultSynchronizationManager.java
  
dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/conf/ConfigurationKey.java
  
dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.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/setting/SettingKey.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java	2016-01-06 18:37:13 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java	2016-01-06 19:24:34 +
@@ -58,6 +58,7 @@
 EMAIL_USERNAME( "keyEmailUsername" ),
 EMAIL_TLS( "keyEmailTls", Boolean.TRUE, Boolean.class ),
 EMAIL_SENDER( "keyEmailSender" ),
+EMAIL_PASSWORD( "keyEmailPassword", "", String.class, true ),
 INSTANCE_BASE_URL( "keyInstanceBaseUrl" ),
 SCHEDULED_TASKS( "keySchedTasks", ListMap.class ),
 SMS_CONFIG( "keySmsConfig", SmsConfiguration.class ),
@@ -112,7 +113,10 @@
 APP_BASE_URL( "appBaseUrl" ),
 APP_STORE_URL( "appStoreUrl", "https://www.dhis2.org/appstore;, String.class ),
 APP_STORE_INDEX_URL( "appStoreIndexUrl", "https://s3-eu-west-1.amazonaws.com/dhis2-appstore/appstore.json;, String.class ),
-STYLE( "currentStyle", "light_blue/light_blue.css", String.class );
+STYLE( "currentStyle", "light_blue/light_blue.css", String.class ),
+REMOTE_INSTANCE_URL( "keyRemoteInstanceUrl", "", String.class ),
+REMOTE_INSTANCE_USERNAME( "keyRemoteInstanceUsername", "", String.class ),
+REMOTE_INSTANCE_PASSWORD( "keyRemoteInstancePassword", "", String.class, true );
 
 private final String name;
 
@@ -120,6 +124,8 @@
 
 private final Class clazz;
 
+private boolean confidential;
+
 // -
 // Constructors
 // -
@@ -129,6 +135,7 @@
 this.name = name;
 this.defaultValue = null;
 this.clazz = String.class;
+this.confidential = false;
 }
 
 private SettingKey( String name, Class clazz )
@@ -136,13 +143,23 @@
 this.name = name;
 this.defaultValue = null;
 this.clazz = clazz;
+this.confidential = false;
 }
-
+
 private SettingKey( String name, Serializable defaultValue, Class clazz )
 {
 this.name = name;
 this.defaultValue = defaultValue;
 this.clazz = clazz;
+this.confidential = false;
+}
+
+private SettingKey( String name, Serializable defaultValue, Class clazz, boolean confidential )
+{
+this.name = name;
+this.defaultValue = defaultValue;
+this.clazz = clazz;
+this.confidential = confidential;
 }
 
 // -
@@ -207,6 +224,7 @@
 return name;
 }
 
+
 public Serializable getDefaultValue()
 {
 return defaultValue;
@@ -216,4 +234,6 @@
 {
 return clazz;
 }
+
+public boolean getConfidential() { return confidential; }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java	2016-01-06 18:37:13 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java	2016-01-06 19:24:34 +
@@ -44,6 +44,8 @@
 
 private Serializable value;
 
+private boolean confidential;
+
 // 

Re: [Dhis2-devs] [Dhis2-users] Favourites with Multiple Analysis Org Units

2016-01-06 Thread Pamod Amarakoon
Hi Jan,

in the demo instance I created following users

test1 (role:data entry operator, group : test, Org Unit : Bo)
test2 (role:data entry operator, group : test, Org Unit : Bo, Bombali)

I also created 2 favourite items with org unit selected as user org unit.
Created a dashboard ANC_test and assigned it to the particular group of
which test 1 and test 2 belongs to.

What I expected to see is each user being presented reports only related to
the org units they are assigned (in this case information related to org
unit Bo). But following is the dashboard of the user test1, which contain
analytics of whole country

​
Am I missing something or is there any other way to get this done.

Thank a lot.



On Wed, Jan 6, 2016 at 10:29 PM, Pamod Amarakoon  wrote:

> Hi Ola,
>
> Will check that out. Thanx for the tip
>
> On Wed, Jan 6, 2016 at 1:22 PM, Ola Hodne Titlestad 
> wrote:
>
>> Pamod,
>>
>> One relatively new Dashboard feature that might interest you is the
>> ability to switch 'user orgunit' for all items in a dashboard using the
>> gear icon next to the Search field. This will basically replace the 'user
>> orgunit' parameter value with whatever orgunit you select in the orgunit
>> selection tree.
>>
>> Ola
>> --
>> On 5 Jan 2016 16:47, "Jan Henrik Øverland" 
>> wrote:
>>
>>> Hi Pamod,
>>>
>>> Having multiple user org units should work well. Please note that "user
>>> org unit" (it should say "units" instead of "unit", I will fix that) refers
>>> to "Data capture and maintenance organisation units" in the user
>>> maintenance ui. The other one, "Data output and analysis organisation
>>> units", only controls the user's access in the org unit tree.
>>>
>>> Jan
>>>
>>> On Mon, Dec 28, 2015 at 12:30 PM, Pamod Amarakoon 
>>> wrote:
>>>
 Dear All,

 Is it possible to create favorites (pivot table, event visualizer) for
 users who are assigned to multiple data analysis org units, when the option
 "User org unit" is selected at pivot table/event visualizer.

 I tried this on demo server by assigning the user "test1" to both Bo
 and Bombali and it seems to analyze only the first org unit "Bo".


 ​

 What's the proper method to follow to get analysis results for users
 who are assigned for multiple analysis org units.

 Thank you

 --
 Regards,
 Pamod Amarakoon

 Confidentiality Notice: the information contained in this email and any
 attachments may be legally privileged and confidential. If you are not an
 intended recipient, you are hereby notified that any dissemination,
 distribution, or copying of this e-mail is strictly prohibited. If you have
 received this e-mail in error, please notify the sender and permanently
 delete the e-mail and any attachments immediately. You should not retain,
 copy or use this e-mail or any attachments for any purpose, nor disclose
 all or any part of the contents to any other person.




 ___
 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
>>>
>>>
>
>
> --
> Regards,
> Pamod Amarakoon
>
> Confidentiality Notice: the information contained in this email and any
> attachments may be legally privileged and confidential. If you are not an
> intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not retain,
> copy or use this e-mail or any attachments for any purpose, nor disclose
> all or any part of the contents to any other person.
>
>
>
>


-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : 

Re: [Dhis2-devs] [Dhis2-users] Favourites with Multiple Analysis Org Units

2016-01-06 Thread Pamod Amarakoon
Hi Ola,

Will check that out. Thanx for the tip

On Wed, Jan 6, 2016 at 1:22 PM, Ola Hodne Titlestad 
wrote:

> Pamod,
>
> One relatively new Dashboard feature that might interest you is the
> ability to switch 'user orgunit' for all items in a dashboard using the
> gear icon next to the Search field. This will basically replace the 'user
> orgunit' parameter value with whatever orgunit you select in the orgunit
> selection tree.
>
> Ola
> --
> On 5 Jan 2016 16:47, "Jan Henrik Øverland" 
> wrote:
>
>> Hi Pamod,
>>
>> Having multiple user org units should work well. Please note that "user
>> org unit" (it should say "units" instead of "unit", I will fix that) refers
>> to "Data capture and maintenance organisation units" in the user
>> maintenance ui. The other one, "Data output and analysis organisation
>> units", only controls the user's access in the org unit tree.
>>
>> Jan
>>
>> On Mon, Dec 28, 2015 at 12:30 PM, Pamod Amarakoon 
>> wrote:
>>
>>> Dear All,
>>>
>>> Is it possible to create favorites (pivot table, event visualizer) for
>>> users who are assigned to multiple data analysis org units, when the option
>>> "User org unit" is selected at pivot table/event visualizer.
>>>
>>> I tried this on demo server by assigning the user "test1" to both Bo and
>>> Bombali and it seems to analyze only the first org unit "Bo".
>>>
>>>
>>> ​
>>>
>>> What's the proper method to follow to get analysis results for users who
>>> are assigned for multiple analysis org units.
>>>
>>> Thank you
>>>
>>> --
>>> Regards,
>>> Pamod Amarakoon
>>>
>>> Confidentiality Notice: the information contained in this email and any
>>> attachments may be legally privileged and confidential. If you are not an
>>> intended recipient, you are hereby notified that any dissemination,
>>> distribution, or copying of this e-mail is strictly prohibited. If you have
>>> received this e-mail in error, please notify the sender and permanently
>>> delete the e-mail and any attachments immediately. You should not retain,
>>> copy or use this e-mail or any attachments for any purpose, nor disclose
>>> all or any part of the contents to any other person.
>>>
>>>
>>>
>>>
>>> ___
>>> 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
>>
>>


-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.
___
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 21627: System setting controller, POST, removed key param

2016-01-06 Thread noreply

revno: 21627
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 18:08:06 +0100
message:
  System setting controller, POST, removed key param
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.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/SystemSettingController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java	2016-01-06 17:08:06 +
@@ -77,12 +77,11 @@
 @PreAuthorize( "hasRole('ALL') or hasRole('F_SYSTEM_SETTING')" )
 public void setSystemSetting(
 @PathVariable( value = "key" ) String key,
-@RequestParam( required = false, value = "key" ) String keyParam,
-@RequestParam( required = false ) String value,
+@RequestParam( value = "value", required = false ) String value,
 @RequestBody( required = false ) String valuePayload,
 HttpServletResponse response, HttpServletRequest request ) throws WebMessageException
 {
-if ( key == null && keyParam == null )
+if ( key == null )
 {
 throw new WebMessageException( WebMessageUtils.conflict( "Key must be specified" ) );
 }
@@ -92,8 +91,6 @@
 throw new WebMessageException( WebMessageUtils.conflict( "Value must be specified as query param or as payload" ) );
 }
 
-key = ObjectUtils.firstNonNull( key, keyParam );
-
 value = ObjectUtils.firstNonNull( value, valuePayload );
 
 Serializable valueObject = SettingKey.getAsRealClass( key, value );

___
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 21626: User replication. Including user settings.

2016-01-06 Thread noreply

revno: 21626
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-01-06 17:48:58 +0100
message:
  User replication. Including user settings.
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/EventChartDeletionHandler.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/EventReportDeletionHandler.java
  
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-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/EventChartDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/EventChartDeletionHandler.java	2016-01-06 14:25:55 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventchart/EventChartDeletionHandler.java	2016-01-06 16:48:58 +
@@ -30,16 +30,17 @@
 
 import java.util.Collection;
 
+import org.hisp.dhis.common.AnalyticalObjectService;
+import org.hisp.dhis.common.GenericAnalyticalObjectDeletionHandler;
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramStage;
-import org.hisp.dhis.system.deletion.DeletionHandler;
 import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Chau Thu Tran
  */
 public class EventChartDeletionHandler
-extends DeletionHandler
+extends GenericAnalyticalObjectDeletionHandler
 {
 // -
 // Dependencies
@@ -53,6 +54,12 @@
 // -
 
 @Override
+protected AnalyticalObjectService getAnalyticalObjectService()
+{
+return eventChartService;
+}
+
+@Override
 protected String getClassName()
 {
 return EventChart.class.getSimpleName();

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/EventReportDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/EventReportDeletionHandler.java	2016-01-06 14:37:53 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/eventreport/EventReportDeletionHandler.java	2016-01-06 16:48:58 +
@@ -30,16 +30,17 @@
 
 import java.util.Collection;
 
+import org.hisp.dhis.common.AnalyticalObjectService;
+import org.hisp.dhis.common.GenericAnalyticalObjectDeletionHandler;
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramStage;
-import org.hisp.dhis.system.deletion.DeletionHandler;
 import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Chau Thu Tran
  */
 public class EventReportDeletionHandler
-extends DeletionHandler
+extends GenericAnalyticalObjectDeletionHandler
 {
 // -
 // Dependencies
@@ -59,6 +60,12 @@
 }
 
 @Override
+protected AnalyticalObjectService getAnalyticalObjectService()
+{
+return eventReportService;
+}
+
+@Override
 public void deleteProgramStage( ProgramStage programStage )
 {
 Collection charts = eventReportService.getAllEventReports();

=== 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	2016-01-04 02:27:49 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2016-01-06 16:48:58 +
@@ -28,7 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
 import org.apache.commons.lang3.StringUtils;
 import org.hisp.dhis.common.CodeGenerator;
@@ -55,6 +54,9 @@
 import org.hisp.dhis.user.UserInvitationStatus;
 import org.hisp.dhis.user.UserQueryParams;
 import org.hisp.dhis.user.UserService;
+import org.hisp.dhis.user.UserSetting;
+import org.hisp.dhis.user.UserSettingKey;
+import org.hisp.dhis.user.UserSettingService;
 import org.hisp.dhis.user.Users;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
 import org.hisp.dhis.webapi.utils.ContextUtils;
@@ -74,6 +76,7 @@
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 
 /**
  * @author Morten Olav Hansen 
@@ -100,6 +103,9 @@
 
 @Autowired
 private OrganisationUnitService organisationUnitService;
+
+@Autowired
+private 

Re: [Dhis2-devs] Search person by incidence date range

2016-01-06 Thread Nayeem Al Mifthah
Dear Abyot
Is it possible to make it dynamic. So we can get the incidence date in
advance search for the program(s) which have incidence date?
On 6 Jan 2016 21:10, "Abyot Gizaw"  wrote:

> That is a proper solution, but then we have to make sure a selected
> program has incident date.
>
> The reason we skipped this was because all programs do not have incident
> date like enrollment.
>
> ---
>
> Thank you,
> Abyot.
> (sent from mobile)
> On Jan 6, 2016 17:53, "Nayeem Al Mifthah"  wrote:
>
>> Dear Markus
>> It will be great if we can search by incidence date in advance search.
>> On 6 Jan 2016 19:38, "Markus Bekken"  wrote:
>>
>>> Dear Nayeem,
>>> at the moment you can do an advanced search based on enrollment date,
>>> but not incidence date. Would it cover your usecase if the advanced search
>>> accomodated the incidence date in the same way as enrollment date?
>>>
>>> Markus
>>>
>>> 6. jan. 2016 kl. 12.02 skrev Nayeem Al Mifthah :
>>>
>>> Dear All
>>>
>>> I want to search a entities by incidence date range, Is it possible on
>>> tracker?
>>>
>>>
>>> *Nayeem Al Mifthah*
>>> Consultant (Team Leader of HMIS)
>>> Management Information System
>>> Directorate General of Health Services (DGHS), Bangladesh
>>> Supported by: UNICEF-Bangladesh
>>> Email: n.mift...@gmail.com  | nay...@mis.dghs.gov.bd
>>> Cell:+8801914030574
>>> Skype: nayeem.a.m
>>> ___
>>> 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] [Dhis2-users] SMS Routing and GSM Operator

2016-01-06 Thread Long Ngo Thanh
Hi Guy,

You don't need the shortcode=8080 in URL. It can be like this, for example:

smsinput.action?sender=84935084665_time=2012-04-30+09%3A00=hello+dhis

In addition, DHIS2 will not accept any request without authorization so you
need to config a nginx proxy or other method to authorise the request from
your sms provider using Basic Authentication

Long

On Wed, Jan 6, 2016 at 8:54 PM Guy Ekani  wrote:

> Yes Raja, i dont see anything on View Received SMS page.
>
> =
> EKANI Guy
>
>
>
>
>
>
>
> Le Mercredi 6 janvier 2016 11h34, Raja Zubair 
> a écrit :
>
>
> Hi Guy,
>
> You don't see any thing on View Received SMS page ? Even if sms is not
> processable still it will saved (with UN-HANDLED status) as soon as it
> reaches this API end point . If you don't see any thing there, then this
> API endpoint is not reachable from sms gateway.
>
>
> Regards
> Zubair
>
> On Wed, Jan 6, 2016 at 10:55 AM, Guy Ekani  wrote:
>
> Happy new year 2016 to the community,
>
> Please I would like to know how can i make the link between the SMS that
> an user sent to the short code that  our gsm operator gave us and DHIS
>
> I'm able to send sms to user via Dhis SMS-apps, but when user sent SMS to
> report data i didn't see it.
>
> Is the link that i have to give my Gsm operator has this format ?
>
> https://www.dhiswebsite.org/sms/smsinput.action?message=MESSAGE=123456789=8080
>
> Any help or suggestion will be appreciated
>
>
> Gateway type = Generic HTTP gateway
> Hosting = Baosystems
> DHIS = 2.21- version:20853
>
>
>
> =
> 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
>
>
>
>
> ___
> 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