[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21530: minor import fix

2015-12-28 Thread noreply

revno: 21530
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-12-28 09:27:27 +0100
message:
  minor import fix
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageDataElementSchemaDescriptor.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/schema/descriptors/ProgramStageDataElementSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageDataElementSchemaDescriptor.java	2015-10-07 03:24:56 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageDataElementSchemaDescriptor.java	2015-12-28 08:27:27 +
@@ -53,7 +53,7 @@
 {
 Schema schema = new Schema( ProgramStageDataElement.class, SINGULAR, PLURAL );
 schema.setRelativeApiEndpoint( API_ENDPOINT );
-schema.setOrder( 1511 );
+schema.setOrder( 1509 );
 
 schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_PROGRAMSTAGE_ADD" ) ) );
 schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_PROGRAMSTAGE_DELETE" ) ) );

___
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] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Dear All,

I tried setting up email on an instance with SMTP using Google Apps
settings. Following are the settings I used.

hostname: smtp.gmail.com
port: 465
username: x...@xxx.net
password: 
Email sender: x...@xxx.net
TLS enabled

But, testing email is never received at my emaiil account.

When I checked catalina.out it contained following errors.

* INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with email
address: x...@xxx.net to host: smtp.gmail.com:1 (EmailMessageSender.java
[SimpleAsyncTaskExecutor-15])
* WARN  2015-12-28 16:04:45,491 Could not send email: Sending the email to
the following server failed : smtp.gmail.com:1,
org.apache.commons.mail.EmailException: Sending the email to the following
server failed : smtp.gmail.com:1
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
at org.apache.commons.mail.Email.send(Email.java:1437)
at
org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at
org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host:
smtp.gmail.com, port: 1;
  nested exception is:
java.net.SocketTimeoutException: connect timed out
at
com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972)
at
com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1400)
... 12 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at
com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:317)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:233)
at
com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1938)
... 19 more
 (EmailMessageSender.java [SimpleAsyncTaskExecutor-15])

//

it contains could not connect to SMTP host and connection timed out. Do I
need to set anything else on Tomcat config? What am I missing here.

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


Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Thanx Morten. By bad, wrong port.

But when I selected port 587, it throws out following error.

* WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot connect
to a port number that is less than 1 ( 0 ),
java.lang.IllegalArgumentException: Cannot connect to a port number that is
less than 1 ( 0 )
at org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
at
org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
at
org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at
org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
 (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])

On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen 
wrote:

> Hi
>
> Could it be that its the wrong port? it seems like TLS requires port 587
> [1] ?
>
> [1] http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon 
> wrote:
>
>> Dear All,
>>
>> I tried setting up email on an instance with SMTP using Google Apps
>> settings. Following are the settings I used.
>>
>> hostname: smtp.gmail.com
>> port: 465
>> username: x...@xxx.net
>> password: 
>> Email sender: x...@xxx.net
>> TLS enabled
>>
>> But, testing email is never received at my emaiil account.
>>
>> When I checked catalina.out it contained following errors.
>>
>> * INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with email
>> address: x...@xxx.net to host: smtp.gmail.com:1 (EmailMessageSender.java
>> [SimpleAsyncTaskExecutor-15])
>> * WARN  2015-12-28 16:04:45,491 Could not send email: Sending the email
>> to the following server failed : smtp.gmail.com:1,
>> org.apache.commons.mail.EmailException: Sending the email to the following
>> server failed : smtp.gmail.com:1
>> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
>> at org.apache.commons.mail.Email.send(Email.java:1437)
>> at
>> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:150)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:497)
>> at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>> at
>> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: javax.mail.MessagingException: Could not connect to SMTP host:
>> smtp.gmail.com, port: 1;
>>   nested exception is:
>> java.net.SocketTimeoutException: connect timed out
>> at
>> com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972)
>> at
>> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
>> at javax.mail.Service.connect(Service.java:317)
>> at javax.mail.Service.connect(Service.java:176)
>> at javax.mail.Service.connect(Service.java:125)
>> at javax.mail.Transport.send0(Transport.java:194)
>> at javax.mail.Transport.send(Transport.java:124)
>> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1400)
>> ... 12 more
>> Caused by: java.net.SocketTimeoutException: connect timed out
>> at java.net.PlainSocketImpl.socketConnect(Native Method)
>> at
>> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
>> at
>> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>> at
>> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
>> at 

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Thanx Morten,

it's
Version:2.21Build revision:20850Build date:2015-10-26 01:19

On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen 
wrote:

> Ok
>
> What version of DHIS 2? I'm adding in Lars, I think he has set it up for
> gmail before (I haven't).
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon 
> wrote:
>
>> Thanx Morten. By bad, wrong port.
>>
>> But when I selected port 587, it throws out following error.
>>
>> * WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot connect
>> to a port number that is less than 1 ( 0 ),
>> java.lang.IllegalArgumentException: Cannot connect to a port number that is
>> less than 1 ( 0 )
>> at org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
>> at
>> org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
>> at
>> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
>> at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown Source)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:497)
>> at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>> at
>> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at java.lang.Thread.run(Thread.java:745)
>>  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])
>>
>> On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Hi
>>>
>>> Could it be that its the wrong port? it seems like TLS requires port 587
>>> [1] ?
>>>
>>> [1] http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon 
>>> wrote:
>>>
 Dear All,

 I tried setting up email on an instance with SMTP using Google Apps
 settings. Following are the settings I used.

 hostname: smtp.gmail.com
 port: 465
 username: x...@xxx.net
 password: 
 Email sender: x...@xxx.net
 TLS enabled

 But, testing email is never received at my emaiil account.

 When I checked catalina.out it contained following errors.

 * INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with email
 address: x...@xxx.net to host: smtp.gmail.com:1
 (EmailMessageSender.java [SimpleAsyncTaskExecutor-15])
 * WARN  2015-12-28 16:04:45,491 Could not send email: Sending the email
 to the following server failed : smtp.gmail.com:1,
 org.apache.commons.mail.EmailException: Sending the email to the following
 server failed : smtp.gmail.com:1
 at
 org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
 at org.apache.commons.mail.Email.send(Email.java:1437)
 at
 org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:150)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at
 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 at
 org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.lang.Thread.run(Thread.java:745)
 Caused by: javax.mail.MessagingException: Could not connect to SMTP
 host: smtp.gmail.com, port: 1;
   nested exception is:
 java.net.SocketTimeoutException: connect timed out
 at
 com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972)
 at
 com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
 at javax.mail.Service.connect(Service.java:317)
 at javax.mail.Service.connect(Service.java:176)
 at javax.mail.Service.connect(Service.java:125)
 at javax.mail.Transport.send0(Transport.java:194)

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Could you give me the output of:

SERVER/api/systemSettings/keyEmailPort


--
Morten

On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon  wrote:

> Thanx Morten,
>
> it's
> Version:2.21Build revision:20850Build date:2015-10-26 01:19
>
> On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen 
> wrote:
>
>> Ok
>>
>> What version of DHIS 2? I'm adding in Lars, I think he has set it up for
>> gmail before (I haven't).
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon 
>> wrote:
>>
>>> Thanx Morten. By bad, wrong port.
>>>
>>> But when I selected port 587, it throws out following error.
>>>
>>> * WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot
>>> connect to a port number that is less than 1 ( 0 ),
>>> java.lang.IllegalArgumentException: Cannot connect to a port number that is
>>> less than 1 ( 0 )
>>> at org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
>>> at
>>> org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
>>> at
>>> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
>>> at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown Source)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:497)
>>> at
>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>> at
>>> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at java.lang.Thread.run(Thread.java:745)
>>>  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])
>>>
>>> On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen 
>>> wrote:
>>>
 Hi

 Could it be that its the wrong port? it seems like TLS requires port
 587 [1] ?

 [1] http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm

 --
 Morten

 On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon 
 wrote:

