Tracked Entity Instances Query - SQL syntax error

Hi all,

I am using below API call to query all the TEIs which are accessible by the current user.

/api/trackedEntityInstances/query.json?ouMode=ACCESSIBLE&attribute=izuwkaOUgFg&attribute=C8DBAo2wEYN&attribute=BZEpuufLyDE&attribute=WqdldQpOIxm

In our setup, we have 5 orgUnitLevels and above query works fine for superuser who has just one orgUnit assigned which is of level 1.

There are other users who has multiple level 4 and 5 orgUnits assigned. Above API call fails for those users giving a 500 error code. Basically this doesn’t work for any user who has multiple orgUnits.

The cause for the issue seems to be a SQL syntax error.

Please find the link to the stack trace below.

https://dl.dropboxusercontent.com/u/81780569/stack.txt

The issue was visible in DHIS2 v2.23 and v2.24.

Have I done something wrong in the above API call or is this a bug in the DHIS2. Is there any walk around for this issue?

Thanks

···

Best Regards,

Chathura Widanage,

Undergraduate,

Department of Computer Science and Engineering,

University of Moratuwa,

Sri Lanka

Seems like a bug yes, I will look into it

···

On Mon, Aug 15, 2016 at 10:34 AM, chathura widanage chathurawidanage@gmail.com wrote:

Hi all,

I am using below API call to query all the TEIs which are accessible by the current user.

/api/trackedEntityInstances/query.json?ouMode=ACCESSIBLE&attribute=izuwkaOUgFg&attribute=C8DBAo2wEYN&attribute=BZEpuufLyDE&attribute=WqdldQpOIxm

In our setup, we have 5 orgUnitLevels and above query works fine for superuser who has just one orgUnit assigned which is of level 1.

There are other users who has multiple level 4 and 5 orgUnits assigned. Above API call fails for those users giving a 500 error code. Basically this doesn’t work for any user who has multiple orgUnits.

The cause for the issue seems to be a SQL syntax error.

Please find the link to the stack trace below.

https://dl.dropboxusercontent.com/u/81780569/stack.txt

The issue was visible in DHIS2 v2.23 and v2.24.

Have I done something wrong in the above API call or is this a bug in the DHIS2. Is there any walk around for this issue?

Thanks

Best Regards,

Chathura Widanage,

Undergraduate,

Department of Computer Science and Engineering,

University of Moratuwa,

Sri Lanka


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

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

Thank you Morten.

···

On Wed, Aug 17, 2016 at 7:10 PM, Morten Olav Hansen morten@dhis2.org wrote:

Seems like a bug yes, I will look into it


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

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Aug 15, 2016 at 10:34 AM, chathura widanage chathurawidanage@gmail.com wrote:

Hi all,

I am using below API call to query all the TEIs which are accessible by the current user.

/api/trackedEntityInstances/query.json?ouMode=ACCESSIBLE&attribute=izuwkaOUgFg&attribute=C8DBAo2wEYN&attribute=BZEpuufLyDE&attribute=WqdldQpOIxm

In our setup, we have 5 orgUnitLevels and above query works fine for superuser who has just one orgUnit assigned which is of level 1.

There are other users who has multiple level 4 and 5 orgUnits assigned. Above API call fails for those users giving a 500 error code. Basically this doesn’t work for any user who has multiple orgUnits.

The cause for the issue seems to be a SQL syntax error.

Please find the link to the stack trace below.

https://dl.dropboxusercontent.com/u/81780569/stack.txt

The issue was visible in DHIS2 v2.23 and v2.24.

Have I done something wrong in the above API call or is this a bug in the DHIS2. Is there any walk around for this issue?

Thanks

Best Regards,

Chathura Widanage,

Undergraduate,

Department of Computer Science and Engineering,

University of Moratuwa,

Sri Lanka


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

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Regards,
Pamod Amarakoon

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

Hi Morten,

Just wondering whether this has been fixed.

Thank you

···

On Wed, Aug 17, 2016 at 7:24 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Thank you Morten.

