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

2016-01-07 Thread Pamod Amarakoon
Thank you Jan

On Thu, Jan 7, 2016 at 2:55 PM, Jan Henrik Øverland <
janhenrik.overl...@gmail.com> wrote:

> You probably do it right. I know there is a vulnerability in how the
> server handles this at the moment. We will try to fix this asap.
>
> On Wed, Jan 6, 2016 at 6:05 PM, Pamod Amarakoon  wrote:
>
>> 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" <
 janhenrik.overl...@gmail.com> 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

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21639: Unused imports

2016-01-07 Thread noreply

revno: 21639
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2016-01-07 11:07:11 +0100
message:
  Unused imports
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.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-07 09:08:16 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java	2016-01-07 10:07:11 +
@@ -32,14 +32,10 @@
 import com.google.common.cache.CacheBuilder;
 import com.google.common.collect.Lists;
 import org.apache.commons.lang3.StringUtils;
-import org.hisp.dhis.external.conf.ConfigurationKey;
-import org.hisp.dhis.external.conf.DhisConfigurationProvider;
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.i18n.I18nManager;
 import org.hisp.dhis.system.util.ValidationUtils;
 import org.jasypt.encryption.pbe.PBEStringEncryptor;
-import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
-import org.jasypt.salt.StringFixedSaltGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 

___
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] Meta data export import

2016-01-07 Thread Hannan Khan
Dear DHIS2 Expert

I am trying to export selected metadata item e.g. Chart, Event Chart, Map,
Map View etc from one server and want to import in another server with same
data. Don't get anything in the UI, but log showing error

Can you please advise how can solve this problem and /or how to chart, map,
pivot tables from one system to another?

Regards

Hannan Khan
HISP Bangladesh
___
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] Meta data export import

2016-01-07 Thread Hannan Khan
sorry don't attach the log. Here it is.

* INFO  2016-01-07 15:55:04,923 User 'admin' started import at Thu Jan 07
15:55:04 BDT 2016 (DefaultImportService.java [taskScheduler-10])
* INFO  2016-01-07 15:55:04,924 [Level: INFO, category: METADATA_IMPORT,
time: Thu Jan 07 15:55:04 BDT 2016, message: Importing meta-data]
(InMemoryNotifier.java [taskScheduler-10])
* INFO  2016-01-07 15:55:04,924 Building object-bridge maps (preheatCache:
true). (DefaultObjectBridge.java [taskScheduler-10])
* ERROR 2016-01-07 15:55:28,801 Unexpected error occurred in scheduled
task. (TaskUtils.java [taskScheduler-10])
org.hibernate.HibernateException: More than one row with the given
identifier was found: 1153390, for class:
org.hisp.dhis.organisationunit.OrganisationUnitGroup
at
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:104)



On Thu, Jan 7, 2016 at 4:01 PM, Hannan Khan  wrote:

> Dear DHIS2 Expert
>
> I am trying to export selected metadata item e.g. Chart, Event Chart, Map,
> Map View etc from one server and want to import in another server with same
> data. Don't get anything in the UI, but log showing error
>
> Can you please advise how can solve this problem and /or how to chart,
> map, pivot tables from one system to another?
>
> Regards
>
> Hannan Khan
> HISP Bangladesh
>
___
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] Facing issue on posting custom CSS and JS for event capture print form

2016-01-07 Thread Kaustav Chakraborty
Hello,

I was trying to modify my local DHIS 2 using custom CSS using API call for
print forms. But it is not reflecting on the Event Capture.


CSS code snippet:

[image: Inline image 1]


I have tried with different code on Data Entry, and it works. I have three
questions regarding this problem,

1. Have I done something wrong?
2. The layout is designed with Angular JS. Is there any impact regarding
the API call?
3. Is there any different API call I have to make for Event Capture?

It would be very helpful if someone help me out.

*I am using DHIS 2.21.*




Thanks and Regards,

Kaustav Chakraborty
___
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] Favourites with Multiple Analysis Org Units

2016-01-07 Thread Jan Henrik Øverland
You probably do it right. I know there is a vulnerability in how the server
handles this at the moment. We will try to fix this asap.

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

> 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 

Re: [Dhis2-devs] define weekly

2016-01-07 Thread Jason Pickering
Hi Marta and Papa,
We identified the bug (we think) and Morten has updated the code with a
fix, and backported it back to version 2.17. New builds are available here
http://ci.dhis2.org/ .

I have tested this on one instance, and it seems to work OK now. Let us
know if it works for you.

Best regards,
Jason


On Tue, Jan 5, 2016 at 5:14 PM, Marta Vila  wrote:

> Hi Jason,
>
> we just started receiving emails from users reporting the same problem.
> Will follow the evolution.
>
> Cheers
>
>
> On 4 January 2016 at 18:05, papa alioune Sokhna 
> wrote:
>
>> Hi Jason,
>> If that information can be useful I noticed that the dhis our Ministry of
>> Health does not have this problem and they have version 2.15.
>>
>> 2016-01-04 16:16 GMT+00:00 Jason Pickering :
>>
>>> Hi Papa,
>>>
>>> I am able to reproduce this. It is clearly a bug.
>>>
>>> I think you should used 2015W53 for this period, but there could be a
>>> major problem if the weeks for 2016 are off.
>>>
>>> Jan/Lars, could you comment?
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>>
>>> On Mon, Jan 4, 2016 at 4:55 PM, papa alioune Sokhna <
>>> sokhnap...@gmail.com> wrote:
>>>
 I noticed in the function given before he repeated in the W53 2015 with
 W1 2016. When you try to enter data we have the following error:
 One or more data sets for data element does not allow future periods:
 O6ZD3CjKywK .
 In attached the screenshots.

 2016-01-04 15:31 GMT+00:00 Jason Pickering :