> Dear All,
>
> I tried setting up email on an instance with SMTP using Google Apps
> settings. Following are the settings I used.
>
> hostname: smtp.gmail.com
> port: 465
> username: x...@xxx.net
> password: 
> Email sender: x...@xxx.net
> TLS enabled
>
> But, testing email is never received at my emaiil account.
>
> When I checked catalina.out it contained following errors.
>
> * INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with email
> address: x...@xxx.net to host: smtp.gmail.com:1
> (EmailMessageSender.java [SimpleAsyncTaskExecutor-15])
> * WARN  2015-12-28 16:04:45,491 Could not send email: Sending the
> email to the following server failed : smtp.gmail.com:1,
> org.apache.commons.mail.EmailException: Sending the email to the following
> server failed : smtp.gmail.com:1
> at
> org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
> at org.apache.commons.mail.Email.send(Email.java:1437)
> at
> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:150)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> at
> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.mail.MessagingException: Could not connect to SMTP
> host: smtp.gmail.com, port: 1;
>   nested exception is:
> java.net.SocketTimeoutException: connect timed out
> at
> com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972)
> at
> 

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Ok, could be a bug in the settings app.

--
Morten

On Mon, Dec 28, 2015 at 12:43 PM, Pamod Amarakoon  wrote:

> Yes, when trying to send out test email after entering the email settings.
>
> On Mon, Dec 28, 2015 at 5:12 PM, Morten Olav Hansen 
> wrote:
>
>> Ok, so is this happening when you are sending out the test email?
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 12:40 PM, Pamod Amarakoon 
>> wrote:
>>
>>> and yes, it's the new settings app I used
>>>
>>> On Mon, Dec 28, 2015 at 5:10 PM, Pamod Amarakoon 
>>> wrote:
>>>
 Dear Morten,

 I toggled between the remaining ports 25 and 465. Both throws out

 "Caused by: javax.mail.MessagingException: Could not connect to SMTP
 host: smtp.gmail.com, port: 2;
   nested exception is:
 java.net.SocketTimeoutException: connect timed out
 "
 I'll try the method you suggested.

 On Mon, Dec 28, 2015 at 5:07 PM, Morten Olav Hansen  wrote:

> While not ideal, you could null it out with:
> delete from systemsetting where name='keyEmailPort';
>
> And then it should default to TLS port.
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:35 PM, Morten Olav Hansen <
> morte...@gmail.com> wrote:
>
>> Right. That's what i suspected, that setting is wrong. Did you use
>> the new setting app to set it? could you try and change between the
>> different ports and see if the output changes for you?
>>
>> It could be a bug in the settings app, but I'm not sure. 0 is never a
>> valid value for that setting.
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 12:33 PM, Pamod Amarakoon 
>> wrote:
>>
>>> Hi,
>>>
>>> It's "0"
>>>
>>> On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen <
>>> morte...@gmail.com> wrote:
>>>
 Could you give me the output of:

 SERVER/api/systemSettings/keyEmailPort


 --
 Morten

 On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon  wrote:

> Thanx Morten,
>
> it's
> Version:2.21Build revision:20850Build date:2015-10-26 01:19
>
> On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen <
> morte...@gmail.com> wrote:
>
>> Ok
>>
>> What version of DHIS 2? I'm adding in Lars, I think he has set it
>> up for gmail before (I haven't).
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon <
>> pam...@gmail.com> wrote:
>>
>>> Thanx Morten. By bad, wrong port.
>>>
>>> But when I selected port 587, it throws out following error.
>>>
>>> * WARN  2015-12-28 16:22:00,067 Error while sending email:
>>> Cannot connect to a port number that is less than 1 ( 0 ),
>>> java.lang.IllegalArgumentException: Cannot connect to a port number 
>>> that is
>>> less than 1 ( 0 )
>>> at
>>> org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
>>> at
>>> org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
>>> at
>>> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
>>> at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown
>>> Source)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:497)
>>> at
>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>> at
>>> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
>>> at
>>> java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at java.lang.Thread.run(Thread.java:745)
>>>  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])
>>>
>>> On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen <
>>> morte...@gmail.com> wrote:
>>>
 Hi

 Could it be that its the wrong port? it seems like TLS requires
 port 587 [1] ?

 [1]
 http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm

 --

Re: [Dhis2-devs] [Dhis2-users] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Thanx Lars. Will do :)

On Mon, Dec 28, 2015 at 5:24 PM, Lars Helge Øverland 
wrote:

> Hi Pamod,
>
> this was a bug with the settings app which has been fixed. Try upgrading
> to latest 2.21 from dhis2.org/downloads.
>
> regards,
>
> Lars
>
>
> On Mon, Dec 28, 2015 at 12:45 PM, Morten Olav Hansen 
> wrote:
>
>> Ok, could be a bug in the settings app.
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 12:43 PM, Pamod Amarakoon 
>> wrote:
>>
>>> Yes, when trying to send out test email after entering the email
>>> settings.
>>>
>>> On Mon, Dec 28, 2015 at 5:12 PM, Morten Olav Hansen 
>>> wrote:
>>>
 Ok, so is this happening when you are sending out the test email?

 --
 Morten

 On Mon, Dec 28, 2015 at 12:40 PM, Pamod Amarakoon 
 wrote:

> and yes, it's the new settings app I used
>
> On Mon, Dec 28, 2015 at 5:10 PM, Pamod Amarakoon 
> wrote:
>
>> Dear Morten,
>>
>> I toggled between the remaining ports 25 and 465. Both throws out
>>
>> "Caused by: javax.mail.MessagingException: Could not connect to SMTP
>> host: smtp.gmail.com, port: 2;
>>   nested exception is:
>> java.net.SocketTimeoutException: connect timed out
>> "
>> I'll try the method you suggested.
>>
>> On Mon, Dec 28, 2015 at 5:07 PM, Morten Olav Hansen <
>> morte...@gmail.com> wrote:
>>
>>> While not ideal, you could null it out with:
>>> delete from systemsetting where name='keyEmailPort';
>>>
>>> And then it should default to TLS port.
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 12:35 PM, Morten Olav Hansen <
>>> morte...@gmail.com> wrote:
>>>
 Right. That's what i suspected, that setting is wrong. Did you use
 the new setting app to set it? could you try and change between the
 different ports and see if the output changes for you?

 It could be a bug in the settings app, but I'm not sure. 0 is never
 a valid value for that setting.

 --
 Morten

 On Mon, Dec 28, 2015 at 12:33 PM, Pamod Amarakoon  wrote:

> Hi,
>
> It's "0"
>
> On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen <
> morte...@gmail.com> wrote:
>
>> Could you give me the output of:
>>
>> SERVER/api/systemSettings/keyEmailPort
>>
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon <
>> pam...@gmail.com> wrote:
>>
>>> Thanx Morten,
>>>
>>> it's
>>> Version:2.21Build revision:20850Build date:2015-10-26 01:19
>>>
>>> On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen <
>>> morte...@gmail.com> wrote:
>>>
 Ok

 What version of DHIS 2? I'm adding in Lars, I think he has set
 it up for gmail before (I haven't).

 --
 Morten

 On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon <
 pam...@gmail.com> wrote:

> Thanx Morten. By bad, wrong port.
>
> But when I selected port 587, it throws out following error.
>
> * WARN  2015-12-28 16:22:00,067 Error while sending email:
> Cannot connect to a port number that is less than 1 ( 0 ),
> java.lang.IllegalArgumentException: Cannot connect to a port 
> number that is
> less than 1 ( 0 )
> at
> org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
> at
> org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
> at
> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
> at
> sun.reflect.GeneratedMethodAccessor631.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> at
> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Hi

Could it be that its the wrong port? it seems like TLS requires port 587
[1] ?

[1] http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm

--
Morten

On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon  wrote:

> Dear All,
>
> I tried setting up email on an instance with SMTP using Google Apps
> settings. Following are the settings I used.
>
> hostname: smtp.gmail.com
> port: 465
> username: x...@xxx.net
> password: 
> Email sender: x...@xxx.net
> TLS enabled
>
> But, testing email is never received at my emaiil account.
>
> When I checked catalina.out it contained following errors.
>
> * INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with email
> address: x...@xxx.net to host: smtp.gmail.com:1 (EmailMessageSender.java
> [SimpleAsyncTaskExecutor-15])
> * WARN  2015-12-28 16:04:45,491 Could not send email: Sending the email to
> the following server failed : smtp.gmail.com:1,
> org.apache.commons.mail.EmailException: Sending the email to the following
> server failed : smtp.gmail.com:1
> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
> at org.apache.commons.mail.Email.send(Email.java:1437)
> at
> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:150)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> at
> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.mail.MessagingException: Could not connect to SMTP host:
> smtp.gmail.com, port: 1;
>   nested exception is:
> java.net.SocketTimeoutException: connect timed out
> at
> com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972)
> at
> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
> at javax.mail.Service.connect(Service.java:317)
> at javax.mail.Service.connect(Service.java:176)
> at javax.mail.Service.connect(Service.java:125)
> at javax.mail.Transport.send0(Transport.java:194)
> at javax.mail.Transport.send(Transport.java:124)
> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1400)
> ... 12 more
> Caused by: java.net.SocketTimeoutException: connect timed out
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
> at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
> at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:589)
> at
> com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:317)
> at
> com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:233)
> at
> com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1938)
> ... 19 more
>  (EmailMessageSender.java [SimpleAsyncTaskExecutor-15])
>
> //
>
> it contains could not connect to SMTP host and connection timed out. Do I
> need to set anything else on Tomcat config? What am I missing here.
>
> 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: 

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Right. That's what i suspected, that setting is wrong. Did you use the new
setting app to set it? could you try and change between the different ports
and see if the output changes for you?