On Wed, Aug 17, 2016 at 7:10 PM, Morten Olav Hansen morten@dhis2.org wrote:

Seems like a bug yes, I will look into it


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

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


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.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Aug 15, 2016 at 10:34 AM, chathura widanage chathurawidanage@gmail.com wrote:

Hi all,

I am using below API call to query all the TEIs which are accessible by the current user.

/api/trackedEntityInstances/query.json?ouMode=ACCESSIBLE&attribute=izuwkaOUgFg&attribute=C8DBAo2wEYN&attribute=BZEpuufLyDE&attribute=WqdldQpOIxm

In our setup, we have 5 orgUnitLevels and above query works fine for superuser who has just one orgUnit assigned which is of level 1.

There are other users who has multiple level 4 and 5 orgUnits assigned. Above API call fails for those users giving a 500 error code. Basically this doesn’t work for any user who has multiple orgUnits.

The cause for the issue seems to be a SQL syntax error.

Please find the link to the stack trace below.

https://dl.dropboxusercontent.com/u/81780569/stack.txt

The issue was visible in DHIS2 v2.23 and v2.24.

Have I done something wrong in the above API call or is this a bug in the DHIS2. Is there any walk around for this issue?

Thanks

Best Regards,

Chathura Widanage,

Undergraduate,

Department of Computer Science and Engineering,

University of Moratuwa,

Sri Lanka


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

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Regards,
Pamod Amarakoon

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

Looking into it now Pamod, sorry for the delay… I have recreated the bug locally and working on a fix

···

On Wed, Aug 24, 2016 at 12:33 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Hi Morten,

Just wondering whether this has been fixed.

Thank you

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Aug 17, 2016 at 7:24 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Thank you Morten.


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.

On Wed, Aug 17, 2016 at 7:10 PM, Morten Olav Hansen morten@dhis2.org wrote:

Seems like a bug yes, I will look into it


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

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


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.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Aug 15, 2016 at 10:34 AM, chathura widanage chathurawidanage@gmail.com wrote:

Hi all,

I am using below API call to query all the TEIs which are accessible by the current user.

/api/trackedEntityInstances/query.json?ouMode=ACCESSIBLE&attribute=izuwkaOUgFg&attribute=C8DBAo2wEYN&attribute=BZEpuufLyDE&attribute=WqdldQpOIxm

In our setup, we have 5 orgUnitLevels and above query works fine for superuser who has just one orgUnit assigned which is of level 1.

There are other users who has multiple level 4 and 5 orgUnits assigned. Above API call fails for those users giving a 500 error code. Basically this doesn’t work for any user who has multiple orgUnits.

The cause for the issue seems to be a SQL syntax error.

Please find the link to the stack trace below.

https://dl.dropboxusercontent.com/u/81780569/stack.txt

The issue was visible in DHIS2 v2.23 and v2.24.

Have I done something wrong in the above API call or is this a bug in the DHIS2. Is there any walk around for this issue?

Thanks

Best Regards,

Chathura Widanage,

Undergraduate,

Department of Computer Science and Engineering,

University of Moratuwa,

Sri Lanka


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

Give our servers about 1 hour, and you can download the fix for 2.23, 2.24 and trunk

···

On Thu, Aug 25, 2016 at 2:02 PM, Morten Olav Hansen morten@dhis2.org wrote:

Looking into it now Pamod, sorry for the delay… I have recreated the bug locally and working on a fix

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Aug 24, 2016 at 12:33 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Hi Morten,

Just wondering whether this has been fixed.

Thank you

On Wed, Aug 17, 2016 at 7:24 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Thank you Morten.


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.

On Wed, Aug 17, 2016 at 7:10 PM, Morten Olav Hansen morten@dhis2.org wrote:

Seems like a bug yes, I will look into it


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

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


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.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Aug 15, 2016 at 10:34 AM, chathura widanage chathurawidanage@gmail.com wrote:

Hi all,

I am using below API call to query all the TEIs which are accessible by the current user.