> Hi Papa,
> Could you be more specific?
>
> December 28th - Jan 3rd should be 2015W53. Usually years have 52
> weeks, but this happens from time to time, due to how ISO weeks are
> defined.
>
> Are you seeing this in the analysis modules for last 52 weeks?
>
> Regards,
> Jason
>
>
> On Mon, Jan 4, 2016 at 4:18 PM, papa alioune Sokhna <
> sokhnap...@gmail.com> wrote:
>
>> Hello team
>> how to define the numbers of weeks on dhis2 because the marking is
>> not correct it there's a repitition of the week of December 28, 2015 to
>> January 4, 2016.
>> Best regards.
>>
>> --
>> Papa Alioune SOKHNA
>> *Informaticien *
>> Spécialité: développement d'application web, mobile et logiciels surs
>> Tel: +221 77 442 16 22
>>
>> ___
>> 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
>>
>>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
>



 --
 Papa Alioune SOKHNA
 *Informaticien *
 Spécialité: développement d'application web, mobile et logiciels surs
 Tel: +221 77 442 16 22

>>>
>>>
>>>
>>> --
>>> Jason P. Pickering
>>> email: jason.p.picker...@gmail.com
>>> tel:+46764147049
>>>
>>
>>
>>
>> --
>> Papa Alioune SOKHNA
>> *Informaticien *
>> Spécialité: développement d'application web, mobile et logiciels surs
>> Tel: +221 77 442 16 22
>>
>> ___
>> 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
>>
>>
>


-- 
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+46764147049
___
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 21655: Minor fix

2016-01-07 Thread noreply

revno: 21655
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Fri 2016-01-08 10:08:28 +0700
message:
  Minor fix
modified:
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js	2016-01-07 11:18:47 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js	2016-01-08 03:08:28 +
@@ -541,8 +541,6 @@
 var periods = [];
 
 var startDate = this.calendar.newDate(year, 1, 1);
-// startDate.add(-(startDate.dayOfWeek() - 1), 'd'); // rewind to start of week, might cross year boundary
-
 var day = startDate.dayOfWeek();
 
 if( day == 0 ) // Sunday (0), forward to Monday

___
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] How to build a form with tracker

2016-01-07 Thread channara rin
Dear All
Has anyone tell me how should i design tracker form(individual
records/tracker capture) to capture data daily that can answer this
questions below?

Every month,quarterly, and six months, manager need data elements report
from DHIS2 to answer on:

1.How many people(individual case) get ART in this month?
3.How many people(individual case) get ART regular every months(From
January to June)?

*NOTE:* usually, individual can get ART only once per month.

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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21656: fix to property handle unwrapping of Hibernate PersistentSet and HibernateProxy

2016-01-07 Thread noreply

revno: 21656
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Fri 2016-01-08 11:00:42 +0700
message:
  fix to property handle unwrapping of Hibernate PersistentSet and 
HibernateProxy
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java	2016-01-06 07:05:53 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java	2016-01-08 04:00:42 +
@@ -32,6 +32,11 @@
 import org.hibernate.collection.internal.PersistentSet;
 import org.hibernate.collection.spi.PersistentCollection;
 import org.hibernate.proxy.HibernateProxy;