It could be a bug in the settings app, but I'm not sure. 0 is never a valid
value for that setting.

--
Morten

On Mon, Dec 28, 2015 at 12:33 PM, Pamod Amarakoon  wrote:

> Hi,
>
> It's "0"
>
> On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen 
> wrote:
>
>> Could you give me the output of:
>>
>> SERVER/api/systemSettings/keyEmailPort
>>
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon 
>> wrote:
>>
>>> Thanx Morten,
>>>
>>> it's
>>> Version:2.21Build revision:20850Build date:2015-10-26 01:19
>>>
>>> On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen 
>>> wrote:
>>>
 Ok

 What version of DHIS 2? I'm adding in Lars, I think he has set it up
 for gmail before (I haven't).

 --
 Morten

 On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon 
 wrote:

> Thanx Morten. By bad, wrong port.
>
> But when I selected port 587, it throws out following error.
>
> * WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot
> connect to a port number that is less than 1 ( 0 ),
> java.lang.IllegalArgumentException: Cannot connect to a port number that 
> is
> less than 1 ( 0 )
> at org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
> at
> org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
> at
> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
> at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown
> Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> at
> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.lang.Thread.run(Thread.java:745)
>  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])
>
> On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen <
> morte...@gmail.com> wrote:
>
>> Hi
>>
>> Could it be that its the wrong port? it seems like TLS requires port
>> 587 [1] ?
>>
>> [1]
>> http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon 
>> wrote:
>>
>>> Dear All,
>>>
>>> I tried setting up email on an instance with SMTP using Google Apps
>>> settings. Following are the settings I used.
>>>
>>> hostname: smtp.gmail.com
>>> port: 465
>>> username: x...@xxx.net
>>> password: 
>>> Email sender: x...@xxx.net
>>> TLS enabled
>>>
>>> But, testing email is never received at my emaiil account.
>>>
>>> When I checked catalina.out it contained following errors.
>>>
>>> * INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with
>>> email address: x...@xxx.net to host: smtp.gmail.com:1
>>> (EmailMessageSender.java [SimpleAsyncTaskExecutor-15])
>>> * WARN  2015-12-28 16:04:45,491 Could not send email: Sending the
>>> email to the following server failed : smtp.gmail.com:1,
>>> org.apache.commons.mail.EmailException: Sending the email to the 
>>> following
>>> server failed : smtp.gmail.com:1
>>> at
>>> org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
>>> at org.apache.commons.mail.Email.send(Email.java:1437)
>>> at
>>> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:150)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>> Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:497)
>>> at
>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>> at
>>> 

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Dear Morten,

Deleting keyEmailPort from systemsetting table solved the problem.

Thanx a lot !

On Mon, Dec 28, 2015 at 5:15 PM, Morten Olav Hansen 
wrote:

> Ok, could be a bug in the settings app.
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:43 PM, Pamod Amarakoon 
> wrote:
>
>> Yes, when trying to send out test email after entering the email settings.
>>
>> On Mon, Dec 28, 2015 at 5:12 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Ok, so is this happening when you are sending out the test email?
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 12:40 PM, Pamod Amarakoon 
>>> wrote:
>>>
 and yes, it's the new settings app I used

 On Mon, Dec 28, 2015 at 5:10 PM, Pamod Amarakoon 
 wrote:

> Dear Morten,
>
> I toggled between the remaining ports 25 and 465. Both throws out
>
> "Caused by: javax.mail.MessagingException: Could not connect to SMTP
> host: smtp.gmail.com, port: 2;
>   nested exception is:
> java.net.SocketTimeoutException: connect timed out
> "
> I'll try the method you suggested.
>
> On Mon, Dec 28, 2015 at 5:07 PM, Morten Olav Hansen <
> morte...@gmail.com> wrote:
>
>> While not ideal, you could null it out with:
>> delete from systemsetting where name='keyEmailPort';
>>
>> And then it should default to TLS port.
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 12:35 PM, Morten Olav Hansen <
>> morte...@gmail.com> wrote:
>>
>>> Right. That's what i suspected, that setting is wrong. Did you use
>>> the new setting app to set it? could you try and change between the
>>> different ports and see if the output changes for you?
>>>
>>> It could be a bug in the settings app, but I'm not sure. 0 is never
>>> a valid value for that setting.
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 12:33 PM, Pamod Amarakoon 
>>> wrote:
>>>
 Hi,

 It's "0"

 On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen <
 morte...@gmail.com> wrote:

> Could you give me the output of:
>
> SERVER/api/systemSettings/keyEmailPort
>
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon <
> pam...@gmail.com> wrote:
>
>> Thanx Morten,
>>
>> it's
>> Version:2.21Build revision:20850Build date:2015-10-26 01:19
>>
>> On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen <
>> morte...@gmail.com> wrote:
>>
>>> Ok
>>>
>>> What version of DHIS 2? I'm adding in Lars, I think he has set
>>> it up for gmail before (I haven't).
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon <
>>> pam...@gmail.com> wrote:
>>>
 Thanx Morten. By bad, wrong port.

 But when I selected port 587, it throws out following error.

 * WARN  2015-12-28 16:22:00,067 Error while sending email:
 Cannot connect to a port number that is less than 1 ( 0 ),
 java.lang.IllegalArgumentException: Cannot connect to a port 
 number that is
 less than 1 ( 0 )
 at
 org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
 at
 org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
 at
 org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
 at
 sun.reflect.GeneratedMethodAccessor631.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at
 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 at
 org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
 at
 java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.lang.Thread.run(Thread.java:745)
  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])

 On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen <
 

Re: [Dhis2-devs] [Dhis2-users] Setting up Email

2015-12-28 Thread Lars Helge Øverland
Hi Pamod,

this was a bug with the settings app which has been fixed. Try upgrading to
latest 2.21 from dhis2.org/downloads.

regards,

Lars


On Mon, Dec 28, 2015 at 12:45 PM, Morten Olav Hansen 
wrote:

> Ok, could be a bug in the settings app.
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:43 PM, Pamod Amarakoon 
> wrote:
>
>> Yes, when trying to send out test email after entering the email settings.
>>
>> On Mon, Dec 28, 2015 at 5:12 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Ok, so is this happening when you are sending out the test email?
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 12:40 PM, Pamod Amarakoon 
>>> wrote:
>>>
 and yes, it's the new settings app I used

 On Mon, Dec 28, 2015 at 5:10 PM, Pamod Amarakoon 
 wrote:

> Dear Morten,
>
> I toggled between the remaining ports 25 and 465. Both throws out
>
> "Caused by: javax.mail.MessagingException: Could not connect to SMTP
> host: smtp.gmail.com, port: 2;
>   nested exception is:
> java.net.SocketTimeoutException: connect timed out
> "
> I'll try the method you suggested.
>
> On Mon, Dec 28, 2015 at 5:07 PM, Morten Olav Hansen <
> morte...@gmail.com> wrote:
>
>> While not ideal, you could null it out with:
>> delete from systemsetting where name='keyEmailPort';
>>
>> And then it should default to TLS port.
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 12:35 PM, Morten Olav Hansen <
>> morte...@gmail.com> wrote:
>>
>>> Right. That's what i suspected, that setting is wrong. Did you use
>>> the new setting app to set it? could you try and change between the
>>> different ports and see if the output changes for you?
>>>
>>> It could be a bug in the settings app, but I'm not sure. 0 is never
>>> a valid value for that setting.
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 12:33 PM, Pamod Amarakoon 
>>> wrote:
>>>
 Hi,

 It's "0"

 On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen <
 morte...@gmail.com> wrote:

> Could you give me the output of:
>
> SERVER/api/systemSettings/keyEmailPort
>
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon <
> pam...@gmail.com> wrote:
>
>> Thanx Morten,
>>
>> it's
>> Version:2.21Build revision:20850Build date:2015-10-26 01:19
>>
>> On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen <
>> morte...@gmail.com> wrote:
>>
>>> Ok
>>>
>>> What version of DHIS 2? I'm adding in Lars, I think he has set
>>> it up for gmail before (I haven't).
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon <
>>> pam...@gmail.com> wrote:
>>>
 Thanx Morten. By bad, wrong port.

 But when I selected port 587, it throws out following error.

 * WARN  2015-12-28 16:22:00,067 Error while sending email:
 Cannot connect to a port number that is less than 1 ( 0 ),
 java.lang.IllegalArgumentException: Cannot connect to a port 
 number that is
 less than 1 ( 0 )
 at
 org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
 at
 org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
 at
 org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
 at
 sun.reflect.GeneratedMethodAccessor631.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at
 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 at
 org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
 at
 java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.lang.Thread.run(Thread.java:745)
  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])

 On Mon, Dec 28, 2015 

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
While not ideal, you could null it out with:
delete from systemsetting where name='keyEmailPort';

And then it should default to TLS port.

--
Morten

On Mon, Dec 28, 2015 at 12:35 PM, Morten Olav Hansen 
wrote:

> Right. That's what i suspected, that setting is wrong. Did you use the new
> setting app to set it? could you try and change between the different ports
> and see if the output changes for you?
>
> It could be a bug in the settings app, but I'm not sure. 0 is never a
> valid value for that setting.
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:33 PM, Pamod Amarakoon 
> wrote:
>
>> Hi,
>>
>> It's "0"
>>
>> On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Could you give me the output of:
>>>
>>> SERVER/api/systemSettings/keyEmailPort
>>>
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon 
>>> wrote:
>>>
 Thanx Morten,

 it's
 Version:2.21Build revision:20850Build date:2015-10-26 01:19

 On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen  wrote:

> Ok
>
> What version of DHIS 2? I'm adding in Lars, I think he has set it up
> for gmail before (I haven't).
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon 
> wrote:
>
>> Thanx Morten. By bad, wrong port.
>>
>> But when I selected port 587, it throws out following error.
>>
>> * WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot
>> connect to a port number that is less than 1 ( 0 ),
>> java.lang.IllegalArgumentException: Cannot connect to a port number that 
>> is
>> less than 1 ( 0 )
>> at org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
>> at
>> org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
>> at
>> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
>> at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown
>> Source)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:497)
>> at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>> at
>> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at java.lang.Thread.run(Thread.java:745)
>>  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])
>>
>> On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen <
>> morte...@gmail.com> wrote:
>>
>>> Hi
>>>
>>> Could it be that its the wrong port? it seems like TLS requires port
>>> 587 [1] ?
>>>
>>> [1]
>>> http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon 
>>> wrote:
>>>
 Dear All,

 I tried setting up email on an instance with SMTP using Google Apps
 settings. Following are the settings I used.

 hostname: smtp.gmail.com
 port: 465
 username: x...@xxx.net
 password: 
 Email sender: x...@xxx.net
 TLS enabled

 But, testing email is never received at my emaiil account.

 When I checked catalina.out it contained following errors.

 * INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with
 email address: x...@xxx.net to host: smtp.gmail.com:1
 (EmailMessageSender.java [SimpleAsyncTaskExecutor-15])
 * WARN  2015-12-28 16:04:45,491 Could not send email: Sending the
 email to the following server failed : smtp.gmail.com:1,
 org.apache.commons.mail.EmailException: Sending the email to the 
 following
 server failed : smtp.gmail.com:1
 at
 org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
 at org.apache.commons.mail.Email.send(Email.java:1437)
 at
 org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:150)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at
 

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Ok

What version of DHIS 2? I'm adding in Lars, I think he has set it up for
gmail before (I haven't).

--
Morten

On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon  wrote:

> Thanx Morten. By bad, wrong port.
>
> But when I selected port 587, it throws out following error.
>
> * WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot connect
> to a port number that is less than 1 ( 0 ),
> java.lang.IllegalArgumentException: Cannot connect to a port number that is
> less than 1 ( 0 )
> at org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
> at
> org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
> at
> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
> at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> at
> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.lang.Thread.run(Thread.java:745)
>  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])
>
> On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen 
> wrote:
>
>> Hi
>>
>> Could it be that its the wrong port? it seems like TLS requires port 587
>> [1] ?
>>
>> [1] http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon 
>> wrote:
>>
>>> Dear All,
>>>
>>> I tried setting up email on an instance with SMTP using Google Apps
>>> settings. Following are the settings I used.
>>>
>>> hostname: smtp.gmail.com
>>> port: 465
>>> username: x...@xxx.net
>>> password: 
>>> Email sender: x...@xxx.net
>>> TLS enabled
>>>
>>> But, testing email is never received at my emaiil account.
>>>
>>> When I checked catalina.out it contained following errors.
>>>
>>> * INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with email
>>> address: x...@xxx.net to host: smtp.gmail.com:1 (EmailMessageSender.java
>>> [SimpleAsyncTaskExecutor-15])
>>> * WARN  2015-12-28 16:04:45,491 Could not send email: Sending the email
>>> to the following server failed : smtp.gmail.com:1,
>>> org.apache.commons.mail.EmailException: Sending the email to the following
>>> server failed : smtp.gmail.com:1
>>> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
>>> at org.apache.commons.mail.Email.send(Email.java:1437)
>>> at
>>> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:150)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:497)
>>> at
>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>> at
>>> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at java.lang.Thread.run(Thread.java:745)
>>> Caused by: javax.mail.MessagingException: Could not connect to SMTP
>>> host: smtp.gmail.com, port: 1;
>>>   nested exception is:
>>> java.net.SocketTimeoutException: connect timed out
>>> at
>>> com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972)
>>> at
>>> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
>>> at javax.mail.Service.connect(Service.java:317)
>>> at javax.mail.Service.connect(Service.java:176)
>>> at javax.mail.Service.connect(Service.java:125)
>>> at javax.mail.Transport.send0(Transport.java:194)
>>> at javax.mail.Transport.send(Transport.java:124)
>>> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1400)
>>> ... 12 more
>>> Caused by: java.net.SocketTimeoutException: connect timed out
>>> at 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21531: Data value import, fixed bug with check for open future periods

2015-12-28 Thread noreply

revno: 21531
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-12-28 12:17:59 +0100
message:
  Data value import, fixed bug with check for open future periods
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/dataelement/DataElementTest.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-12-01 19:58:55 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-12-28 11:17:59 +
@@ -58,7 +58,6 @@
 import org.hisp.dhis.schema.PropertyType;
 import org.hisp.dhis.schema.annotation.Property;
 import org.hisp.dhis.schema.annotation.PropertyRange;
-import org.hisp.dhis.util.ObjectUtils;
 import org.joda.time.DateTime;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