/api/trackedEntityInstances/query.json?ouMode=ACCESSIBLE&attribute=izuwkaOUgFg&attribute=C8DBAo2wEYN&attribute=BZEpuufLyDE&attribute=WqdldQpOIxm

In our setup, we have 5 orgUnitLevels and above query works fine for superuser who has just one orgUnit assigned which is of level 1.

There are other users who has multiple level 4 and 5 orgUnits assigned. Above API call fails for those users giving a 500 error code. Basically this doesn’t work for any user who has multiple orgUnits.

The cause for the issue seems to be a SQL syntax error.

Please find the link to the stack trace below.

https://dl.dropboxusercontent.com/u/81780569/stack.txt

The issue was visible in DHIS2 v2.23 and v2.24.

Have I done something wrong in the above API call or is this a bug in the DHIS2. Is there any walk around for this issue?

Thanks

Best Regards,

Chathura Widanage,

Undergraduate,

Department of Computer Science and Engineering,

University of Moratuwa,

Sri Lanka


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

Thank you Morten.

···

On Thu, Aug 25, 2016 at 12:50 PM, Morten Olav Hansen morten@dhis2.org wrote:

Give our servers about 1 hour, and you can download the fix for 2.23, 2.24 and trunk

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Thu, Aug 25, 2016 at 2:02 PM, Morten Olav Hansen morten@dhis2.org wrote:

Looking into it now Pamod, sorry for the delay… I have recreated the bug locally and working on a fix

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Aug 24, 2016 at 12:33 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Hi Morten,

Just wondering whether this has been fixed.

Thank you

On Wed, Aug 17, 2016 at 7:24 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Thank you Morten.


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.

On Wed, Aug 17, 2016 at 7:10 PM, Morten Olav Hansen morten@dhis2.org wrote:

Seems like a bug yes, I will look into it


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

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


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.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Aug 15, 2016 at 10:34 AM, chathura widanage chathurawidanage@gmail.com wrote:

Hi all,

I am using below API call to query all the TEIs which are accessible by the current user.

/api/trackedEntityInstances/query.json?ouMode=ACCESSIBLE&attribute=izuwkaOUgFg&attribute=C8DBAo2wEYN&attribute=BZEpuufLyDE&attribute=WqdldQpOIxm

In our setup, we have 5 orgUnitLevels and above query works fine for superuser who has just one orgUnit assigned which is of level 1.

There are other users who has multiple level 4 and 5 orgUnits assigned. Above API call fails for those users giving a 500 error code. Basically this doesn’t work for any user who has multiple orgUnits.

The cause for the issue seems to be a SQL syntax error.

Please find the link to the stack trace below.

https://dl.dropboxusercontent.com/u/81780569/stack.txt

The issue was visible in DHIS2 v2.23 and v2.24.

Have I done something wrong in the above API call or is this a bug in the DHIS2. Is there any walk around for this issue?

Thanks

Best Regards,

Chathura Widanage,

Undergraduate,

Department of Computer Science and Engineering,

University of Moratuwa,

Sri Lanka


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

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Regards,
Pamod Amarakoon

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

Thank you Morten.

···

On 25 Aug 2016 13:00, “Pamod Amarakoon” pamodm@gmail.com wrote:

Thank you Morten.

On Thu, Aug 25, 2016 at 12:50 PM, Morten Olav Hansen morten@dhis2.org wrote:

Give our servers about 1 hour, and you can download the fix for 2.23, 2.24 and trunk


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.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Thu, Aug 25, 2016 at 2:02 PM, Morten Olav Hansen morten@dhis2.org wrote:

Looking into it now Pamod, sorry for the delay… I have recreated the bug locally and working on a fix

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Aug 24, 2016 at 12:33 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Hi Morten,

Just wondering whether this has been fixed.

Thank you

On Wed, Aug 17, 2016 at 7:24 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Thank you Morten.


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.

On Wed, Aug 17, 2016 at 7:10 PM, Morten Olav Hansen morten@dhis2.org wrote:

Seems like a bug yes, I will look into it


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

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


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.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Aug 15, 2016 at 10:34 AM, chathura widanage chathurawidanage@gmail.com wrote:

Hi all,

I am using below API call to query all the TEIs which are accessible by the current user.

/api/trackedEntityInstances/query.json?ouMode=ACCESSIBLE&attribute=izuwkaOUgFg&attribute=C8DBAo2wEYN&attribute=BZEpuufLyDE&attribute=WqdldQpOIxm

In our setup, we have 5 orgUnitLevels and above query works fine for superuser who has just one orgUnit assigned which is of level 1.

There are other users who has multiple level 4 and 5 orgUnits assigned. Above API call fails for those users giving a 500 error code. Basically this doesn’t work for any user who has multiple orgUnits.

The cause for the issue seems to be a SQL syntax error.

Please find the link to the stack trace below.

https://dl.dropboxusercontent.com/u/81780569/stack.txt

The issue was visible in DHIS2 v2.23 and v2.24.

Have I done something wrong in the above API call or is this a bug in the DHIS2. Is there any walk around for this issue?

Thanks

Best Regards,

Chathura Widanage,

Undergraduate,

Department of Computer Science and Engineering,

University of Moratuwa,

Sri Lanka


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

Hi Morten,

We found a problem in the SQL Views as well. SQLView/{id}/data endpoint is not working in v2.24 (23583,2016-08-25 07:50) and we can’t even define new SQL views from the Data Administration app.

stack trace : https://dl.dropboxusercontent.com/u/81780569/sql_stack_trace.txt

Same sql views are working fine in a 2.23 (23041,

2016-06-30 20:26) instance.

Thank you.

···

On Thu, Aug 25, 2016 at 6:10 PM, chathura widanage chathurawidanage@gmail.com wrote:

Thank you Morten.

On 25 Aug 2016 13:00, “Pamod Amarakoon” pamodm@gmail.com wrote:

Thank you Morten.

On Thu, Aug 25, 2016 at 12:50 PM, Morten Olav Hansen morten@dhis2.org wrote:

Give our servers about 1 hour, and you can download the fix for 2.23, 2.24 and trunk


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.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Thu, Aug 25, 2016 at 2:02 PM, Morten Olav Hansen morten@dhis2.org wrote:

Looking into it now Pamod, sorry for the delay… I have recreated the bug locally and working on a fix

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Aug 24, 2016 at 12:33 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Hi Morten,

Just wondering whether this has been fixed.

Thank you

On Wed, Aug 17, 2016 at 7:24 PM, Pamod Amarakoon pamodm@gmail.com wrote:

Thank you Morten.


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.

On Wed, Aug 17, 2016 at 7:10 PM, Morten Olav Hansen morten@dhis2.org wrote:

Seems like a bug yes, I will look into it


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

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


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.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Aug 15, 2016 at 10:34 AM, chathura widanage chathurawidanage@gmail.com wrote:

Hi all,

I am using below API call to query all the TEIs which are accessible by the current user.

/api/trackedEntityInstances/query.json?ouMode=ACCESSIBLE&attribute=izuwkaOUgFg&attribute=C8DBAo2wEYN&attribute=BZEpuufLyDE&attribute=WqdldQpOIxm

In our setup, we have 5 orgUnitLevels and above query works fine for superuser who has just one orgUnit assigned which is of level 1.

There are other users who has multiple level 4 and 5 orgUnits assigned. Above API call fails for those users giving a 500 error code. Basically this doesn’t work for any user who has multiple orgUnits.

The cause for the issue seems to be a SQL syntax error.

Please find the link to the stack trace below.

https://dl.dropboxusercontent.com/u/81780569/stack.txt

The issue was visible in DHIS2 v2.23 and v2.24.

Have I done something wrong in the above API call or is this a bug in the DHIS2. Is there any walk around for this issue?

Thanks

Best Regards,

Chathura Widanage,

Undergraduate,

Department of Computer Science and Engineering,

University of Moratuwa,

Sri Lanka


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

Best Regards,

Chathura Widanage,

Undergraduate,

Department of Computer Science and Engineering,

University of Moratuwa,

Sri Lanka