+import org.hibernate.proxy.pojo.javassist.SerializableProxy;
+
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.Map;
 
 /**
  * @author Morten Olav Hansen 
@@ -64,6 +69,16 @@
 return (T) ((HibernateProxy) proxy).getHibernateLazyInitializer().getImplementation();
 }
 
+if ( HibernateProxy.class.isInstance( proxy ) )
+{
+Object result = ((HibernateProxy) proxy).writeReplace();
+
+if ( !SerializableProxy.class.isInstance( result ) )
+{
+return (T) result;
+}
+}
+
 if ( PersistentCollection.class.isInstance( proxy ) )
 {
 PersistentCollection persistentCollection = (PersistentCollection) proxy;
@@ -72,6 +87,11 @@
 {
 return (T) persistentCollection.getStoredSnapshot();
 }
+else if ( PersistentSet.class.isInstance( persistentCollection ) )
+{
+Map map = (Map) persistentCollection.getStoredSnapshot();
+return (T) new LinkedHashSet<>( map.keySet() );
+}
 
 // for now just return same as for non-sets, but PersistentSets might require a bit of extra work.
 return (T) persistentCollection.getStoredSnapshot();

___
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 21657: minor

2016-01-07 Thread noreply

revno: 21657
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Fri 2016-01-08 11:02:49 +0700
message:
  minor
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java	2016-01-08 04:00:42 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java	2016-01-08 04:02:49 +
@@ -34,7 +34,6 @@
 import org.hibernate.proxy.HibernateProxy;
 import org.hibernate.proxy.pojo.javassist.SerializableProxy;
 
-import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.Map;
 
@@ -83,17 +82,12 @@
 {
 PersistentCollection persistentCollection = (PersistentCollection) proxy;
 
-if ( !PersistentSet.class.isInstance( persistentCollection ) )
-{
-return (T) persistentCollection.getStoredSnapshot();
-}
-else if ( PersistentSet.class.isInstance( persistentCollection ) )
+if ( PersistentSet.class.isInstance( persistentCollection ) )
 {
 Map map = (Map) persistentCollection.getStoredSnapshot();
 return (T) new LinkedHashSet<>( map.keySet() );
 }
 
-// for now just return same as for non-sets, but PersistentSets might require a bit of extra work.
 return (T) persistentCollection.getStoredSnapshot();
 }
 

___
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 OAuth Grant type authorized_code

2016-01-07 Thread Ngoc Thanh Nguyen
Wow, LDAP is great.

I think this is a revolution which brings DHIS2 to a truly integration
platform.

Will try that

Thanh

On Fri, Jan 8, 2016 at 1:10 PM, Morten Olav Hansen 
wrote:

> No, that is not possible. The only way to externally authenticate a DHIS 2
> instance is either using openid or using LDAP (now supported in 2.22).
>
> --
> Morten
>
> On Fri, Jan 8, 2016 at 1:08 PM, Ngoc Thanh Nguyen <
> thanh.hispviet...@gmail.com> wrote:
>
>> Hi
>>
>> What I mean was if I have 3 dhis2 instances running on 3 server namely A,
>> B, C. All user accounts (and passwords) are stored in C.
>>
>> When I access A or B, it will redirect to C for sign in. After signing in
>> successfully, I can use A or B.
>>
>> Is that possible?
>>
>> Thanh
>>
>>
>> On Fri, Jan 8, 2016 at 12:58 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Hi Thanh
>>>
>>> I'm not really sure what you want. DHIS 2 can only act as a
>>> authentication provider, it does not support authentication against another
>>> oauth2 provider.
>>>
>>> The main reason for adding oauth2 was to support third party clients
>>> connecting with it without having to collect username/passwords in their
>>> own local databases.
>>>
>>> --
>>> Morten
>>>
>>> On Tue, Dec 15, 2015 at 3:34 PM, Ngoc Thanh Nguyen <
>>> thanh.hispviet...@gmail.com> wrote:
>>>
 HI all

 Is there a way in DHIS2 that allows defining a callback for OAuth? If
 this possible, we can have multiple dhis2 instances that share a single
 user base. This will work like OAuth in Google+ or Facebook.

 Thanh

>>>
>>>
>>
>
___
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] Tracker Capture reactivate completed enrollment

2016-01-07 Thread Pamod Amarakoon
Thanx Morten.

It would be great if it's possible re-enroll. I'd wait for Abyot.

On Fri, Jan 8, 2016 at 11:16 AM, Morten Olav Hansen 
wrote:

> Hi Pamod
>
> Yes, this is the current standing of how enrollments work. There have been
> some discussions internally about this, maybe Abyot can explain what the
> ending result was.
>
> --
> Morten
>
> On Sat, Jan 2, 2016 at 10:59 PM, Pamod Amarakoon  wrote:
>
>> Dear All,
>>
>> I'd like to wish you all a happy and prosperous new year !
>>
>> I noticed an issue, which I need to clarify. Is it not possible to edit
>> records or to make an enrollment active again once it has been completed.
>>
>>
>> ​
>> As shown in the screenshot, the enrollment grays out once it has been
>> completed. I cannot find an option to make the enrollment active again or
>> to edit the data of any events attached to any of the stages of the
>> particular enrollment.
>>
>> Version:
>> 2.21
>> Build revision:
>> 20983
>> Build date:
>> 2015-12-30 14:31
>>
>> But when I manually changed the relevant field in programinstance table
>> it goes active again.
>>
>> 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-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


Re: [Dhis2-devs] DHIS2 OAuth Grant type authorized_code

2016-01-07 Thread Morten Olav Hansen
Yes, you can find the documentation here:
http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s05.html

--
Morten

On Fri, Jan 8, 2016 at 1:19 PM, Ngoc Thanh Nguyen <
thanh.hispviet...@gmail.com> wrote:

> Wow, LDAP is great.
>
> I think this is a revolution which brings DHIS2 to a truly integration
> platform.
>
> Will try that
>
> Thanh
>
> On Fri, Jan 8, 2016 at 1:10 PM, Morten Olav Hansen 
> wrote:
>
>> No, that is not possible. The only way to externally authenticate a DHIS
>> 2 instance is either using openid or using LDAP (now supported in 2.22).
>>
>> --
>> Morten
>>
>> On Fri, Jan 8, 2016 at 1:08 PM, Ngoc Thanh Nguyen <
>> thanh.hispviet...@gmail.com> wrote:
>>
>>> Hi
>>>
>>> What I mean was if I have 3 dhis2 instances running on 3 server namely
>>> A, B, C. All user accounts (and passwords) are stored in C.
>>>
>>> When I access A or B, it will redirect to C for sign in. After signing
>>> in successfully, I can use A or B.
>>>
>>> Is that possible?
>>>
>>> Thanh
>>>
>>>
>>> On Fri, Jan 8, 2016 at 12:58 PM, Morten Olav Hansen 
>>> wrote:
>>>
 Hi Thanh

 I'm not really sure what you want. DHIS 2 can only act as a
 authentication provider, it does not support authentication against another
 oauth2 provider.

 The main reason for adding oauth2 was to support third party clients
 connecting with it without having to collect username/passwords in their
 own local databases.

 --
 Morten

 On Tue, Dec 15, 2015 at 3:34 PM, Ngoc Thanh Nguyen <
 thanh.hispviet...@gmail.com> wrote:

> HI all
>
> Is there a way in DHIS2 that allows defining a callback for OAuth? If
> this possible, we can have multiple dhis2 instances that share a single
> user base. This will work like OAuth in Google+ or Facebook.
>
> Thanh
>


>>>
>>
>
___
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] Tracker Capture reactivate completed enrollment

2016-01-07 Thread Pamod Amarakoon
Thanx Abyot,

In fact what I'm expecting is something similar to "limited mode" for a
manager to edit event data of already completed enrollments.

On Fri, Jan 8, 2016 at 11:58 AM, Abyot Gizaw  wrote:

> Hi,
>
> Re-opening completed enrollments is coming in 2.22. The re-opening will
> allow full operations on enrollment - meaning adding / editing / removing
> events ... The only catch here is, it is not possible to re-open enrollment
> if there is another active enrollment going on.
>
> We are also hoping to allow re-opening enrollment in limited mode -
> meaning only to edit event data not add / remove event - when another
> active enrollment exists. But  I am afraid this won't make it for 2.22.
>
> ---
> Thank you,
> Abyot.
>
> On Fri, Jan 8, 2016 at 7:01 AM, Pamod Amarakoon  wrote:
>
>> Thanx Morten.
>>
>> It would be great if it's possible re-enroll. I'd wait for Abyot.
>>
>> On Fri, Jan 8, 2016 at 11:16 AM, Morten Olav Hansen 
>> wrote:
>>
>>> Hi Pamod
>>>
>>> Yes, this is the current standing of how enrollments work. There have
>>> been some discussions internally about this, maybe Abyot can explain what
>>> the ending result was.
>>>
>>> --
>>> Morten
>>>
>>> On Sat, Jan 2, 2016 at 10:59 PM, Pamod Amarakoon 
>>> wrote:
>>>
 Dear All,

 I'd like to wish you all a happy and prosperous new year !

 I noticed an issue, which I need to clarify. Is it not possible to edit
 records or to make an enrollment active again once it has been completed.


 ​
 As shown in the screenshot, the enrollment grays out once it has been
 completed. I cannot find an option to make the enrollment active again or
 to edit the data of any events attached to any of the stages of the
 particular enrollment.

 Version:
 2.21
 Build revision:
 20983
 Build date:
 2015-12-30 14:31

 But when I manually changed the relevant field in programinstance table
 it goes active again.

 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-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 : 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 21660: minor fix in CategoryOptionComboController, don't need custom getEntityList anymore

2016-01-07 Thread noreply

revno: 21660
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Fri 2016-01-08 13:55:43 +0700
message:
  minor fix in CategoryOptionComboController, don't need custom getEntityList 
anymore
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/dataelement/CategoryOptionComboController.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/dataelement/CategoryOptionComboController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/dataelement/CategoryOptionComboController.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/dataelement/CategoryOptionComboController.java	2016-01-08 06:55:43 +
@@ -28,21 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.query.Order;
 import org.hisp.dhis.schema.descriptors.CategoryOptionComboSchemaDescriptor;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.webapi.webdomain.WebMetaData;
-import org.hisp.dhis.webapi.webdomain.WebOptions;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-
 /**
  * @author Morten Olav Hansen 
  */