@@ -331,14 +330,14 @@
  */
 public int getOpenFuturePeriods()
 {
-Set openPeriods = new HashSet<>();
+int maxOpenPeriods = 0;
 
 for ( DataSet dataSet : dataSets )
-{
-openPeriods.add( dataSet.getOpenFuturePeriods() );
+{
+maxOpenPeriods = Math.max( maxOpenPeriods, dataSet.getOpenFuturePeriods() );
 }
 
-return ObjectUtils.firstNonNull( Collections.max( openPeriods ), 0 );
+return maxOpenPeriods;
 }
 
 /**

=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/dataelement/DataElementTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/dataelement/DataElementTest.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/dataelement/DataElementTest.java	2015-12-28 11:17:59 +
@@ -45,7 +45,7 @@
 public class DataElementTest
 {
 @Test
-public void getPeriodType()
+public void testGetPeriodType()
 {
 PeriodType periodType = new MonthlyPeriodType();
 
@@ -63,7 +63,7 @@
 }
 
 @Test
-public void periodTypeIsValid()
+public void testPeriodTypeIsValid()
 {
 DataElement element = new DataElement();
 
@@ -80,4 +80,26 @@
 
 assertFalse( element.periodTypeIsValid() );
 }
+
+@Test
+public void testGetOpenFuturePeriods()
+{
+DataElement deA = new DataElement( "A" );
+
+assertEquals( 0, deA.getOpenFuturePeriods() );
+
+DataSet dsA = new DataSet( "A" );
+DataSet dsB = new DataSet( "B" );
+
+dsA.setOpenFuturePeriods( 0 );
+dsB.setOpenFuturePeriods( 3 );
+
+dsA.addDataElement( deA );
+
+assertEquals( 0, deA.getOpenFuturePeriods() );
+
+dsB.addDataElement( deA );
+
+assertEquals( 3, deA.getOpenFuturePeriods() );
+}
 }

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

2015-12-28 Thread Pamod Amarakoon
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-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Dear Morten,

I toggled between the remaining ports 25 and 465. Both throws out

"Caused by: javax.mail.MessagingException: Could not connect to SMTP host:
smtp.gmail.com, port: 2;
  nested exception is:
java.net.SocketTimeoutException: connect timed out
"
I'll try the method you suggested.

On Mon, Dec 28, 2015 at 5:07 PM, Morten Olav Hansen 
wrote:

> While not ideal, you could null it out with:
> delete from systemsetting where name='keyEmailPort';
>
> And then it should default to TLS port.
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:35 PM, Morten Olav Hansen 
> wrote:
>
>> Right. That's what i suspected, that setting is wrong. Did you use the
>> new setting app to set it? could you try and change between the different
>> ports and see if the output changes for you?
>>
>> It could be a bug in the settings app, but I'm not sure. 0 is never a
>> valid value for that setting.
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 12:33 PM, Pamod Amarakoon 
>> wrote:
>>
>>> Hi,
>>>
>>> It's "0"
>>>
>>> On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen 
>>> wrote:
>>>
 Could you give me the output of:

 SERVER/api/systemSettings/keyEmailPort


 --
 Morten

 On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon 
 wrote:

> Thanx Morten,
>
> it's
> Version:2.21Build revision:20850Build date:2015-10-26 01:19
>
> On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen <
> morte...@gmail.com> wrote:
>
>> Ok
>>
>> What version of DHIS 2? I'm adding in Lars, I think he has set it up
>> for gmail before (I haven't).
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon 
>> wrote:
>>
>>> Thanx Morten. By bad, wrong port.
>>>
>>> But when I selected port 587, it throws out following error.
>>>
>>> * WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot
>>> connect to a port number that is less than 1 ( 0 ),
>>> java.lang.IllegalArgumentException: Cannot connect to a port number 
>>> that is
>>> less than 1 ( 0 )
>>> at org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
>>> at
>>> org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
>>> at
>>> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
>>> at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown
>>> Source)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:497)
>>> at
>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>> at
>>> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at java.lang.Thread.run(Thread.java:745)
>>>  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])
>>>
>>> On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen <
>>> morte...@gmail.com> wrote:
>>>
 Hi

 Could it be that its the wrong port? it seems like TLS requires
 port 587 [1] ?

 [1]
 http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm

 --
 Morten

 On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon  wrote:

> Dear All,
>
> I tried setting up email on an instance with SMTP using Google
> Apps settings. Following are the settings I used.
>
> hostname: smtp.gmail.com
> port: 465
> username: x...@xxx.net
> password: 
> Email sender: x...@xxx.net
> TLS enabled
>
> But, testing email is never received at my emaiil account.
>
> When I checked catalina.out it contained following errors.
>
> * INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with
> email address: x...@xxx.net to host: smtp.gmail.com:1
> (EmailMessageSender.java [SimpleAsyncTaskExecutor-15])
> * WARN  2015-12-28 16:04:45,491 Could not send email: Sending the
> email to the following server failed : smtp.gmail.com:1,
> org.apache.commons.mail.EmailException: Sending the email to the 
> following
> server failed : smtp.gmail.com:1

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Hi,

It's "0"

On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen 
wrote:

> Could you give me the output of:
>
> SERVER/api/systemSettings/keyEmailPort
>
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon 
> wrote:
>
>> Thanx Morten,
>>
>> it's
>> Version:2.21Build revision:20850Build date:2015-10-26 01:19
>>
>> On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Ok
>>>
>>> What version of DHIS 2? I'm adding in Lars, I think he has set it up for
>>> gmail before (I haven't).
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon 
>>> wrote:
>>>
 Thanx Morten. By bad, wrong port.

 But when I selected port 587, it throws out following error.

 * WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot
 connect to a port number that is less than 1 ( 0 ),
 java.lang.IllegalArgumentException: Cannot connect to a port number that is
 less than 1 ( 0 )
 at org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
 at
 org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
 at
 org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
 at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at
 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 at
 org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.lang.Thread.run(Thread.java:745)
  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])

 On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen  wrote:

> Hi
>
> Could it be that its the wrong port? it seems like TLS requires port
> 587 [1] ?
>
> [1] http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon 
> wrote:
>
>> Dear All,
>>
>> I tried setting up email on an instance with SMTP using Google Apps
>> settings. Following are the settings I used.
>>
>> hostname: smtp.gmail.com
>> port: 465
>> username: x...@xxx.net
>> password: 
>> Email sender: x...@xxx.net
>> TLS enabled
>>
>> But, testing email is never received at my emaiil account.
>>
>> When I checked catalina.out it contained following errors.
>>
>> * INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with email
>> address: x...@xxx.net to host: smtp.gmail.com:1
>> (EmailMessageSender.java [SimpleAsyncTaskExecutor-15])
>> * WARN  2015-12-28 16:04:45,491 Could not send email: Sending the
>> email to the following server failed : smtp.gmail.com:1,
>> org.apache.commons.mail.EmailException: Sending the email to the 
>> following
>> server failed : smtp.gmail.com:1
>> at
>> org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
>> at org.apache.commons.mail.Email.send(Email.java:1437)
>> at
>> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:150)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:497)
>> at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>> at
>> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: javax.mail.MessagingException: Could not connect to SMTP
>> host: smtp.gmail.com, port: 1;
>>   

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21532: added missing function

2015-12-28 Thread noreply

revno: 21532
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Mon 2015-12-28 13:24:24 +0100
message:
  added missing function
modified:
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.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.angular.services.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js	2015-12-24 11:47:36 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js	2015-12-28 12:24:24 +
@@ -307,6 +307,17 @@
 }
 } 
 return val;
+},
+displayBooleanAsYesNo: function(value, dataElement){
+if(angular.isUndefined(dataElement) || dataElement.valueType === "BOOLEAN"){
+if(value === "true" || value === true){
+return "Yes";
+}
+else if(value === "false" || value === false){
+return "No";
+}
+}
+return 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


Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Ok, so is this happening when you are sending out the test email?

--
Morten

On Mon, Dec 28, 2015 at 12:40 PM, Pamod Amarakoon  wrote:

> and yes, it's the new settings app I used
>
> On Mon, Dec 28, 2015 at 5:10 PM, Pamod Amarakoon  wrote:
>
>> Dear Morten,
>>
>> I toggled between the remaining ports 25 and 465. Both throws out
>>
>> "Caused by: javax.mail.MessagingException: Could not connect to SMTP
>> host: smtp.gmail.com, port: 2;
>>   nested exception is:
>> java.net.SocketTimeoutException: connect timed out
>> "
>> I'll try the method you suggested.
>>
>> On Mon, Dec 28, 2015 at 5:07 PM, Morten Olav Hansen 
>> wrote:
>>
>>> While not ideal, you could null it out with:
>>> delete from systemsetting where name='keyEmailPort';
>>>
>>> And then it should default to TLS port.
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 12:35 PM, Morten Olav Hansen >> > wrote:
>>>
 Right. That's what i suspected, that setting is wrong. Did you use the
 new setting app to set it? could you try and change between the different
 ports and see if the output changes for you?

 It could be a bug in the settings app, but I'm not sure. 0 is never a
 valid value for that setting.

 --
 Morten

 On Mon, Dec 28, 2015 at 12:33 PM, Pamod Amarakoon 
 wrote:

> Hi,
>
> It's "0"
>
> On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen <
> morte...@gmail.com> wrote:
>
>> Could you give me the output of:
>>
>> SERVER/api/systemSettings/keyEmailPort
>>
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon 
>> wrote:
>>
>>> Thanx Morten,
>>>
>>> it's
>>> Version:2.21Build revision:20850Build date:2015-10-26 01:19
>>>
>>> On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen <
>>> morte...@gmail.com> wrote:
>>>
 Ok

 What version of DHIS 2? I'm adding in Lars, I think he has set it
 up for gmail before (I haven't).

 --
 Morten

 On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon  wrote:

> Thanx Morten. By bad, wrong port.
>
> But when I selected port 587, it throws out following error.
>
> * WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot
> connect to a port number that is less than 1 ( 0 ),
> java.lang.IllegalArgumentException: Cannot connect to a port number 
> that is
> less than 1 ( 0 )
> at
> org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
> at
> org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
> at
> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
> at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown
> Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> at
> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.lang.Thread.run(Thread.java:745)
>  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])
>
> On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen <
> morte...@gmail.com> wrote:
>
>> Hi
>>
>> Could it be that its the wrong port? it seems like TLS requires
>> port 587 [1] ?
>>
>> [1]
>> http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon <
>> pam...@gmail.com> wrote:
>>
>>> Dear All,
>>>
>>> I tried setting up email on an instance with SMTP using Google
>>> Apps settings. Following are the settings I used.
>>>
>>> hostname: smtp.gmail.com
>>> port: 465
>>> username: x...@xxx.net
>>> password: 
>>> Email sender: x...@xxx.net
>>> TLS enabled
>>>
>>> But, testing email is never received at my emaiil 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21535: tracker/event-capture: printing custom and default forms

2015-12-28 Thread noreply

revno: 21535
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Mon 2015-12-28 15:53:48 +0100
message:
  tracker/event-capture: printing custom and default forms
removed:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/bootstrap.min.css
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/screen.css
added:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/main-dataentry-form.html
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css
  
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-print.html
  
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-details.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/print.css
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.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-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css	2015-12-24 12:26:41 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css	2015-12-28 14:53:48 +
@@ -449,15 +449,4 @@
 
 .custom-form-completed {
 width: 35%
-}
-
-
-
-/*.file-input input[readonly] {
-background-color: white !important;
-cursor: text !important;
-}*/
-
-/*input[type='file'] {
-opacity:0
-}*/
\ No newline at end of file
+}
\ No newline at end of file