@@ -51,26 +42,4 @@
 public class CategoryOptionComboController
 extends AbstractCrudController
 {
-// need custom implementation of this since DataElementCategoryOptionCombo does not persist
-// name (clashes with getAllOrderedName)
-// FIXME add paging also for this?
-@Override
-protected List getEntityList( WebMetaData metaData, WebOptions options, List filters, List orders )
-{
-List entityList;
-
-Date lastUpdated = options.getLastUpdated();
-
-if ( lastUpdated != null )
-{
-entityList = new ArrayList<>( manager.getByLastUpdated( getEntityClass(), lastUpdated ) );
-}
-else
-{
-entityList = new ArrayList<>( manager.getAll( getEntityClass() ) );
-Collections.sort( entityList, new IdentifiableObjectNameComparator() );
-}
-
-return entityList;
-}
 }

___
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 21658: Minor fix

2016-01-07 Thread noreply

revno: 21658
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Fri 2016-01-08 12:22:42 +0700
message:
  Minor fix
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java	2016-01-08 04:02:49 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HibernateUtils.java	2016-01-08 05:22:42 +
@@ -65,11 +65,6 @@
 
 if ( HibernateProxy.class.isInstance( proxy ) )
 {
-return (T) ((HibernateProxy) proxy).getHibernateLazyInitializer().getImplementation();
-}
-
-if ( HibernateProxy.class.isInstance( proxy ) )
-{
 Object result = ((HibernateProxy) proxy).writeReplace();
 
 if ( !SerializableProxy.class.isInstance( result ) )

___
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 21659: removed unused exception

2016-01-07 Thread noreply

revno: 21659
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Fri 2016-01-08 12:30:01 +0700
message:
  removed unused exception
removed:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/RestrictionException.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
=== removed file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/RestrictionException.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/RestrictionException.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/RestrictionException.java	1970-01-01 00:00:00 +
@@ -1,40 +0,0 @@
-package org.hisp.dhis.query;
-
-/*
- * 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, 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.
- */
-
-/**
- * @author Morten Olav Hansen 
- */
-public class RestrictionException extends RuntimeException
-{
-public RestrictionException( String message )
-{
-super( message );
-}
-}

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


Re: [Dhis2-devs] Meta data export import

2016-01-07 Thread Morten Olav Hansen
Hi Hannan

Are both server using the exact same version/revision of DHIS2? There have
been quite a bit of changes to the web-api payloads in 2.19/2.20/2.21, so
I'm not sure how compatible they would be.

That said, it seems that there is also an issue with this:
org.hibernate.HibernateException: More than one row with the given
identifier was found: 1153390, for class:
org.hisp.dhis.organisationunit.OrganisationUnitGroup

Could you please share the full stack trace?

--
Morten

On Thu, Jan 7, 2016 at 5:24 PM, Hannan Khan  wrote:

> and DHIS2 version 19 build 19273.
>
> I try with latest build 19286 there message is different:
>
>  * INFO  2016-01-07 15:48:42,986 User 'admin' started import at Thu Jan
> 07 15:48:42 BDT 2016 (DefaultImportService.java [taskScheduler-1])
> * INFO  2016-01-07 15:48:42,986 [Level: INFO, category: METADATA_IMPORT,
> time: Thu Jan 07 15:48:42 BDT 2016, message: Importing meta-data]
> (InMemoryNotifier.java [taskScheduler-1])
> * INFO  2016-01-07 15:48:42,986 Building object-bridge maps (preheatCache:
> true). (DefaultObjectBridge.java [taskScheduler-1])
> * ERROR 2016-01-07 15:50:25,487 HHH000123: IllegalArgumentException in
> class: org.hisp.dhis.validation.ValidationCriteria, setter method of
> property: value (BasicPropertyAccessor.java [taskScheduler-1])
> * ERROR 2016-01-07 15:50:25,487 HHH91: Expected type:
> java.lang.String, actual value: java.lang.Integer
> (BasicPropertyAccessor.java [taskScheduler-1])
> * ERROR 2016-01-07 15:50:25,509 Unexpected error occurred in scheduled
> task. (TaskUtils.java [taskScheduler-1])
> org.hibernate.PropertyAccessException: IllegalArgumentException occurred
> while calling setter of org.hisp.dhis.validation.ValidationCriteria.value
>
>
>
> On Thu, Jan 7, 2016 at 4:18 PM, Hannan Khan  wrote:
>
>> sorry don't attach the log. Here it is.
>>
>> * INFO  2016-01-07 15:55:04,923 User 'admin' started import at Thu Jan 07
>> 15:55:04 BDT 2016 (DefaultImportService.java [taskScheduler-10])
>> * INFO  2016-01-07 15:55:04,924 [Level: INFO, category: METADATA_IMPORT,
>> time: Thu Jan 07 15:55:04 BDT 2016, message: Importing meta-data]
>> (InMemoryNotifier.java [taskScheduler-10])
>> * INFO  2016-01-07 15:55:04,924 Building object-bridge maps
>> (preheatCache: true). (DefaultObjectBridge.java [taskScheduler-10])
>> * ERROR 2016-01-07 15:55:28,801 Unexpected error occurred in scheduled
>> task. (TaskUtils.java [taskScheduler-10])
>> org.hibernate.HibernateException: More than one row with the given
>> identifier was found: 1153390, for class:
>> org.hisp.dhis.organisationunit.OrganisationUnitGroup
>> at
>> org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:104)
>>
>>
>>
>> On Thu, Jan 7, 2016 at 4:01 PM, Hannan Khan  wrote:
>>
>>> Dear DHIS2 Expert
>>>
>>> I am trying to export selected metadata item e.g. Chart, Event Chart,
>>> Map, Map View etc from one server and want to import in another server with
>>> same data. Don't get anything in the UI, but log showing error
>>>
>>> Can you please advise how can solve this problem and /or how to chart,
>>> map, pivot tables from one system to another?
>>>
>>> Regards
>>>
>>> Hannan Khan
>>> HISP Bangladesh
>>>
>>
>>
>
___
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] Problems with GeoJSON uploads

2016-01-07 Thread Morten Olav Hansen
Hi Jason

Do we actually support anything other than MultiPolygons and Points? For my
GeoJson exporter, I default to MultiPolygon unless its a Point.

I have been able to successfully render all geojson using http://geojson.io

What is supported by GIS, I don't know, Jan would have to explain that.

--
Morten

On Tue, Jan 5, 2016 at 7:16 PM, Jason Pickering  wrote:

>
> Hi Devs,
> I am attempting to directly update the coordinates using the WebAPI, but
> am running into issues with the formatting (I think) of JSON fragments.
>
> The worflow is as follows.
> 1) Use MapShaper to simplify the coordinates.
> 2) Export as GeoJSON.
> 3) Use curl to PUT the coordinates to the correct end point, e.g.
> http://myserver/api/organisationUnits/abcd1234/coordinates
> 4) Use curl to PUT the feature type (either "POLYGON" or "MULTI_POLYGON")
> depending on what is reported by the GeoJSON.
>
> That part seems to work fine and I get something which looks like this.
>
>
> Sample polygon..
>
> {
>
>- featureType: "POLYGON",
>- coordinates: 
> "125.8054,-8.7452],[125.8038,-8.7455],[125.8031,-8.7455],[125.8031,-8.7471],[125.8028,-8.748],[125.8021,-8.7488],[125.8013,-8.7492],[125.8004,-8.7494],
>
>
> Sample MultiPolygon:
>
>
> {
>
>- featureType: "MULTI_POLYGON",
>- coordinates: 
> "[127.3286,-8.448],[127.3281,-8.4479],[127.3272,-8.4476],[127.3271,-8.4473],[127.3267,-8.447],[127.3254,-8.4473],[127.3251,-8.4471],[127.3249,-8.4466],[127.3246,-8.4465]...
>
>
>
> In the GIS client, when loading any of the MultiPolygon's I get
> Uncaught TypeError: Cannot read property 'length' of null with  
> util.map.getTransformedFeatureArray.
>
> If I mangle the GeoJSON such that is has four square brackets (instead of 
> five as above) things works OK. If I change the number of square brackets of 
> normal polygons to three (as in the spec example here 
> ) , I get the same error.
>
> Is there a particular reason for this? It would seem to be desirable to allow 
> the upload of GeoJSON directly from a GIS system, without having to mangle it 
> before.
>
> Regards,
> Jason
>
>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
>
> ___
> 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] Tracker Capture reactivate completed enrollment

2016-01-07 Thread Morten Olav Hansen
Hi Pamod

Yes, this is the current standing of how enrollments work. There have been
some discussions internally about this, maybe Abyot can explain what the
ending result was.

--
Morten

On Sat, Jan 2, 2016 at 10:59 PM, Pamod Amarakoon  wrote:

> Dear All,
>
> I'd like to wish you all a happy and prosperous new year !
>
> I noticed an issue, which I need to clarify. Is it not possible to edit
> records or to make an enrollment active again once it has been completed.
>
>
> ​
> As shown in the screenshot, the enrollment grays out once it has been
> completed. I cannot find an option to make the enrollment active again or
> to edit the data of any events attached to any of the stages of the
> particular enrollment.
>
> Version:
> 2.21
> Build revision:
> 20983
> Build date:
> 2015-12-30 14:31
>
> But when I manually changed the relevant field in programinstance table it
> goes active again.
>
> 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-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 OAuth Grant type authorized_code

2016-01-07 Thread Morten Olav Hansen
Hi Thanh

I'm not really sure what you want. DHIS 2 can only act as a authentication
provider, it does not support authentication against another oauth2
provider.

The main reason for adding oauth2 was to support third party clients
connecting with it without having to collect username/passwords in their
own local databases.

--
Morten

On Tue, Dec 15, 2015 at 3:34 PM, Ngoc Thanh Nguyen <
thanh.hispviet...@gmail.com> wrote:

> HI all
>
> Is there a way in DHIS2 that allows defining a callback for OAuth? If this
> possible, we can have multiple dhis2 instances that share a single user
> base. This will work like OAuth in Google+ or Facebook.
>
> Thanh
>
___
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] Dataset report download issues

2016-01-07 Thread Morten Olav Hansen
Hi

Could you please tell us what your issues are in more detail? also what
version/revision are you running.

--
Morten

On Mon, Dec 14, 2015 at 11:32 PM, Oliver Munyao  wrote:

> Hi all,
> Is there a version this is addressed??  kindly inform
>
> --
> Kind Regards,
> Munyao Oliver,
> +254 718 108 359
> omun...@gmail.com
>
> *“It's not the load that breaks you down, it's the way you carry it.” *
>
> ___
> 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 OAuth Grant type authorized_code

2016-01-07 Thread Ngoc Thanh Nguyen
Hi