=== 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	2015-12-21 13:28:07 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-12-28 14:53:48 +
@@ -26,6 +26,8 @@
 EventCreationService,
 $q) {
 
+$scope.printForm = false;
+$scope.printEmptyForm = false;
 $scope.eventPageSize = 4;
 $scope.maxOptionSize = 30;
 $scope.dashboardReady = false;
@@ -117,22 +119,26 @@
 } 
 }
 $scope.model= {};
-
+
 $scope.print = function(divName){
-$scope.showProgramReportDetailsDiv = false;
-var printContents =  document.getElementById(divName).innerHTML;
-//var popupWin = window.open('', '_blank', 'resizable=1,scrollbars=no,width=500,height=200');
+$scope.printForm = true;
+$scope.printEmptyForm = true;
+var printContents = document.getElementById(divName).innerHTML;
 var popupWin = window.open('', '_blank', 'fullscreen=1');
 popupWin.document.open();
 popupWin.document.write('\n\
- \n\
- \n\
- \n\
- \n\
- ' + printContents +
+\n\
+\n\
+\n\
+\n\
+\n\
+\n\
+\n\
+' + printContents + 
 '');
 popupWin.document.close();
-
+$scope.printForm = false;
+$scope.printEmptyForm = false;
 };
 
 var processRuleEffect = function(event){

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-print.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-print.html	2015-12-16 14:39:12 +
+++ 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21536: add mergeWith to DataApprovalWorkflow

2015-12-28 Thread noreply

revno: 21536
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-12-28 15:54:00 +0100
message:
  add mergeWith to DataApprovalWorkflow
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalWorkflow.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/dataapproval/DataApprovalWorkflow.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalWorkflow.java	2015-12-01 17:19:15 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalWorkflow.java	2015-12-28 14:54:00 +
@@ -37,6 +37,8 @@
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import org.hisp.dhis.common.BaseIdentifiableObject;
 import org.hisp.dhis.common.DxfNamespaces;
+import org.hisp.dhis.common.IdentifiableObject;
+import org.hisp.dhis.common.MergeStrategy;
 import org.hisp.dhis.common.adapter.JacksonPeriodTypeDeserializer;
 import org.hisp.dhis.common.adapter.JacksonPeriodTypeSerializer;
 import org.hisp.dhis.common.annotation.Scanned;
@@ -54,7 +56,7 @@
 /**
  * Identifies types of data to be approved, and the set of approval levels
  * by which it is approved.
- *
+ * 
  * The types of data to be approved are identified by data sets (for aggregate
  * data) and or programs (for event/tracker data) that are related to a
  * workflow.
@@ -84,12 +86,12 @@
 {
 }
 
-public DataApprovalWorkflow(String name)
+public DataApprovalWorkflow( String name )
 {
 this.name = name;
 }
 
-public DataApprovalWorkflow(String name, PeriodType periodType, Set levels)
+public DataApprovalWorkflow( String name, PeriodType periodType, Set levels )
 {
 this.name = name;
 this.periodType = periodType;
@@ -150,4 +152,27 @@
 {
 this.levels = levels;
 }
-}
+
+@Override
+public void mergeWith( IdentifiableObject other, MergeStrategy strategy )
+{
+super.mergeWith( other, strategy );
+
+if ( other.getClass().isInstance( this ) )
+{
+DataApprovalWorkflow dataApprovalWorkflow = (DataApprovalWorkflow) other;
+
+if ( strategy.isReplace() )
+{
+periodType = dataApprovalWorkflow.getPeriodType();
+}
+else if ( strategy.isMerge() )
+{
+periodType = dataApprovalWorkflow.getPeriodType() == null ? periodType : dataApprovalWorkflow.getPeriodType();
+}
+
+levels.clear();
+levels.addAll( dataApprovalWorkflow.getLevels() );
+}
+}
+}
\ No newline at end of file

___
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] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Yes, when trying to send out test email after entering the email settings.

On Mon, Dec 28, 2015 at 5:12 PM, Morten Olav Hansen 
wrote:

> Ok, so is this happening when you are sending out the test email?
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:40 PM, Pamod Amarakoon 
> wrote:
>
>> and yes, it's the new settings app I used
>>
>> On Mon, Dec 28, 2015 at 5:10 PM, Pamod Amarakoon 
>> wrote:
>>
>>> Dear Morten,
>>>
>>> I toggled between the remaining ports 25 and 465. Both throws out
>>>
>>> "Caused by: javax.mail.MessagingException: Could not connect to SMTP
>>> host: smtp.gmail.com, port: 2;
>>>   nested exception is:
>>> java.net.SocketTimeoutException: connect timed out
>>> "
>>> I'll try the method you suggested.
>>>
>>> On Mon, Dec 28, 2015 at 5:07 PM, Morten Olav Hansen 
>>> wrote:
>>>
 While not ideal, you could null it out with:
 delete from systemsetting where name='keyEmailPort';

 And then it should default to TLS port.

 --
 Morten

 On Mon, Dec 28, 2015 at 12:35 PM, Morten Olav Hansen <
 morte...@gmail.com> wrote:

> Right. That's what i suspected, that setting is wrong. Did you use the
> new setting app to set it? could you try and change between the different
> ports and see if the output changes for you?
>
> It could be a bug in the settings app, but I'm not sure. 0 is never a
> valid value for that setting.
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:33 PM, Pamod Amarakoon 
> wrote:
>
>> Hi,
>>
>> It's "0"
>>
>> On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen <
>> morte...@gmail.com> wrote:
>>
>>> Could you give me the output of:
>>>
>>> SERVER/api/systemSettings/keyEmailPort
>>>
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon 
>>> wrote:
>>>
 Thanx Morten,

 it's
 Version:2.21Build revision:20850Build date:2015-10-26 01:19

 On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen <
 morte...@gmail.com> wrote:

> Ok
>
> What version of DHIS 2? I'm adding in Lars, I think he has set it
> up for gmail before (I haven't).
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon <
> pam...@gmail.com> wrote:
>
>> Thanx Morten. By bad, wrong port.
>>
>> But when I selected port 587, it throws out following error.
>>
>> * WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot
>> connect to a port number that is less than 1 ( 0 ),
>> java.lang.IllegalArgumentException: Cannot connect to a port number 
>> that is
>> less than 1 ( 0 )
>> at
>> org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
>> at
>> org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
>> at
>> org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
>> at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown
>> Source)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:497)
>> at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>> at
>> org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
>> at
>> java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at java.lang.Thread.run(Thread.java:745)
>>  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])
>>
>> On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen <
>> morte...@gmail.com> wrote:
>>
>>> Hi
>>>
>>> Could it be that its the wrong port? it seems like TLS requires
>>> port 587 [1] ?
>>>
>>> [1]
>>> http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon <
>>> pam...@gmail.com> wrote:
>>>
 Dear All,

 I tried setting up email on an instance with SMTP using Google
 Apps 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21534: TEI query, including organisation unit name in response

2015-12-28 Thread noreply

revno: 21534
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-12-28 14:08:12 +0100
message:
  TEI query, including organisation unit name in response
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceQueryParams.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.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/trackedentity/TrackedEntityInstanceQueryParams.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceQueryParams.java	2015-12-23 12:56:31 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceQueryParams.java	2015-12-28 13:08:12 +
@@ -55,6 +55,7 @@
 public static final String CREATED_ID = "created";
 public static final String LAST_UPDATED_ID = "lastupdated";
 public static final String ORG_UNIT_ID = "ou";
+public static final String ORG_UNIT_NAME = "ouname";
 public static final String TRACKED_ENTITY_ID = "te";
 public static final String TRACKED_ENTITY_ATTRIBUTE_ID = "teattribute";
 public static final String TRACKED_ENTITY_ATTRIBUTE_VALUE_ID = "tevalue";

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2015-12-23 12:56:31 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2015-12-28 13:08:12 +
@@ -176,7 +176,8 @@
 grid.addHeader( new GridHeader( TRACKED_ENTITY_INSTANCE_ID, "Instance" ) );
 grid.addHeader( new GridHeader( CREATED_ID, "Created" ) );
 grid.addHeader( new GridHeader( LAST_UPDATED_ID, "Last updated" ) );
-grid.addHeader( new GridHeader( ORG_UNIT_ID, "Org unit" ) );
+grid.addHeader( new GridHeader( ORG_UNIT_ID, "Organisation unit" ) );
+grid.addHeader( new GridHeader( ORG_UNIT_NAME, "Organisation unit name" ) );
 grid.addHeader( new GridHeader( TRACKED_ENTITY_ID, "Tracked entity" ) );
 grid.addHeader( new GridHeader( INACTIVE_ID, "Inactive" ) );
 
@@ -200,6 +201,7 @@
 grid.addValue( entity.get( CREATED_ID ) );
 grid.addValue( entity.get( LAST_UPDATED_ID ) );
 grid.addValue( entity.get( ORG_UNIT_ID ) );
+grid.addValue( entity.get( ORG_UNIT_NAME ) );
 grid.addValue( entity.get( TRACKED_ENTITY_ID ) );
 grid.addValue( entity.get( INACTIVE_ID ) );
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2015-12-23 12:56:31 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2015-12-28 13:08:12 +
@@ -219,9 +219,14 @@
 // Select clause
 // -
 
-String sql = "select tei.uid as " + TRACKED_ENTITY_INSTANCE_ID + ", " + "tei.created as " + CREATED_ID + ", "
-+ "tei.lastupdated as " + LAST_UPDATED_ID + ", " + "ou.uid as " + ORG_UNIT_ID + ", " + "te.uid as "
-+ TRACKED_ENTITY_ID + ", " + "tei.inactive as " + INACTIVE_ID + ", ";
+String sql = 
+"select tei.uid as " + TRACKED_ENTITY_INSTANCE_ID + ", " + 
+"tei.created as " + CREATED_ID + ", " + 
+"tei.lastupdated as " + LAST_UPDATED_ID + ", " + 
+"ou.uid as " + ORG_UNIT_ID + ", " +
+"ou.name as " + ORG_UNIT_NAME + ", " +
+"te.uid as " + TRACKED_ENTITY_ID + ", " + 
+"tei.inactive as " + INACTIVE_ID + ", ";
 
 for ( QueryItem item : params.getAttributes() )
 {
@@ -265,6 +270,7 @@
 map.put( CREATED_ID, rowSet.getString( CREATED_ID ) );
 map.put( LAST_UPDATED_ID, rowSet.getString( LAST_UPDATED_ID ) );
 map.put( ORG_UNIT_ID, rowSet.getString( ORG_UNIT_ID ) );
+map.put( ORG_UNIT_NAME, rowSet.getString( ORG_UNIT_NAME ) );
 map.put( TRACKED_ENTITY_ID, rowSet.getString( TRACKED_ENTITY_ID ) );
 map.put( 

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
and yes, it's the new settings app I used

On Mon, Dec 28, 2015 at 5:10 PM, Pamod Amarakoon  wrote:

> Dear Morten,
>
> I toggled between the remaining ports 25 and 465. Both throws out
>
> "Caused by: javax.mail.MessagingException: Could not connect to SMTP host:
> smtp.gmail.com, port: 2;
>   nested exception is:
> java.net.SocketTimeoutException: connect timed out
> "
> I'll try the method you suggested.
>
> On Mon, Dec 28, 2015 at 5:07 PM, Morten Olav Hansen 
> wrote:
>
>> While not ideal, you could null it out with:
>> delete from systemsetting where name='keyEmailPort';
>>
>> And then it should default to TLS port.
>>
>> --
>> Morten
>>
>> On Mon, Dec 28, 2015 at 12:35 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Right. That's what i suspected, that setting is wrong. Did you use the
>>> new setting app to set it? could you try and change between the different
>>> ports and see if the output changes for you?
>>>
>>> It could be a bug in the settings app, but I'm not sure. 0 is never a
>>> valid value for that setting.
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 12:33 PM, Pamod Amarakoon 
>>> wrote:
>>>
 Hi,

 It's "0"

 On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen  wrote:

> Could you give me the output of:
>
> SERVER/api/systemSettings/keyEmailPort
>
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon 
> wrote:
>
>> Thanx Morten,
>>
>> it's
>> Version:2.21Build revision:20850Build date:2015-10-26 01:19
>>
>> On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen <
>> morte...@gmail.com> wrote:
>>
>>> Ok
>>>
>>> What version of DHIS 2? I'm adding in Lars, I think he has set it up
>>> for gmail before (I haven't).
>>>
>>> --
>>> Morten
>>>
>>> On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon 
>>> wrote:
>>>
 Thanx Morten. By bad, wrong port.

 But when I selected port 587, it throws out following error.

 * WARN  2015-12-28 16:22:00,067 Error while sending email: Cannot
 connect to a port number that is less than 1 ( 0 ),
 java.lang.IllegalArgumentException: Cannot connect to a port number 
 that is
 less than 1 ( 0 )
 at org.apache.commons.mail.Email.setSmtpPort(Email.java:533)
 at
 org.hisp.dhis.message.EmailMessageSender.getHtmlEmail(EmailMessageSender.java:176)
 at
 org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:127)
 at sun.reflect.GeneratedMethodAccessor631.invoke(Unknown
 Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at
 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 at
 org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.lang.Thread.run(Thread.java:745)
  (EmailMessageSender.java [SimpleAsyncTaskExecutor-24])

 On Mon, Dec 28, 2015 at 4:18 PM, Morten Olav Hansen <
 morte...@gmail.com> wrote:

> Hi
>
> Could it be that its the wrong port? it seems like TLS requires
> port 587 [1] ?
>
> [1]
> http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm
>
> --
> Morten
>
> On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon <
> pam...@gmail.com> wrote:
>
>> Dear All,
>>
>> I tried setting up email on an instance with SMTP using Google
>> Apps settings. Following are the settings I used.
>>
>> hostname: smtp.gmail.com
>> port: 465
>> username: x...@xxx.net
>> password: 
>> Email sender: x...@xxx.net
>> TLS enabled
>>
>> But, testing email is never received at my emaiil account.
>>
>> When I checked catalina.out it contained following errors.
>>
>> * INFO  2015-12-28 16:03:45,413 Sending email to user: XXX with
>> email address: x...@xxx.net to host: smtp.gmail.com:1
>> (EmailMessageSender.java [SimpleAsyncTaskExecutor-15])

Re: [Dhis2-devs] Information about Metadata Sync

2015-12-28 Thread Lars Helge Øverland
Hi Vanya,

thanks for reaching out on this. We do not have a near-term plan for
implementing that feature so if you would like to take it on then it will
be appreciated.

We can do a call and discuss the approach. Just suggest a time.

best regards,

Lars




On Mon, Dec 21, 2015 at 9:50 AM, Vanya Seth  wrote:

> Hi dhis-devs
>
> I am from ThoughtWorks India and we are working for MSF (OCA). There is a
> requirement to synchronize data/metadata across multiple dhis instances.
> The deployment strategy that we have is: A central instance called as
> Headquarters(HQ) and multiple field level instances for data collection.
> The central instance is
> responsible for creation of the metadata and do data analysis(data
> collected from fields get synced to the HQ instance). So, this essentially
> is a classical case of a distributed setting.
>
> Data Sync functionality is built into the system. But for metadata sync
> there is no direct or consolidated functionality implemented. We explored
> the Metadata Export and Import functionality as a probable solution.
>
> But then I stumbled upon this mail thread
> https://lists.launchpad.net/dhis2-users/msg05889.html and there is a
> mention of some synchronization tool under development with support coming
> in from HISP India developers.
> I had a look at the branches and this is what I think is their development
> branch:
> https://code.launchpad.net/~dhis2-devs-core/dhis2/synchmanager_2.20
>
> So, I wanted to understand a couple of things here:
>
> 1. Actual requirements/ blue print of the feature under development.
> 2. If we could get a high level solution approach that has been followed.
> 3. The roadmap in terms of feature release and also what all has been
> implemented so far.
>
> Also, would it be possible to have it all discussed over a call?
>
> Thanks in advance for all the help.
>
>
> --
> With Regards
> Vanya
> ThoughtWorks Technologies
> Hyderabad
>
> --Stay Hungry Stay Foolish!!
>
> ___
> 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
>
>


-- 
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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21533: TC, css

2015-12-28 Thread noreply

revno: 21533
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-12-28 13:37:51 +0100
message:
  TC, css
modified:
  
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/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css	2015-12-24 12:26:41 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css	2015-12-28 12:37:51 +
@@ -1195,7 +1195,7 @@
 }
 
 .select2-container .select2-choice {
-padding: 5px !important;
+padding: 8px 6px !important;
 color: #555 !important;
 }
 

___
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 21537: rename ou.parents => ou.ancestors in web-api

2015-12-28 Thread noreply

revno: 21537
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-12-28 16:37:23 +0100
message:
  rename ou.parents => ou.ancestors in web-api
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.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/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-12-14 16:33:02 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-12-28 15:37:23 +
@@ -576,10 +576,10 @@
  * Returns the list of ancestor organisation units for this organisation unit.
  * Does not include itself. The list is ordered by root first.
  */
-@JsonProperty( "parents" )
+@JsonProperty( "ancestors" )
 @JsonSerialize( contentAs = BaseIdentifiableObject.class )
 @JsonView( { DetailedView.class } )
-@JacksonXmlElementWrapper( localName = "parents", namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlElementWrapper( localName = "ancestors", namespace = DxfNamespaces.DXF_2_0 )
 @JacksonXmlProperty( localName = "organisationUnit", namespace = DxfNamespaces.DXF_2_0 )
 public List getAncestors()
 {

___
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 21538: tracker-capture: display orgunit name in tei list; make sure those teis from the data capture org...

2015-12-28 Thread noreply

revno: 21538
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Mon 2015-12-28 21:34:02 +0100
message:
  tracker-capture: display orgunit name in tei list; make sure those teis from 
the data capture orgunit are displayed on top of the list
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.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/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js	2015-12-24 10:18:52 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js	2015-12-28 20:34:02 +
@@ -1586,79 +1586,81 @@
 };
 })
 