What I mean was if I have 3 dhis2 instances running on 3 server namely A,
B, C. All user accounts (and passwords) are stored in C.

When I access A or B, it will redirect to C for sign in. After signing in
successfully, I can use A or B.

Is that possible?

Thanh


On Fri, Jan 8, 2016 at 12:58 PM, Morten Olav Hansen 
wrote:

> Hi Thanh
>
> I'm not really sure what you want. DHIS 2 can only act as a authentication
> provider, it does not support authentication against another oauth2
> provider.
>
> The main reason for adding oauth2 was to support third party clients
> connecting with it without having to collect username/passwords in their
> own local databases.
>
> --
> Morten
>
> On Tue, Dec 15, 2015 at 3:34 PM, Ngoc Thanh Nguyen <
> thanh.hispviet...@gmail.com> wrote:
>
>> HI all
>>
>> Is there a way in DHIS2 that allows defining a callback for OAuth? If
>> this possible, we can have multiple dhis2 instances that share a single
>> user base. This will work like OAuth in Google+ or Facebook.
>>
>> Thanh
>>
>
>
___
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 OAuth Grant type authorized_code

2016-01-07 Thread Morten Olav Hansen
No, that is not possible. The only way to externally authenticate a DHIS 2
instance is either using openid or using LDAP (now supported in 2.22).

--
Morten

On Fri, Jan 8, 2016 at 1:08 PM, Ngoc Thanh Nguyen <
thanh.hispviet...@gmail.com> wrote:

> Hi
>
> What I mean was if I have 3 dhis2 instances running on 3 server namely A,
> B, C. All user accounts (and passwords) are stored in C.
>
> When I access A or B, it will redirect to C for sign in. After signing in
> successfully, I can use A or B.
>
> Is that possible?
>
> Thanh
>
>
> On Fri, Jan 8, 2016 at 12:58 PM, Morten Olav Hansen 
> wrote:
>
>> Hi Thanh
>>
>> I'm not really sure what you want. DHIS 2 can only act as a
>> authentication provider, it does not support authentication against another
>> oauth2 provider.
>>
>> The main reason for adding oauth2 was to support third party clients
>> connecting with it without having to collect username/passwords in their
>> own local databases.
>>
>> --
>> Morten
>>
>> On Tue, Dec 15, 2015 at 3:34 PM, Ngoc Thanh Nguyen <
>> thanh.hispviet...@gmail.com> wrote:
>>
>>> HI all
>>>
>>> Is there a way in DHIS2 that allows defining a callback for OAuth? If
>>> this possible, we can have multiple dhis2 instances that share a single
>>> user base. This will work like OAuth in Google+ or Facebook.
>>>
>>> Thanh
>>>
>>
>>
>
___
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] Tracker Capture reactivate completed enrollment

2016-01-07 Thread Abyot Gizaw
Hi,

Re-opening completed enrollments is coming in 2.22. The re-opening will
allow full operations on enrollment - meaning adding / editing / removing
events ... The only catch here is, it is not possible to re-open enrollment
if there is another active enrollment going on.

We are also hoping to allow re-opening enrollment in limited mode - meaning
only to edit event data not add / remove event - when another active
enrollment exists. But  I am afraid this won't make it for 2.22.

---
Thank you,
Abyot.

On Fri, Jan 8, 2016 at 7:01 AM, Pamod Amarakoon  wrote:

> Thanx Morten.
>
> It would be great if it's possible re-enroll. I'd wait for Abyot.
>
> On Fri, Jan 8, 2016 at 11:16 AM, Morten Olav Hansen 
> wrote:
>
>> Hi Pamod
>>
>> Yes, this is the current standing of how enrollments work. There have
>> been some discussions internally about this, maybe Abyot can explain what
>> the ending result was.
>>
>> --
>> Morten
>>
>> On Sat, Jan 2, 2016 at 10:59 PM, Pamod Amarakoon 
>> wrote:
>>
>>> Dear All,
>>>
>>> I'd like to wish you all a happy and prosperous new year !
>>>
>>> I noticed an issue, which I need to clarify. Is it not possible to edit
>>> records or to make an enrollment active again once it has been completed.
>>>
>>>
>>> ​
>>> As shown in the screenshot, the enrollment grays out once it has been
>>> completed. I cannot find an option to make the enrollment active again or
>>> to edit the data of any events attached to any of the stages of the
>>> particular enrollment.
>>>
>>> Version:
>>> 2.21
>>> Build revision:
>>> 20983
>>> Build date:
>>> 2015-12-30 14:31
>>>
>>> But when I manually changed the relevant field in programinstance table
>>> it goes active again.
>>>
>>> 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-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


Re: [Dhis2-devs] Problems with GeoJSON uploads

2016-01-07 Thread Jason Pickering
Hi Morten,

I am not sure what we support, but there are three feature types as far as
I know: Points ,Polygons and MultiPolygons. If we only support MultiPolys,
that would imply that all Polys would need to be converted prior to import
into DHIS2, which is fine, but based on my mail previously, it seems that
it must be exactly the opposite, namely converting Multi-Polys to Polys.

I was able to render a file with both MultiPolys as well as Polygons in
this client without issues, which had been exported from a shape file to
GeoJSON using ogr2ogr.

Jan, could you offer any insight into how to handle Polygons and
Multi-polygons?

Regards,
Jason


On Fri, Jan 8, 2016 at 6:41 AM, Morten Olav Hansen 
wrote:

> Hi Jason
>
> Do we actually support anything other than MultiPolygons and Points? For
> my GeoJson exporter, I default to MultiPolygon unless its a Point.
>
> I have been able to successfully render all geojson using
> http://geojson.io
>
> What is supported by GIS, I don't know, Jan would have to explain that.
>
> --
> Morten
>
> On Tue, Jan 5, 2016 at 7:16 PM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>>
>> Hi Devs,
>> I am attempting to directly update the coordinates using the WebAPI, but
>> am running into issues with the formatting (I think) of JSON fragments.
>>
>> The worflow is as follows.
>> 1) Use MapShaper to simplify the coordinates.
>> 2) Export as GeoJSON.
>> 3) Use curl to PUT the coordinates to the correct end point, e.g.
>> http://myserver/api/organisationUnits/abcd1234/coordinates
>> 4) Use curl to PUT the feature type (either "POLYGON" or "MULTI_POLYGON")
>> depending on what is reported by the GeoJSON.
>>
>> That part seems to work fine and I get something which looks like this.
>>
>>
>> Sample polygon..
>>
>> {
>>
>>- featureType: "POLYGON",
>>- coordinates: 
>> "125.8054,-8.7452],[125.8038,-8.7455],[125.8031,-8.7455],[125.8031,-8.7471],[125.8028,-8.748],[125.8021,-8.7488],[125.8013,-8.7492],[125.8004,-8.7494],
>>
>>
>> Sample MultiPolygon:
>>
>>
>> {
>>
>>- featureType: "MULTI_POLYGON",
>>- coordinates: 
>> "[127.3286,-8.448],[127.3281,-8.4479],[127.3272,-8.4476],[127.3271,-8.4473],[127.3267,-8.447],[127.3254,-8.4473],[127.3251,-8.4471],[127.3249,-8.4466],[127.3246,-8.4465]...
>>
>>
>>
>> In the GIS client, when loading any of the MultiPolygon's I get
>> Uncaught TypeError: Cannot read property 'length' of null with  
>> util.map.getTransformedFeatureArray.
>>
>> If I mangle the GeoJSON such that is has four square brackets (instead of 
>> five as above) things works OK. If I change the number of square brackets of 
>> normal polygons to three (as in the spec example here 
>> ) , I get the same error.
>>
>> Is there a particular reason for this? It would seem to be desirable to 
>> allow the upload of GeoJSON directly from a GIS system, without having to 
>> mangle it before.
>>
>> Regards,
>> Jason
>>
>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com
>> tel:+46764147049
>>
>> ___
>> 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
>>
>>
>


-- 
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+46764147049
___
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 21649: Confirmation when cancelling TEI registration

2016-01-07 Thread noreply

revno: 21649
committer: Markus Bekken 
branch nick: dhis2
timestamp: Thu 2016-01-07 19:03:55 +0100
message:
  Confirmation when cancelling TEI registration
added:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/modal-complete-event.html
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html
  
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


--
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
=== added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/modal-complete-event.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/modal-complete-event.html	1970-01-01 00:00:00 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/modal-complete-event.html	2016-01-07 18:03:55 +
@@ -0,0 +1,11 @@
+
+  {{modalOptions.headerText | translate}}
+
+
+  {{modalOptions.bodyText | translate}}
+
+
+  {{modalOptions.closeButtonText | translate}}
+  {{modalOptions.secondActionButtonText | translate}}
+  {{modalOptions.actionButtonText | translate}}
+
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js	2016-01-07 10:29:04 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js	2016-01-07 18:03:55 +
@@ -20,7 +20,8 @@
 SessionStorageService,
 TEIGridService,
 TrackerRulesFactory,
-TrackerRulesExecutionService) {
+TrackerRulesExecutionService,
+ModalService) {
 
 $scope.maxOptionSize = 30;
 
@@ -403,5 +404,17 @@
 $scope.selectedTei[selectedAttribute.id] = res.id;
 }
 });
-};
+};
+$scope.cancelRegistrationWarning = function(cancelFunction){
+
+var modalOptions = {
+closeButtonText: 'no',
+actionButtonText: 'yes',
+headerText: 'cancel',
+bodyText: 'are_you_sure_to_cancel_registration'
+}
+ModalService.showModal({}, modalOptions).then(function(){
+cancelFunction();
+});
+}
 });

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html	2016-01-07 10:29:04 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html	2016-01-07 18:03:55 +
@@ -50,19 +50,19 @@
 
 
 {{'save'| translate}}
-{{'cancel'| translate}}
+{{'cancel'| translate}}
 
 
 
 {{'enroll'| translate}}  
-{{'cancel'| translate}}
+{{'cancel'| translate}}
 
 
 
 {{'save_and_continue'| translate}}
 {{'save_and_add_new'| translate}}
 {{'print_form'| translate}}
-{{'cancel'| translate}}
+{{'cancel'| translate}}
 
 
 

=== 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	2016-01-07 10:59:31 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties	2016-01-07 18:03:55 +
@@ -396,3 +396,4 @@
 print_form=Print form
 value_must_be_email=Please enter a valid email address
 complete_and_exit =Complete and exit
+are_you_sure_to_cancel_registration=Are you sure you want to cancel this registration?

=== 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	2016-01-07 10:59:31 +
+++ 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21650: Apps. Removed the settings for configuring custum location for app server directory and URL. Rely...

2016-01-07 Thread noreply

revno: 21650
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2016-01-07 20:01:46 +0100
message:
  Apps. Removed the settings for configuring custum location for app server 