-.service('TEIGridService', function(OuService, OptionSetService, CurrentSelection, DateUtils, $translate){
+.service('TEIGridService', function(OptionSetService, CurrentSelection, DateUtils, $translate, $filter, SessionStorageService){
 
 return {
 format: function(grid, map, optionSets, invalidTeis){
 
+var ou = SessionStorageService.get('SELECTED_OU');
+
 invalidTeis = !invalidTeis ? [] : invalidTeis;
 if(!grid || !grid.rows){
 return;
 }
 
-//grid.headers[0-5] = Instance, Created, Last updated, Org unit, Tracked entity, Inactive
-//grid.headers[6..] = Attribute, Attribute, 
+//grid.headers[0-6] = Instance, Created, Last updated, OU ID, Ou Name, Tracked entity, Inactive
+//grid.headers[7..] = Attribute, Attribute, 
 var attributes = [];
 for(var i=6; i

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21539: tracker-capture: clip long program stage and org unit names in event box under data entry widget

2015-12-28 Thread noreply

revno: 21539
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Mon 2015-12-28 21:44:17 +0100
message:
  tracker-capture: clip long program stage and org unit names in event box 
under data entry widget
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/event-layout.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/components/dataentry/event-layout.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/event-layout.html	2015-12-21 13:28:07 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/event-layout.html	2015-12-28 20:44:17 +
@@ -7,8 +7,8 @@
 
 
 {{dhis2Event.sortingDate}}
-{{dhis2Event.orgUnitName}}
-{{dhis2Event.name}}
+{{dhis2Event.orgUnitName.length > 15 ? dhis2Event.orgUnitName.substring(0,15).concat('...') : dhis2Event.orgUnitName}}
+{{dhis2Event.name.length > 15 ? dhis2Event.name.substring(0,15).concat('...') : dhis2Event.name}}
 
 
 

___
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] 'View Only' access to User Groups lets them 'Edit' as well.

2015-12-28 Thread Archana Chillala
Hi,

I am from ThoughtWorks India, working for MSF (OCA). We are using the DHIS
code on *trunk* locked at revision 21496. We have been working on
Dashboards, their shareability and Synch to different DHIS instances.
However, we have observed a couple of issues with that.

1. When we share a dashboard with a user Group providing* 'View Only'*
access, the users within that user group are also able to* EDIT *the
dashboard and make all sorts of changes that can be done (even though Edit
access is not given to them). And these changes are reflected immediately
across all the users within that group. We also tested this with different
roles giving minimum authorities. Yet, the same result. How do we fix this?

2. We have two instances of DHIS. A dashboard is created and shared with a
user Group in the first instance. When, metadata is exported and imported
to the other DHIS instance, except the 'admin' user, no other user is able
to get any dashboards. Would you suggest any solution to this?



Thanks & Regards,

Archana ChillalaApplication DeveloperEmailarchanac@thoughtworks.comTelephone+91
9100960533 <+91+9100960533>[image: ThoughtWorks]

___
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