directory and URL. Relying on serving apps from Web API from now on.
removed:
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/appmanager/
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/appmanager/DefaultAppManagerServiceTest.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AppController.java
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.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/appmanager/AppManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java	2016-01-07 19:01:46 +
@@ -108,13 +108,6 @@
 String getAppFolderPath();
 
 /**
- * Saves the folder in which apps will be expanded
- *
- * @param appFolderPath
- */
-void setAppFolderPath( String appFolderPath );
-
-/**
  * Gets the Base URL for accessing the apps
  *
  * @return the apps baseurl
@@ -122,13 +115,6 @@
 String getAppBaseUrl();
 
 /**
- * Saves the base URL where apps are installed
- *
- * @param appBaseUrl
- */
-void setAppBaseUrl( String appBaseUrl );
-
-/**
  * Returns the url of the app repository
  *
  * @return url of appstore

=== 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-07 08:13:54 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java	2016-01-07 19:01:46 +
@@ -109,8 +109,6 @@
 CUSTOM_CSS( "keyCustomCss" ),
 CALENDAR( "keyCalendar", "iso8601", String.class ),
 DATE_FORMAT( "keyDateFormat", "-MM-dd", String.class ),
-APP_FOLDER_PATH( "appFolderPath" ),
-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 ),

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java	2016-01-04 16:58:59 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java	2016-01-07 19:01:46 +
@@ -51,6 +51,8 @@
 import org.hisp.dhis.datavalue.DefaultDataValueService;
 import org.hisp.dhis.external.conf.ConfigurationKey;
 import org.hisp.dhis.external.conf.DhisConfigurationProvider;
+import org.hisp.dhis.external.location.LocationManager;
+import org.hisp.dhis.external.location.LocationManagerException;
 import org.hisp.dhis.keyjsonvalue.KeyJsonValueService;
 import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
@@ -85,6 +87,8 @@
 @PostConstruct
 private void init()
 {
+verifyAppFolder();
+
 reloadApps();
 }
 
@@ -93,6 +97,9 @@
 
 @Autowired
 private CurrentUserService currentUserService;
+
+@Autowired
+private LocationManager locationManager;
 
 @Autowired
 private KeyJsonValueService keyJsonValueService;
@@ -303,41 +310,23 @@
 @Override
 public String getAppFolderPath()
 {
-return StringUtils.trimToNull( (String) appSettingManager.getSystemSetting( SettingKey.APP_FOLDER_PATH ) );
-}
-
-@Override
-public void setAppFolderPath( String appFolderPath )
-{
-if ( !appFolderPath.isEmpty() )
-{
-try
-{
-File folder = new File( appFolderPath );
-if ( !folder.exists() )
-{
-FileUtils.forceMkdir( folder );
-}
-}
-catch ( IOException ex )
-{
-

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21651: Removed old apps module

2016-01-07 Thread noreply

revno: 21651
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2016-01-07 20:05:24 +0100
message:
  Removed old apps module
removed:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/pom.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AddAppAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/DeleteAppAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/NoAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/META-INF/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/META-INF/dhis/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_ar.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_es.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_fr.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_id.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_km.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_my.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_pt.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_pt_BR.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_ru.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_tg.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_vi.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module_zh.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/struts.xml
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/WEB-INF/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/WEB-INF/classes/
  

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21653: Tuning of the TC Add event functionality

2016-01-07 Thread noreply

revno: 21653
committer: Markus Bekken 
branch nick: dhis2
timestamp: Thu 2016-01-07 22:16:02 +0100
message:
  Tuning of the TC Add event functionality
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/event-layout.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/new-event-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/new-event.html
  
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/styles/style.css


--
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/components/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2016-01-07 19:39:37 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2016-01-07 21:16:02 +
@@ -53,6 +53,7 @@
 $scope.hiddenSections = {};
 $scope.tableMaxNumberOfDataElements = 7;
 $scope.xVisitScheduleDataElement = false;
+$scope.eventsLoaded = false;
 
 
 //Labels
@@ -352,7 +353,8 @@
 
 TrackerRulesFactory.getRules($scope.selectedProgram.id).then(function(rules){
 $scope.allProgramRules = rules;
-$scope.getEvents();   
+$scope.getEvents();
+$scope.getEventPageForEvent($scope.currentEvent);
 $rootScope.$broadcast('dataEntryControllerData', {programStages: $scope.programStages, eventsByStage: $scope.eventsByStage, addNewEvent: $scope.addNewEvent });
 });   
 });
@@ -421,6 +423,7 @@
 $scope.allEventsSorted = orderByFilter($scope.allEventsSorted, '-sortingDate').reverse();
 sortEventsByStage(null);
 $scope.showDataEntry($scope.currentEvent, true);
+$scope.eventsLoaded = true;
 }
 };
 
@@ -495,7 +498,7 @@
 if (stage.displayEventsInTable) {
 return true;
 }
-
+
 if ($scope.eventsByStage[stage.id].length === 0) {
 return true;
 }
@@ -513,6 +516,28 @@
 return false;
 };
 
+$scope.creatableStagesExist = function(stageList) {
+if(stageList && stageList.length > 0) {
+return true;
+}
+
+return false;
+};
+
+$scope.neverShowStageTasksInTopLine = {};   
+$scope.displayStageTasksInTopLine = function(stage) {
+if($scope.neverShowStageTasksInTopLine[stage.id]){
+return false;
+}   
+
+return $scope.stageNeedsEvent(stage);
+};
+
+$scope.showStageTasks = false;
+$scope.toggleShowStageTasks = function(){
+$scope.showStageTasks = !$scope.showStageTasks;
+};
+
 $scope.addNewEvent = function(newEvent) {
 //Have to make sure the event is preprocessed - this does not happen unless "Dashboardwidgets" is invoked.
 newEvent = EventUtils.processEvent(newEvent, $scope.stagesById[newEvent.programStage], $scope.optionSets, $scope.prStDes);
@@ -522,29 +547,31 @@
 sortEventsByStage('ADD', newEvent);
 };
 
-$scope.showCreateEvent = function (stage, eventCreationAction) {
-
-var stages = [];
+$scope.showCreateEvent = function (stage, eventCreationAction) {
+
+var availableStages = [];
 if(!stage){
 if(!$scope.allEventsSorted || $scope.allEventsSorted.length === 0){
-stages = $scope.programStages;
-}
-for(var key in $scope.eventsByStage){
-var st = $scope.stagesById[key];
-var needEvent = true;
-if(st && st.repeatable){
-for (var j = 0; j < $scope.eventsByStage[st.id].length; j++) {
-   

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21654: Now applying api/files/style stylesheet in dhis-web-apps

2016-01-07 Thread noreply

revno: 21654
committer: Markus Bekken 
branch nick: dhis2
timestamp: Thu 2016-01-07 23:31:16 +0100
message:
  Now applying api/files/style stylesheet in dhis-web-apps
modified:
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js	2015-09-09 09:08:21 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js	2016-01-07 22:31:16 +
@@ -1148,6 +1148,7 @@
 var userStyleName = getStyleName(userStyleUrl);
 
 addUserStyleStylesheet(getStylesheetUrl(userStyleUrl));
+addUserStyleStylesheet("../api/files/style/external");
 setHeaderLogo(userStyleName, logo);
 setHeaderTitle(title);
 setHeaderLink(link);

___
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