Re: [Dhis2-devs] Query around OAuth implicit grant

2018-09-10 Thread Lorill Crees
Ok, thanks Morten.

On Sun, Sep 9, 2018 at 5:39 PM Morten Olav Hansen  wrote:

> Hi
>
> To support OpenID connect we would have to upgrade to Spring Security 5
> (and that would also mean Spring 5), this is not a high priority for us
> right now.
>
> We don't have any plans to support DHIS2 being a OAuth2 client (you might
> be able to do this in your own apps using a OAuth2 JS library maybe..)
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> Team Integration Lead
> University of Oslo
> http://www.dhis2.org
>
>
> On Fri, Sep 7, 2018 at 5:54 AM Lorill Crees  wrote:
>
>> Hi Morten,
>>
>> 1. What is the timeline for the DHIS 2 upgrade to the latest OAuth 2
>> Spring libraries and the implementation of OpenID Connect?
>>
>> 2. Is there anything in the DHIS 2 roadmap for enabling DHIS 2 to be an
>> Oauth2 client in order to authenticate against another Oauth2 provider?
>>
>> Thanks,
>>
>> Lorill
>>
>> On Fri, Aug 3, 2018 at 8:39 PM Morten Olav Hansen 
>> wrote:
>>
>>> Hi Rajeswari & Gaurav
>>>
>>> We don't have any immediate plans to expand our OAuth2 implementation,
>>> not until we upgrade to the latest OAuth2 Spring libraries (which require
>>> spring 5), and then also implement OpenID Connect.
>>>
>>> That said, we do support authorization code which I think should serve
>>> your purposes well? yes I know the implicit grant is a bit simpler to
>>> setup, but I think the authorization code approach should work fine for you
>>> also.
>>>
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> Team Integration Lead
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Fri, Aug 3, 2018 at 5:07 PM, Rajeswari Gottipati <
>>> rajes...@thoughtworks.com> wrote:
>>>
>>>> Hi DHIS,
>>>>
>>>> We have gone through DHIS OAuth documentation and found that DHIS has
>>>> implemented Authorization code grant. We are planning to use DHIS
>>>> OAuth in our application and our application is pure java script based.
>>>>
>>>> As our application is SPA (single page application) hence we are
>>>> looking for implicit grant OAuth. Are there any plans to implement this in
>>>> near future.
>>>>
>>>> Thanks,
>>>> Rajeswari & Gaurav.
>>>>
>>>
>>> ___
>>> 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
>>>
>>
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>
>> lcr...@2paths.com
>> skype: lorill2paths
>> (604) 689-4123 x 15
>>
>

-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Query around OAuth implicit grant

2018-09-06 Thread Lorill Crees
Hi Morten,

1. What is the timeline for the DHIS 2 upgrade to the latest OAuth 2 Spring
libraries and the implementation of OpenID Connect?

2. Is there anything in the DHIS 2 roadmap for enabling DHIS 2 to be an
Oauth2 client in order to authenticate against another Oauth2 provider?

Thanks,

Lorill

On Fri, Aug 3, 2018 at 8:39 PM Morten Olav Hansen  wrote:

> Hi Rajeswari & Gaurav
>
> We don't have any immediate plans to expand our OAuth2 implementation, not
> until we upgrade to the latest OAuth2 Spring libraries (which require
> spring 5), and then also implement OpenID Connect.
>
> That said, we do support authorization code which I think should serve
> your purposes well? yes I know the implicit grant is a bit simpler to
> setup, but I think the authorization code approach should work fine for you
> also.
>
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> Team Integration Lead
> University of Oslo
> http://www.dhis2.org
>
> On Fri, Aug 3, 2018 at 5:07 PM, Rajeswari Gottipati <
> rajes...@thoughtworks.com> wrote:
>
>> Hi DHIS,
>>
>> We have gone through DHIS OAuth documentation and found that DHIS has
>> implemented Authorization code grant. We are planning to use DHIS OAuth
>> in our application and our application is pure java script based.
>>
>> As our application is SPA (single page application) hence we are looking
>> for implicit grant OAuth. Are there any plans to implement this in near
>> future.
>>
>> Thanks,
>> Rajeswari & Gaurav.
>>
>
> ___
> 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
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] GIS App Does Not Load and Just Hangs

2017-06-27 Thread Lorill Crees
Thanks!

On Tue, Jun 27, 2017 at 11:54 AM, Bjørn Sandvik  wrote:

> Yes, I'll port the fix to all later versions of the GIS app within a few
> days.
>
> Bjørn
>
> On Tue, Jun 27, 2017 at 8:49 PM, Lorill Crees  wrote:
>
>> Hi Bjørn,
>>
>> Thanks very much, that did the trick! All working now. I also double
>> checked in both the instances we have had previous issues with.
>>
>> Jan - sorry, the version number in my last email was actually a copy
>> paste error, I had explicitly checked after that first deployment to ensure
>> the build date was updated.
>>
>> Thanks again for your help with this. Will this fix be also ported to
>> 2.25 and 2.26? We are planning a 2.25 upgrade in the next week or so for
>> some of our instances.
>>
>> Thanks,
>>
>> Lorill
>>
>> On Tue, Jun 27, 2017 at 11:44 AM, Jan Henrik Øverland <
>> janhenrik.overl...@gmail.com> wrote:
>>
>>> Yep, I triggered a 2.24 build, however the previous one completed 12
>>> hours ago and that is still not reflected in the Lorill's build date.
>>> Lorill, please re-download the war file, but also: did you clear out both
>>> the war file and the folder completely from tomcat before adding the new
>>> one? Could also be browser cache or nginx cache. Let us know how it goes.
>>>
>>> Jan
>>>
>>> On Jun 27, 2017 20:22, "Bjørn Sandvik"  wrote:
>>>
>>> > Has your fix not made it into the latest downloadable war at that
>>> location above yet?
>>>
>>> I see that the last 2.24 build was finished 12 minutes ago. Please try
>>> again :-)
>>>
>>> Bjørn
>>>
>>>
>>> On Tue, Jun 27, 2017 at 7:54 PM, Lorill Crees  wrote:
>>>
>>>> Hi Bjørn,
>>>>
>>>> Thanks for this. I've downloaded the war from here:
>>>>
>>>> https://www.dhis2.org/download/releases/2.24/dhis.war
>>>>
>>>> Version:
>>>> 2.24
>>>> Build revision:
>>>> 381c984
>>>> Build date:
>>>> 2017-06-08 06:21
>>>>
>>>> but it says "Loading: GIS app v24.0.4". Has your fix not made it into
>>>> the latest downloadable war at that location above yet?
>>>>
>>>> Now if I try loading the GIS app in Chrome it works. If I try in
>>>> Firefox, it hangs with the 414 error:
>>>> Request-URI Too Large
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>> On Tue, Jun 27, 2017 at 8:43 AM, Bjørn Sandvik  wrote:
>>>>
>>>>> Hi Lorill,
>>>>>
>>>>> I've pushed a fix for GIS App 2.24, it should display "Loading: GIS
>>>>> app v24.0.5" in the browser console when you start it.
>>>>>
>>>>> Could you please check if it solves your problem?
>>>>>
>>>>> Cheers,
>>>>> Bjørn
>>>>>
>>>>> --
>>>>> Bjørn Sandvik
>>>>> GIS developer, DHIS 2
>>>>> University of Oslo
>>>>> www.dhis2.org
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Jun 23, 2017 at 8:28 PM, Lorill Crees 
>>>>> wrote:
>>>>>
>>>>>> Thanks Bjørn!
>>>>>>
>>>>>> On Fri, Jun 23, 2017 at 2:30 AM, Bjørn Sandvik 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Lorill,
>>>>>>>
>>>>>>> I'm looking into this issue, but it might not be fixed until the
>>>>>>> beginning of next week. I'll keep you updated.
>>>>>>>
>>>>>>> --
>>>>>>> Bjørn Sandvik
>>>>>>> GIS developer, DHIS 2
>>>>>>> University of Oslo
>>>>>>> www.dhis2.org
>>>>>>>
>>>>>>> On Thu, Jun 22, 2017 at 9:06 PM, Lorill Crees 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Jan,
>>>>>>>>
>>>>>>>> I am resurrecting this post as we have upgraded the instance we
>>>>>>>> were having issues with to 2.24. The good news is that this has fixed 
>>>>>>>> the
>>>>>>>> issue on that particular instance.
>>>>>>>>
>&

Re: [Dhis2-devs] GIS App Does Not Load and Just Hangs

2017-06-27 Thread Lorill Crees
Hi Bjørn,

Thanks for this. I've downloaded the war from here:

https://www.dhis2.org/download/releases/2.24/dhis.war

Version:
2.24
Build revision:
381c984
Build date:
2017-06-08 06:21

but it says "Loading: GIS app v24.0.4". Has your fix not made it into the
latest downloadable war at that location above yet?

Now if I try loading the GIS app in Chrome it works. If I try in Firefox,
it hangs with the 414 error:
Request-URI Too Large

Thanks,

Lorill

On Tue, Jun 27, 2017 at 8:43 AM, Bjørn Sandvik  wrote:

> Hi Lorill,
>
> I've pushed a fix for GIS App 2.24, it should display "Loading: GIS app
> v24.0.5" in the browser console when you start it.
>
> Could you please check if it solves your problem?
>
> Cheers,
> Bjørn
>
> --
> Bjørn Sandvik
> GIS developer, DHIS 2
> University of Oslo
> www.dhis2.org
>
>
>
> On Fri, Jun 23, 2017 at 8:28 PM, Lorill Crees  wrote:
>
>> Thanks Bjørn!
>>
>> On Fri, Jun 23, 2017 at 2:30 AM, Bjørn Sandvik  wrote:
>>
>>> Hi Lorill,
>>>
>>> I'm looking into this issue, but it might not be fixed until the
>>> beginning of next week. I'll keep you updated.
>>>
>>> --
>>> Bjørn Sandvik
>>> GIS developer, DHIS 2
>>> University of Oslo
>>> www.dhis2.org
>>>
>>> On Thu, Jun 22, 2017 at 9:06 PM, Lorill Crees  wrote:
>>>
>>>> Hi Jan,
>>>>
>>>> I am resurrecting this post as we have upgraded the instance we were
>>>> having issues with to 2.24. The good news is that this has fixed the issue
>>>> on that particular instance.
>>>>
>>>> The bad news is that the GIS app is broken on another one of our
>>>> instances after the upgrade to 2.24:
>>>>
>>>> Version:
>>>> 2.24
>>>> Build revision:
>>>> 381c984
>>>> Build date:
>>>> 2017-06-08 06:21
>>>>
>>>> The app hangs and has the JS error: 414 Request-URI Too Large. I will
>>>> paste the request post from the JS console that returns this at the end of
>>>> the email, you can see it is also very large. So now instead of a timeout,
>>>> there is just too much data to return.
>>>>
>>>> Would it be possible to provide a fix for this?
>>>>
>>>> Please let me know. Thanks,
>>>>
>>>> Lorill
>>>>
>>>>
>>>> https:///api/optionSets.json?fields=id,displayN
>>>> ame%7Crename(name),version,options%5Bcode,displayName%7Crena
>>>> me(name)%5D&paging=false&filter=id:eq:HsQbnr7frPR&filter=id:
>>>> eq:NWWliV8YUoi&filter=id:eq:zreoYAeL4se&filter=id:eq:
>>>> g3fJGbjclCi&filter=id:eq:V0ZrMeouauu&filter=id:eq:RSa4QWOp1x
>>>> b&filter=id:eq:BJ0xmmX95VH&filter=id:eq:KSykur07poL&
>>>> filter=id:eq:nUs3C54rmxV&filter=id:eq:yhHAPzjqLgI&
>>>> filter=id:eq:Ih9Z8rWENAA&filter=id:eq:vtI4tXH7HG7&
>>>> filter=id:eq:EdNbrrYuuwQ&filter=id:eq:rnEcrvLV6YL&
>>>> filter=id:eq:ePBCSObU4Cg&filter=id:eq:yNOsQc2aJRa&
>>>> filter=id:eq:bdsPqG4rRgZ&filter=id:eq:tVhbOtMluuV&
>>>> filter=id:eq:IJMB1cDaebI&filter=id:eq:NP7zXkFzGmu&
>>>> filter=id:eq:dBNwlgijLQI&filter=id:eq:u0BKCR3ahUW&
>>>> filter=id:eq:hxo643clGqk&filter=id:eq:NJZIi5KxaYM&
>>>> filter=id:eq:w38UzxarInJ&filter=id:eq:rtKSdYiMZXe&
>>>> filter=id:eq:i9eg65FgeIN&filter=id:eq:s8MCwOirWL7&
>>>> filter=id:eq:fngprl59axb&filter=id:eq:Bvy8V3uu9c0&
>>>> filter=id:eq:MOCcP2jU65M&filter=id:eq:rsHdA5zYF5i&
>>>> filter=id:eq:rm9IydKAPf8&filter=id:eq:eXm89TOsG4F&
>>>> filter=id:eq:prxV8RtoG8Z&filter=id:eq:botFSpmMRzP&
>>>> filter=id:eq:JnrAUI9wehq&filter=id:eq:ZaYc0F2yc6H&
>>>> filter=id:eq:dwwAzRpPozI&filter=id:eq:jSpX2AbfsE6&
>>>> filter=id:eq:hplXOdAyYhU&filter=id:eq:rPOZF9lkkTw&
>>>> filter=id:eq:mrmEOF6mRGo&filter=id:eq:CEdbyqb8LWH&
>>>> filter=id:eq:CdmiBEeX5sn&filter=id:eq:k1eHtWP64iy&
>>>> filter=id:eq:PohifpaOIWn&filter=id:eq:c2lm8Upgf4W&
>>>> filter=id:eq:Sp6T8IL5GTP&filter=id:eq:hHtWtVSl6xe&
>>>> filter=id:eq:acriRgW3nqw&filter=id:eq:q2sZ99lX364&
>>>> filter=id:eq:vWGBP1oWfCH&filter=id:eq:DSwzHoodD0h&
>>>> filter=id:eq:OHL6f2vqSsh&filter=id:eq:MYO9

Re: [Dhis2-devs] GIS App Does Not Load and Just Hangs

2017-06-23 Thread Lorill Crees
Thanks Bjørn!

On Fri, Jun 23, 2017 at 2:30 AM, Bjørn Sandvik  wrote:

> Hi Lorill,
>
> I'm looking into this issue, but it might not be fixed until the beginning
> of next week. I'll keep you updated.
>
> --
> Bjørn Sandvik
> GIS developer, DHIS 2
> University of Oslo
> www.dhis2.org
>
> On Thu, Jun 22, 2017 at 9:06 PM, Lorill Crees  wrote:
>
>> Hi Jan,
>>
>> I am resurrecting this post as we have upgraded the instance we were
>> having issues with to 2.24. The good news is that this has fixed the issue
>> on that particular instance.
>>
>> The bad news is that the GIS app is broken on another one of our
>> instances after the upgrade to 2.24:
>>
>> Version:
>> 2.24
>> Build revision:
>> 381c984
>> Build date:
>> 2017-06-08 06:21
>>
>> The app hangs and has the JS error: 414 Request-URI Too Large. I will
>> paste the request post from the JS console that returns this at the end of
>> the email, you can see it is also very large. So now instead of a timeout,
>> there is just too much data to return.
>>
>> Would it be possible to provide a fix for this?
>>
>> Please let me know. Thanks,
>>
>> Lorill
>>
>>
>> https:///api/optionSets.json?fields=id,displayN
>> ame%7Crename(name),version,options%5Bcode,displayName%
>> 7Crename(name)%5D&paging=false&filter=id:eq:HsQbnr7frPR
>> &filter=id:eq:NWWliV8YUoi&filter=id:eq:zreoYAeL4se&
>> filter=id:eq:g3fJGbjclCi&filter=id:eq:V0ZrMeouauu&
>> filter=id:eq:RSa4QWOp1xb&filter=id:eq:BJ0xmmX95VH&
>> filter=id:eq:KSykur07poL&filter=id:eq:nUs3C54rmxV&
>> filter=id:eq:yhHAPzjqLgI&filter=id:eq:Ih9Z8rWENAA&
>> filter=id:eq:vtI4tXH7HG7&filter=id:eq:EdNbrrYuuwQ&
>> filter=id:eq:rnEcrvLV6YL&filter=id:eq:ePBCSObU4Cg&
>> filter=id:eq:yNOsQc2aJRa&filter=id:eq:bdsPqG4rRgZ&
>> filter=id:eq:tVhbOtMluuV&filter=id:eq:IJMB1cDaebI&
>> filter=id:eq:NP7zXkFzGmu&filter=id:eq:dBNwlgijLQI&
>> filter=id:eq:u0BKCR3ahUW&filter=id:eq:hxo643clGqk&
>> filter=id:eq:NJZIi5KxaYM&filter=id:eq:w38UzxarInJ&
>> filter=id:eq:rtKSdYiMZXe&filter=id:eq:i9eg65FgeIN&
>> filter=id:eq:s8MCwOirWL7&filter=id:eq:fngprl59axb&
>> filter=id:eq:Bvy8V3uu9c0&filter=id:eq:MOCcP2jU65M&
>> filter=id:eq:rsHdA5zYF5i&filter=id:eq:rm9IydKAPf8&
>> filter=id:eq:eXm89TOsG4F&filter=id:eq:prxV8RtoG8Z&
>> filter=id:eq:botFSpmMRzP&filter=id:eq:JnrAUI9wehq&
>> filter=id:eq:ZaYc0F2yc6H&filter=id:eq:dwwAzRpPozI&
>> filter=id:eq:jSpX2AbfsE6&filter=id:eq:hplXOdAyYhU&
>> filter=id:eq:rPOZF9lkkTw&filter=id:eq:mrmEOF6mRGo&
>> filter=id:eq:CEdbyqb8LWH&filter=id:eq:CdmiBEeX5sn&
>> filter=id:eq:k1eHtWP64iy&filter=id:eq:PohifpaOIWn&
>> filter=id:eq:c2lm8Upgf4W&filter=id:eq:Sp6T8IL5GTP&
>> filter=id:eq:hHtWtVSl6xe&filter=id:eq:acriRgW3nqw&
>> filter=id:eq:q2sZ99lX364&filter=id:eq:vWGBP1oWfCH&
>> filter=id:eq:DSwzHoodD0h&filter=id:eq:OHL6f2vqSsh&
>> filter=id:eq:MYO9g3kIza1&filter=id:eq:Atgc4RpACma&
>> filter=id:eq:odya6wqSGA4&filter=id:eq:GDRceded1VM&
>> filter=id:eq:dwocU7uH0c3&filter=id:eq:q4CEwx8N9fZ&
>> filter=id:eq:J77ssRrCaiB&filter=id:eq:SOc0IWj6pOj&
>> filter=id:eq:f4rS30tZx6w&filter=id:eq:QEdVicjWosN&
>> filter=id:eq:tsg8rkTIgbO&filter=id:eq:v5mbwTR34Xu&
>> filter=id:eq:yvsMr1TAdiO&filter=id:eq:yQFE92A304g&
>> filter=id:eq:YSfIhzRLcx5&filter=id:eq:V779kOzWZM4&
>> filter=id:eq:PWrx7WTAdeQ&filter=id:eq:HjcDxsYNoF2&
>> filter=id:eq:AFxufVyhOgO&filter=id:eq:FR9d7ym06gB&
>> filter=id:eq:DkwCqXX8WIY&filter=id:eq:Z262xp0gPbe&
>> filter=id:eq:QrqwTLHYQOs&filter=id:eq:h76ekb4GBK0&
>> filter=id:eq:BQsQM9mpAa0&filter=id:eq:Ccy8kbOJAoi&
>> filter=id:eq:xB2rOmtTS4o&filter=id:eq:ETahPRNE2nx&
>> filter=id:eq:BQaKT4QmcBQ&filter=id:eq:SIo9KfmASeW&
>> filter=id:eq:BwedSzl8jE6&filter=id:eq:QVsIPjoWEL3&
>> filter=id:eq:ItHBehEobfm&filter=id:eq:HGckLdR9kn6&
>> filter=id:eq:XDufuSUP9vp&filter=id:eq:rolNofRTM98&
>> filter=id:eq:LbU0jVHF8mQ&filter=id:eq:QIcPddXA8vS&
>> filter=id:eq:cyf2ls7j8w6&filter=id:eq:HkcqU6ycKyX&
>> filter=id:eq:L6VSS9CqIDX&filter=id:eq:JneyfZ4R0N9&
>> filter=id:eq:MIuqzA3GkeM&filter=id:eq:IVpZ3OhCT3K&
>> filter=id:eq:z4DjgmlS0TS&filter=id:eq:Vj6PlOd7k2F&
>> filter=id:eq:kb5Y9rnyg5R&

Re: [Dhis2-devs] GIS App Does Not Load and Just Hangs

2017-06-22 Thread Lorill Crees
=id:eq:vBfcio3Ib1J&filter=id:eq:ZJ36eBmuQTT&filter=id:eq:LuoXsGriKEK&filter=id:eq:Byg40UFJ5CQ&filter=id:eq:SAkoJ13xKfV&filter=id:eq:biDlYooimOX&filter=id:eq:vETDZfGX9PL&filter=id:eq:E7aEdkzp6V7&filter=id:eq:xZpJ3TMBQKu&filter=id:eq:oaRW6lVx2K9&filter=id:eq:Sth1UZpGVJK&filter=id:eq:e0RiYLnTxH2&filter=id:eq:zLVVBXCxI8d&filter=id:eq:g2N8ZNK5wJk&filter=id:eq:AdukEGiWpGf&filter=id:eq:W0PcFeBwCoZ&filter=id:eq:uE5Z1IexQx7&filter=id:eq:flXoMB7H8d1&filter=id:eq:OcwdSf9YjeD&filter=id:eq:H1HqL3EmEEq&filter=id:eq:Nug1oM8zgzf&filter=id:eq:tVKKqa9Nh0x&filter=id:eq:WfVI4dqojQ0&filter=id:eq:U9dcLrNszdU&filter=id:eq:nCRvx0p2JVp&filter=id:eq:FmELUc6p7qQ&filter=id:eq:KxvTLfD0LlW&filter=id:eq:m2WCB7k5nsL&filter=id:eq:bPYqQFVOcbv&filter=id:eq:eZoLIdxmsOy&filter=id:eq:JDMASb3D5JC&filter=id:eq:IKkN9aVjZKX&filter=id:eq:XeHUy9RMzdf&filter=id:eq:GrgOjMFCLUY&filter=id:eq:r7k6CxmU8hW&filter=id:eq:sAj0ryrNk5E&filter=id:eq:SfSt2GeyCXD&filter=id:eq:ZOqZORcgk2H&filter=id:eq:dINlTx28ck5&filter=id:eq:c8ljYlvPq01&filter=id:eq:KDFK4JGjUM6&filter=id:eq:L5Hi1HaqMdN&filter=id:eq:twnjdq6TyIn&filter=id:eq:ShSRoURZFdF&filter=id:eq:a09gxhqz0OE&filter=id:eq:X0SBla7jhvX&filter=id:eq:MnIU6L0P7m6&filter=id:eq:a3hn49r6d2W&filter=id:eq:HzrMZDfxPj1&filter=id:eq:vMQ1Odsrzzv&filter=id:eq:c71j7xTSNEj&filter=id:eq:feJWn8mYTFx&filter=id:eq:Sl4upvE5PyF&filter=id:eq:RVMTaCLmbrJ&filter=id:eq:P3jToUnmCO2&filter=id:eq:Tnu1At6D2x9&filter=id:eq:RLGcPTBlng4&filter=id:eq:XJ3LpTb2FyV&filter=id:eq:cBPm81P01U8&filter=id:eq:oR8N6emBk1m&filter=id:eq:pyCa3jj2c9n&filter=id:eq:j1aBuYVNeV0&filter=id:eq:JHOTcOoDTdp&filter=id:eq:diX5PZXihCX&filter=id:eq:G7TBWkt8qx2&filter=id:eq:HgoeRaEZwB0&filter=id:eq:cR3AiYnizfQ&filter=id:eq:W2nw9tK7GrB&filter=id:eq:xUsAogYven8&filter=id:eq:yXRLF9uUXJX&filter=id:eq:bsdUIoLxeKp&filter=id:eq:AhsXogvqQgS&filter=id:eq:gKAnDE88JQc&filter=id:eq:KwHBsGCmSZD&filter=id:eq:Apr5pkVuK0N&filter=id:eq:l5rKFLheZoU&filter=id:eq:FgPw6syNJSS&filter=id:eq:LpakQb3ctAZ&filter=id:eq:Fe2OPBlhvuJ&filter=id:eq:IouTNn5QPVY&filter=id:eq:qqjXfp9EQVs&filter=id:eq:tBnS4a0mMzG&filter=id:eq:Kw5iSaMwig9&filter=id:eq:ScDOfAX7R7c&filter=id:eq:S5IcJE20XrG&filter=id:eq:w37dq0HfbEc&filter=id:eq:WENxiQw3HLp&filter=id:eq:N1ZHUI5L306&filter=id:eq:TIchwIlUBLf&filter=id:eq:sB8MjRVU1m4&filter=id:eq:dn9NcUX7xbi&filter=id:eq:NVgodFciHPh&filter=id:eq:oGErUs5LBdM&filter=id:eq:FtRBwpxrZMW&filter=id:eq:Wt6EI9FxDrQ&filter=id:eq:MsETDk41syb&filter=id:eq:bGyxKZXzIQt&filter=id:eq:VoCefbZysNd&filter=id:eq:PJ8AtHnjzIM&filter=id:eq:lO1kX50ZZdi&filter=id:eq:YRiImtW9cbk&filter=id:eq:jOKnVcymmy5&filter=id:eq:ZkwzdKCJI6O&filter=id:eq:bvGMx1dr9o0&filter=id:eq:Mt48GPmgqa6&filter=id:eq:LH91MJxpZOg&filter=id:eq:vvgOc5u55x6&filter=id:eq:U5y8YBoQNX4&filter=id:eq:I9VHW8451Ae&filter=id:eq:jG41zDNI4D2&filter=id:eq:d0lMBuH2nkz&filter=id:eq:gNDoMCAj3z6&filter=id:eq:MXAeVbNrVCV&filter=id:eq:fD2IxhF9Qqo&filter=id:eq:WNXBNcS2KHF&filter=id:eq:C8yA7cUHCTa&filter=id:eq:EEvT3R7oLkj&filter=id:eq:geCowY9YUOG&filter=id:eq:bEdWGFW0bwh&filter=id:eq:EO2Qfqmzoas&filter=id:eq:KbfTOMzZvLM&filter=id:eq:Zdis0Mmpcei&filter=id:eq:AdOSaQFdEK1&filter=id:eq:TANoOxhdrkH&filter=id:eq:UyPbdZvtF9A&filter=id:eq:Xn47G1igAQe&filter=id:eq:XRsvqzWuE4r&filter=id:eq:iNhgv2chtW9&filter=id:eq:AypCCnndf5I&filter=id:eq:MJuyjt3uKBt&filter=id:eq:bXA7EcGDrV7&filter=id:eq:Piue6t3KpQa&filter=id:eq:HKyHhGACBMo&filter=id:eq:QDItYjEcmgn&filter=id:eq:UrFbzUEAHqM&filter=id:eq:U8M9h6bdBZ6&filter=id:eq:GA4EkeBpRJL&filter=id:eq:DgYHaRddkNh&filter=id:eq:E37dhcxE1Ph&filter=id:eq:AlZ83zlsj3F&filter=id:eq:g2gntwtNaho&filter=id:eq:sWSnHGEHtFr&filter=id:eq:bawIcNe1T4k&filter=id:eq:KjH8WlmYWdV&filter=id:eq:pEPVt9v4HaM&filter=id:eq:DBhJz6VDIKb&filter=id:eq:vqrJdbxqLMA&filter=id:eq:Xym0UFhmCCg&filter=id:eq:N6CXLFwEqzK&filter=id:eq:QKYDYcilBYY&filter=id:eq:hNrotVJxCCS&filter=id:eq:xULARuuq3GB&filter=id:eq:GioHyjxdEDp&filter=id:eq:d6MmeQtMBIW&filter=id:eq:IerPVOlkMjv&filter=id:eq:ph7i23UtIXX&filter=id:eq:GBMcr0bg2pj&filter=id:eq:EDGRpmd6qv8&filter=id:eq:haJtVF1MNwx&filter=id:eq:kaSqFrTBYrd&filter=id:eq:AN8FTIACeRD&filter=id:eq:l3yXUMz5UgT&filter=id:eq:YA7ucrkJHpG&filter=id:eq:wH13kAssXvS&filter=id:eq:vmd5XC0nfd1&filter=id:eq:fNs58YoKNtZ&filter=id:eq:FghF6JyNzHq&filter=id:eq:BZpNRDPeRpn&filter=id:eq:VSVqcKwiS9Y&filter=id:eq:JK1A9m2Q4lc&filter=id:eq:mNUeA5SpBgq&filter=id:eq:aqwBudyNGwZ&filter=id:eq:h3lLf

Re: [Dhis2-devs] Deletion of Program and all associated objects via API v 2.25

2017-06-02 Thread Lorill Crees
Hi,

Jason - thanks for heading me in the right direction for this. I'm now
looping through and deleting all related maps, charts, reportTables,
eventReports and eventCharts, and dashboard items. I know this sounds
dangerous, but the programs that the users are deleting are all either test
data or corrupt data, so keeping those artifacts around is counter
productive for them.

I'm now looking for guidance from the broader group as per my original
email of if there are other objects that I would need to take into
consideration. I'm doing this on a trial-and-error basis but there may be
some pieces of DHIS 2 functionality I haven't used that could potentially
cause deletion errors.

Please let me know if anyone has any advice.

Thanks,

Lorill

On Tue, May 30, 2017 at 12:29 PM, Lorill Crees  wrote:

> Hi Jason,
>
> Thanks for the tips. We have already developed a custom data import app in
> Grails, and have now already incorporated virtually all of the deletion
> functionality for both Data Sets and Programs via the Web API. The
> availability of this functionality via the web app is pretty key to the
> users of our system, and functionality introduced for event and tracked
> entity instance deletion in version 2.25 seemed to be the missing piece to
> make this possible.
>
> We have been told that it is not really viable for the users' workflow to
> request an administrator to delete via sql queries, although agreed it may
> be the more prudent option in regards to preventing mistakes. This approach
> was rejected by our users.
>
> That said, I'll take a look at the reportTables endpoint to see if that
> can help. If not, the users may just need to do some manual deletion steps
> via the DHIS 2 UI prior to deleting via our app, which would not be ideal.
>
> Thanks again for your help,
>
> Lorill
>
> On Tue, May 30, 2017 at 11:56 AM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> Hi Lorill,
>> I am not too sure off-hand exactly how to do that. I  suppose maybe you
>> could loop through all of the available report tables or craft an API query
>> to determine which report tables and other artifacts need to be deleted.
>> These should be available through a report tables endpoint like
>> https://play.dhis2.org/dev/api/reportTables/qfMh2IjOxvw
>>
>> I adopted a slightly different route, and created an SQL function to
>> delete any trace of an organisation unit, simply because it was much
>> easier. This approach is of course also problematic, but you might want to
>> consider for efficiencies sake this approach. You can find an
>> implementation here for orgunits (https://github.com/dhis2/dhis
>> 2-utils/blob/master/resources/sql/delete_site_with_data.sql) but I think
>> something similar could be developed for a program.
>>
>> Of course, this probably should be easier, but there is also some
>> downside to making this operation too easy, as one false move could result
>> in the deletion of a lot of artifacts. Thus, having an SQL function which
>> can only be  run by an administrator, may be in fact an attractive option
>> to minimize the possibility of a mistake.
>>
>> Regards,
>> Jason
>>
>>
>> On Tue, May 30, 2017 at 5:42 PM, Lorill Crees  wrote:
>>
>>> Hi Jason,
>>>
>>> How can I programatically determine this via the Web API? Are
>>> DataDimensionItems related to favourites? If so, I had asked the dev list
>>> about the querying and deletion of favourites via the Web API back in
>>> February and had created these three JIRA tasks:
>>>
>>> https://jira.dhis2.org/browse/DHIS2-1174 - Show more meaningful message
>>> to user when a favourite cannot be loaded due to missing data elements
>>> https://jira.dhis2.org/browse/DHIS2-1175 - Add ability to query for
>>> Favourites by their corresponding data elements and indicators via the
>>> API
>>> https://jira.dhis2.org/browse/DHIS2-1176 - Add ability to delete
>>> Favourites via the API
>>>
>>> From my limited testing it looked like the inclusion in a favourite
>>> didn't prevent the deletion of data elements, but only made the favourite
>>> invalid.
>>>
>>> Any other help on this issue would be appreciated as I'm now blocked in
>>> being able to complete the functionality to delete programs.
>>>
>>> Thanks,
>>>
>>> Lorill
>>>
>>> On Tue, May 30, 2017 at 12:02 AM, Jason Pickering <
>>> jason.p.picker...@gmail.com> wrote:
>>>
>>>> Hi Lorill,
>>>>
>>>> Is the data e

Re: [Dhis2-devs] Deletion of Program and all associated objects via API v 2.25

2017-05-30 Thread Lorill Crees
Hi Jason,

Thanks for the tips. We have already developed a custom data import app in
Grails, and have now already incorporated virtually all of the deletion
functionality for both Data Sets and Programs via the Web API. The
availability of this functionality via the web app is pretty key to the
users of our system, and functionality introduced for event and tracked
entity instance deletion in version 2.25 seemed to be the missing piece to
make this possible.

We have been told that it is not really viable for the users' workflow to
request an administrator to delete via sql queries, although agreed it may
be the more prudent option in regards to preventing mistakes. This approach
was rejected by our users.

That said, I'll take a look at the reportTables endpoint to see if that can
help. If not, the users may just need to do some manual deletion steps via
the DHIS 2 UI prior to deleting via our app, which would not be ideal.

Thanks again for your help,

Lorill

On Tue, May 30, 2017 at 11:56 AM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Hi Lorill,
> I am not too sure off-hand exactly how to do that. I  suppose maybe you
> could loop through all of the available report tables or craft an API query
> to determine which report tables and other artifacts need to be deleted.
> These should be available through a report tables endpoint like
> https://play.dhis2.org/dev/api/reportTables/qfMh2IjOxvw
>
> I adopted a slightly different route, and created an SQL function to
> delete any trace of an organisation unit, simply because it was much
> easier. This approach is of course also problematic, but you might want to
> consider for efficiencies sake this approach. You can find an
> implementation here for orgunits (https://github.com/dhis2/
> dhis2-utils/blob/master/resources/sql/delete_site_with_data.sql) but I
> think something similar could be developed for a program.
>
> Of course, this probably should be easier, but there is also some downside
> to making this operation too easy, as one false move could result in the
> deletion of a lot of artifacts. Thus, having an SQL function which can only
> be  run by an administrator, may be in fact an attractive option to
> minimize the possibility of a mistake.
>
> Regards,
> Jason
>
>
> On Tue, May 30, 2017 at 5:42 PM, Lorill Crees  wrote:
>
>> Hi Jason,
>>
>> How can I programatically determine this via the Web API? Are
>> DataDimensionItems related to favourites? If so, I had asked the dev list
>> about the querying and deletion of favourites via the Web API back in
>> February and had created these three JIRA tasks:
>>
>> https://jira.dhis2.org/browse/DHIS2-1174 - Show more meaningful message
>> to user when a favourite cannot be loaded due to missing data elements
>> https://jira.dhis2.org/browse/DHIS2-1175 - Add ability to query for
>> Favourites by their corresponding data elements and indicators via the
>> API
>> https://jira.dhis2.org/browse/DHIS2-1176 - Add ability to delete
>> Favourites via the API
>>
>> From my limited testing it looked like the inclusion in a favourite
>> didn't prevent the deletion of data elements, but only made the favourite
>> invalid.
>>
>> Any other help on this issue would be appreciated as I'm now blocked in
>> being able to complete the functionality to delete programs.
>>
>> Thanks,
>>
>> Lorill
>>
>> On Tue, May 30, 2017 at 12:02 AM, Jason Pickering <
>> jason.p.picker...@gmail.com> wrote:
>>
>>> Hi Lorill,
>>>
>>> Is the data element linked to a chart, pivot or map?
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>> On Mon, May 29, 2017 at 9:58 PM, Lorill Crees  wrote:
>>>
>>>> Hi,
>>>>
>>>> Further to this, for some of our programs we are unable to delete
>>>> programdataelements via the Web API due to the following error:
>>>>
>>>> ERROR: update or delete on table "programdataelement" violates foreign
>>>> key constraint "fk_datadimensionitem_programdataelementid" on table
>>>> "datadimensionitem" Detail: Key (programdataelementid)=(541878) is
>>>> still referenced from table "datadimensionitem".
>>>>
>>>> What do I need to do to be able to delete these programdataelements? I
>>>> have already deleted all the events and tracked entity instances prior to
>>>> deleting programdataelements. I have even tried rerunning analytics prior
>>>> to deleting.
>>>>
>>>> Please let me know. Thanks,
>>>>
>>>> L

Re: [Dhis2-devs] Deletion of Program and all associated objects via API v 2.25

2017-05-30 Thread Lorill Crees
Hi Jason,

How can I programatically determine this via the Web API? Are
DataDimensionItems related to favourites? If so, I had asked the dev list
about the querying and deletion of favourites via the Web API back in
February and had created these three JIRA tasks:

https://jira.dhis2.org/browse/DHIS2-1174 - Show more meaningful message to
user when a favourite cannot be loaded due to missing data elements
https://jira.dhis2.org/browse/DHIS2-1175 - Add ability to query for
Favourites by their corresponding data elements and indicators via the API
https://jira.dhis2.org/browse/DHIS2-1176 - Add ability to delete Favourites via
the API

>From my limited testing it looked like the inclusion in a favourite didn't
prevent the deletion of data elements, but only made the favourite invalid.

Any other help on this issue would be appreciated as I'm now blocked in
being able to complete the functionality to delete programs.

Thanks,

Lorill

On Tue, May 30, 2017 at 12:02 AM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Hi Lorill,
>
> Is the data element linked to a chart, pivot or map?
>
> Regards,
> Jason
>
>
> On Mon, May 29, 2017 at 9:58 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> Further to this, for some of our programs we are unable to delete
>> programdataelements via the Web API due to the following error:
>>
>> ERROR: update or delete on table "programdataelement" violates foreign
>> key constraint "fk_datadimensionitem_programdataelementid" on table
>> "datadimensionitem" Detail: Key (programdataelementid)=(541878) is still
>> referenced from table "datadimensionitem".
>>
>> What do I need to do to be able to delete these programdataelements? I
>> have already deleted all the events and tracked entity instances prior to
>> deleting programdataelements. I have even tried rerunning analytics prior
>> to deleting.
>>
>> Please let me know. Thanks,
>>
>> Lorill
>>
>> On Fri, May 26, 2017 at 2:33 PM, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> We have been working on functionality to delete full Programs and all
>>> associated data and metadata via the Web API using:
>>>
>>> Version:
>>> 2.25
>>> Build revision:
>>> ee7e61b
>>> Build date:
>>> 2017-05-19 12:47
>>>
>>> The instance being used is assuming that attributes and data elements
>>> are specific to a particular program/program stage and will not be reused
>>> across programs.
>>>
>>> I wanted to check to see if there are any other objects we need to worry
>>> about for deletion that we may be missing.
>>>
>>> This is our methodology in order of execution, all via the Web API:
>>>
>>>1. Delete Program and Program Stage Data
>>>   1. delete all program stage events
>>>   2. delete all tracked entity instances
>>>2. Delete Program and Program Stage Metadata
>>>   1. delete all related program indicators
>>>   2. delete all related program rules
>>>   3. delete all related program rule variables (I'm not sure why
>>>   these aren't deleted automatically via the program rule deletion)
>>>   4. delete programDataElements (is it correct that these are
>>>   generated by analytics?)
>>>   5. delete all related indicators for programStage data elements
>>>   6. delete underlying data elements
>>>   7. delete related option sets and related options
>>>   8. delete programTrackedEntityAttributes
>>>   9. delete related trackedEntityAttributes
>>>   10. delete related option sets and related options
>>>3. Delete Program and Program Stages
>>>   1. delete program stages
>>>   2. unassign program from all user roles (we note that the dataset
>>>   deletion API call takes care of this step but the program deletion 
>>> API call
>>>   doesn't and throws an error if we miss this step)
>>>   3. delete program
>>>
>>> I see some things in the program payload such as:
>>>
>>>- "notificationTemplates": [],
>>>- "translations": [],
>>>- "userGroupAccesses": [],
>>>- "attributeValues": [],
>>>- "validationCriterias": [],
>>>
>>> Do any of these need to be explicitly deleted in order to delete a
>>> program or will they cascade? Are there any other associated objects I
>>> haven'

Re: [Dhis2-devs] Deletion of Program and all associated objects via API v 2.25

2017-05-29 Thread Lorill Crees
Hi,

Further to this, for some of our programs we are unable to delete
programdataelements via the Web API due to the following error:

ERROR: update or delete on table "programdataelement" violates foreign key
constraint "fk_datadimensionitem_programdataelementid" on table
"datadimensionitem" Detail: Key (programdataelementid)=(541878) is still
referenced from table "datadimensionitem".

What do I need to do to be able to delete these programdataelements? I have
already deleted all the events and tracked entity instances prior to
deleting programdataelements. I have even tried rerunning analytics prior
to deleting.

Please let me know. Thanks,

Lorill

On Fri, May 26, 2017 at 2:33 PM, Lorill Crees  wrote:

> Hi,
>
> We have been working on functionality to delete full Programs and all
> associated data and metadata via the Web API using:
>
> Version:
> 2.25
> Build revision:
> ee7e61b
> Build date:
> 2017-05-19 12:47
>
> The instance being used is assuming that attributes and data elements are
> specific to a particular program/program stage and will not be reused
> across programs.
>
> I wanted to check to see if there are any other objects we need to worry
> about for deletion that we may be missing.
>
> This is our methodology in order of execution, all via the Web API:
>
>1. Delete Program and Program Stage Data
>   1. delete all program stage events
>   2. delete all tracked entity instances
>2. Delete Program and Program Stage Metadata
>   1. delete all related program indicators
>   2. delete all related program rules
>   3. delete all related program rule variables (I'm not sure why
>   these aren't deleted automatically via the program rule deletion)
>   4. delete programDataElements (is it correct that these are
>   generated by analytics?)
>   5. delete all related indicators for programStage data elements
>   6. delete underlying data elements
>   7. delete related option sets and related options
>   8. delete programTrackedEntityAttributes
>   9. delete related trackedEntityAttributes
>   10. delete related option sets and related options
>3. Delete Program and Program Stages
>   1. delete program stages
>   2. unassign program from all user roles (we note that the dataset
>   deletion API call takes care of this step but the program deletion API 
> call
>   doesn't and throws an error if we miss this step)
>   3. delete program
>
> I see some things in the program payload such as:
>
>- "notificationTemplates": [],
>- "translations": [],
>- "userGroupAccesses": [],
>- "attributeValues": [],
>- "validationCriterias": [],
>
> Do any of these need to be explicitly deleted in order to delete a program
> or will they cascade? Are there any other associated objects I haven't
> mentioned that we need to delete? So far we've been implementing on a trial
> and error basis.
>
> Please let me know if there are any other considerations we should be
> incorporating into our logic.
>
> Thanks,
>
> Lorill
> --
> Lorill Crees
> Project Leader / Senior Developer
> 2Paths Solutions Ltd. <http://www.2paths.com>
>
> lcr...@2paths.com
> skype: lorill2paths
> (604) 689-4123 x 15 <(604)%20689-4123>
>



-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Deletion of Data Set and all associated objects via API v 2.25

2017-05-26 Thread Lorill Crees
Hi,

Further to my other email thread regarding Program deletion, we have been
working on functionality to delete full Data Sets and all associated data
and metadata via the Web API using:

Version:
2.25
Build revision:
ee7e61b
Build date:
2017-05-19 12:47

The instance being used is assuming that data elements are specific to a
particular data set and will not be reused across data sets.

This is our methodology in order of execution, all via the Web API:

   1. Delete Data Set Data
  1. iterate through all associated data elements and use the
  /maintenance/dataPruning/dataElements functionality
   2. Delete Data Set Metadata
  1. delete all related indictors for data set data elements
  2. delete related data elements
  3. delete related category option combos / category combos
   3. Delete Data Set
  1. delete data set

I see some things in the data set payload such as:

   - "translations": [],
   - "userGroupAccesses": [],
   - "attributeValues": [],
   - "sections": [],
   - "compulsoryDataElementOperands": [],

Do any of these need to be explicitly deleted in order to delete a data set
or will they cascade? Are there any other associated objects I haven't
mentioned that we need to delete? So far we've been implementing on a trial
and error basis.

Please let me know if there are any other considerations we should be
incorporating into our logic.

Thanks,

Lorill

-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Deletion of Program and all associated objects via API v 2.25

2017-05-26 Thread Lorill Crees
Hi,

We have been working on functionality to delete full Programs and all
associated data and metadata via the Web API using:

Version:
2.25
Build revision:
ee7e61b
Build date:
2017-05-19 12:47

The instance being used is assuming that attributes and data elements are
specific to a particular program/program stage and will not be reused
across programs.

I wanted to check to see if there are any other objects we need to worry
about for deletion that we may be missing.

This is our methodology in order of execution, all via the Web API:

   1. Delete Program and Program Stage Data
  1. delete all program stage events
  2. delete all tracked entity instances
   2. Delete Program and Program Stage Metadata
  1. delete all related program indicators
  2. delete all related program rules
  3. delete all related program rule variables (I'm not sure why these
  aren't deleted automatically via the program rule deletion)
  4. delete programDataElements (is it correct that these are generated
  by analytics?)
  5. delete all related indicators for programStage data elements
  6. delete underlying data elements
  7. delete related option sets and related options
  8. delete programTrackedEntityAttributes
  9. delete related trackedEntityAttributes
  10. delete related option sets and related options
   3. Delete Program and Program Stages
  1. delete program stages
  2. unassign program from all user roles (we note that the dataset
  deletion API call takes care of this step but the program
deletion API call
  doesn't and throws an error if we miss this step)
  3. delete program

I see some things in the program payload such as:

   - "notificationTemplates": [],
   - "translations": [],
   - "userGroupAccesses": [],
   - "attributeValues": [],
   - "validationCriterias": [],

Do any of these need to be explicitly deleted in order to delete a program
or will they cascade? Are there any other associated objects I haven't
mentioned that we need to delete? So far we've been implementing on a trial
and error basis.

Please let me know if there are any other considerations we should be
incorporating into our logic.

Thanks,

Lorill
-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Aggregation type for Tracker Data Elements

2017-05-18 Thread Lorill Crees
Hi Lars,

Oops, I guess I picked a bad example. The one in our system is a number,
not a date. Here is another example that is not a date on play.dhis2.org:

https://play.dhis2.org/release2/dhis-web-maintenance/#/edit/dataElementSection/dataElement/qrur9Dvnyt5?_k=hytru7

Thanks,

Lorill


On Thu, May 18, 2017 at 7:39 AM, Lars Helge Øverland  wrote:

> Hi Lorill,
>
> that is in fact not related to the domain type, rather we do not support
> aggregation of dates / data element of date value type, and so we disable
> the aggregation type selector.
>
> regards,
>
>
> Lars
>
>
> On Thu, May 18, 2017 at 4:35 PM, Lorill Crees  wrote:
>
>> Hi Lars and Markus,
>>
>> Sorry, I forgot to include the version details:
>>
>> Version:
>> 2.24
>> Build revision:
>> 89234f1
>> Build date:
>> 2017-03-13 06:20
>>
>> And yes, I am able to recreate on play.dhis2.org:
>> https://play.dhis2.org/release2/dhis-web-maintenance/#/edit/
>> dataElementSection/dataElement/eMyVanycQSC?_k=ljbncw
>>
>> Note that AggregationType says "None" and does not allow modification.
>>
>> In the meantime I will try upgrading to the latest 2.24 build and try it
>> out.
>>
>> Thanks,
>>
>> Lorill
>>
>> On Thu, May 18, 2017 at 2:00 AM, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Lorill,
>>>
>>> I think this has been fixed, please try to upgrade to latest build of
>>> your stable version (which is it?).
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>> On Thu, May 18, 2017 at 10:57 AM, Markus Bekken 
>>> wrote:
>>>
>>>> Hi!
>>>> Which version of Dhis are you using? Can you reproduce on
>>>> play.dhis2.org?
>>>>
>>>> Markus
>>>>
>>>> 16. mai 2017 kl. 20.44 skrev Lorill Crees :
>>>>
>>>> Hi,
>>>>
>>>> We have program stage data elements of type integer for year and for
>>>> month that show up as sums when visualizing in the pivot table. I see that
>>>> going in to edit the Data Elements, that changing the Aggregation Type is
>>>> disabled for Data Elements of type Tracker.
>>>>
>>>> How can we change the aggregation type to be average, so the year and
>>>> month will show up properly in the pivot table instead of summed?
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>> --
>>>> Lorill Crees
>>>> Project Leader / Senior Developer
>>>> 2Paths Solutions Ltd. <http://www.2paths.com/>
>>>>
>>>> lcr...@2paths.com
>>>> skype: lorill2paths
>>>> (604) 689-4123 x 15 <(604)%20689-4123>
>>>> ___
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to : dhis2-devs@lists.launchpad.net
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>>
>>>> ___
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to : dhis2-devs@lists.launchpad.net
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> l...@dhis2.org
>>> http://www.dhis2.org <https://www.dhis2.org/>
>>>
>>>
>>
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>
>> lcr...@2paths.com
>> skype: lorill2paths
>> (604) 689-4123 x 15 <(604)%20689-4123>
>>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org <https://www.dhis2.org/>
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Aggregation type for Tracker Data Elements

2017-05-18 Thread Lorill Crees
Hi Lars and Markus,

Sorry, I forgot to include the version details:

Version:
2.24
Build revision:
89234f1
Build date:
2017-03-13 06:20

And yes, I am able to recreate on play.dhis2.org:
https://play.dhis2.org/release2/dhis-web-maintenance/#/edit/dataElementSection/dataElement/eMyVanycQSC?_k=ljbncw

Note that AggregationType says "None" and does not allow modification.

In the meantime I will try upgrading to the latest 2.24 build and try it
out.

Thanks,

Lorill

On Thu, May 18, 2017 at 2:00 AM, Lars Helge Øverland  wrote:

> Hi Lorill,
>
> I think this has been fixed, please try to upgrade to latest build of your
> stable version (which is it?).
>
> regards,
>
> Lars
>
>
> On Thu, May 18, 2017 at 10:57 AM, Markus Bekken  wrote:
>
>> Hi!
>> Which version of Dhis are you using? Can you reproduce on play.dhis2.org?
>>
>> Markus
>>
>> 16. mai 2017 kl. 20.44 skrev Lorill Crees :
>>
>> Hi,
>>
>> We have program stage data elements of type integer for year and for
>> month that show up as sums when visualizing in the pivot table. I see that
>> going in to edit the Data Elements, that changing the Aggregation Type is
>> disabled for Data Elements of type Tracker.
>>
>> How can we change the aggregation type to be average, so the year and
>> month will show up properly in the pivot table instead of summed?
>>
>> Thanks,
>>
>> Lorill
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com/>
>>
>> lcr...@2paths.com
>> skype: lorill2paths
>> (604) 689-4123 x 15 <(604)%20689-4123>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org <https://www.dhis2.org/>
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Aggregation type for Tracker Data Elements

2017-05-16 Thread Lorill Crees
Hi,

We have program stage data elements of type integer for year and for month
that show up as sums when visualizing in the pivot table. I see that going
in to edit the Data Elements, that changing the Aggregation Type is
disabled for Data Elements of type Tracker.

How can we change the aggregation type to be average, so the year and month
will show up properly in the pivot table instead of summed?

Thanks,

Lorill

-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Exception when importing User and User Role metadata in 2.24

2017-03-31 Thread Lorill Crees
Hi there,

In addition to the below import issues, now it seems that the passwords
have not been imported correctly so nobody can log in. The password hashes
in the old database are the same hashes that are contained in the password
xml field in the exported file. However, when the file is imported into the
system, the password hashes are not copied but are completely different in
the user objects created.

Is it the import process maybe taking a hash of the hash? Is this expected
behaviour?

In order to fix this I had to do a sql dump of the old user table, copy it
to the new database, then do a join to update the passwords of the users in
the new database.

Do you have any advice here of what I should be doing to export users from
one instance to populate a new empty instance, without having to do all
these workarounds?

Thanks,

Lorill

On Thu, Mar 30, 2017 at 2:20 PM, Lorill Crees  wrote:

> Hi,
>
> I have tracked this down. In the User xml object, within the embedded
> UserCredentials object, there is an embedded User object. It appears this
> "user" object is meant to be the user that created the UserCredentials.
>
> In some of the entries, it is the user itself that is contained in the
> embedded instance. In other entries, it contains a user that is elsewhere
> in the xml file to be imported.
>
> In order to allow the import to run without exceptions, I need to either
> delete this embedded user object, or change it to a user that already
> exists in the system prior to the import.
>
> I basically have to delete all the embedded User objects, import the file,
> then revert the deletion, and import the file again as an update.
>
> Below is an example of what is being exported.
>
> Is this expected behaviour? Is there any way that these cases can be
> handled by the app, and not throw an exception? I am doing a straight
> export from one instance to another, both of which are running the same
> DHIS 2 version and build.
>
> Thanks,
>
> Lorill
>
>
> 
> http://dhis2.org/schema/dxf/2.0";
> created="2017-03-30T20:22:15.342+">
> 
>  lastUpdated="2015-06-07T11:59:59.183+"
>   id="UomqXpvKh8M">
> false
> xxx
> xxx
> x...@gmail.com
>  created="2015-06-07T11:59:59.033+"
>  lastUpdated="2016-04-04T21:06:22.000+"
> id="B8sCr5nOWro">
> false
> * *  lastUpdated="2015-06-07T11:59:59.183+"
> id="UomqXpvKh8M">*
> *false*
> **
> xxx
> false
> $2a$10$.nZpxupXABUpy3RNpAl.
> 8uSg2OSsnZgxtSHKDTwjhTTPprSZ5W3vK
> 2015-06-07T11:59:59.034+ passwordLastUpdated>
> 2015-12-22T13:35:41.507+
> false
> false
> false
> 
>  created="2015-05-04T13:43:25.507+"
>   lastUpdated="2017-03-08T22:03:03.771+"
> id="cjBTUmG9C9K">
> false
> 
>lastUpdated="2015-06-02T20:16:52.617+"
> id="BcLOMAHqNDV">
> false
> 
> 
> 
> 
> 
>  created="2013-06-10T18:34:22.000+"
>   lastUpdated="2016-02-18T21:28:15.763+"
> id="lZsCb6y0KDX">
> false
> 
> 
> 
>  created="2013-06-10T18:34:22.000+"
>       
> lastUpdated="2016-02-18T21:28:15.763+"
> id="lZsCb6y0KDX">
> false
> 
> 
> 
>
> 
>
> On Wed, Mar 29, 2017 at 1:42 AM, Marc Garnica 
> wrote:
>
>> I assume you are not importing the user with which you are logged in,
>> right? This might be the reason.. If not I don't have any clear idea.
>>
>> Marc Garnica
>>
>> 2017-03-29 0:56 GMT+02:00 Lorill Crees :
>>
>>> Hi,
>>>
>>> I am attempting to set up a new empty 2.24 database and populate it with
>>> an export of Org units and Users and User Roles from a different 2.24
>>> database. I exported in xml format, with 2 separate export files for:
>>&g

Re: [Dhis2-devs] Exception when importing User and User Role metadata in 2.24

2017-03-30 Thread Lorill Crees
Hi,

I have tracked this down. In the User xml object, within the embedded
UserCredentials object, there is an embedded User object. It appears this
"user" object is meant to be the user that created the UserCredentials.

In some of the entries, it is the user itself that is contained in the
embedded instance. In other entries, it contains a user that is elsewhere
in the xml file to be imported.

In order to allow the import to run without exceptions, I need to either
delete this embedded user object, or change it to a user that already
exists in the system prior to the import.

I basically have to delete all the embedded User objects, import the file,
then revert the deletion, and import the file again as an update.

Below is an example of what is being exported.

Is this expected behaviour? Is there any way that these cases can be
handled by the app, and not throw an exception? I am doing a straight
export from one instance to another, both of which are running the same
DHIS 2 version and build.

Thanks,

Lorill



http://dhis2.org/schema/dxf/2.0";
created="2017-03-30T20:22:15.342+">


false
xxx
xxx
x...@gmail.com

false
**
*false*
**
xxx
false

$2a$10$.nZpxupXABUpy3RNpAl.8uSg2OSsnZgxtSHKDTwjhTTPprSZ5W3vK

2015-06-07T11:59:59.034+
2015-12-22T13:35:41.507+
false
false
false


false


false






false




false



   


On Wed, Mar 29, 2017 at 1:42 AM, Marc Garnica 
wrote:

> I assume you are not importing the user with which you are logged in,
> right? This might be the reason.. If not I don't have any clear idea.
>
> Marc Garnica
>
> 2017-03-29 0:56 GMT+02:00 Lorill Crees :
>
>> Hi,
>>
>> I am attempting to set up a new empty 2.24 database and populate it with
>> an export of Org units and Users and User Roles from a different 2.24
>> database. I exported in xml format, with 2 separate export files for:
>>
>>1. Org units / Org Unit Groups / Org Unit Group Sets / Org Unit Levels
>>2. Users / User Groups / User Roles
>>
>>
>> I am able to import the org units just fine. However, when I attempt to
>> import the User/User Role xml file I get an exception and the metadata
>> import halts (stacktrace below).
>>
>> Both instances are running the exact same version of 2.24:
>>
>> Version:
>> 2.24
>> Build revision:
>> 294f578
>> Build date:
>> 2017-03-20 06:21
>>
>> Note that doing a dry run import shows successfully importing 19 users
>> and 2 UserRoles.
>>
>> Also note that doing the export and import via json has the same result.
>>
>> Any help resolving this would be appreciated.
>>
>> Thanks,
>>
>> Lorill
>>
>> * INFO  2017-03-28 15:20:37,221 [Level: INFO, category: METADATA_IMPORT,
>> time: Tue Mar 28 15:20:37 PDT 2017, message: Importing 19 Users]
>> (InMemoryNotifier.java [taskScheduler-4])
>>
>> * INFO  2017-03-28 15:20:37,259 'admin' create org.hisp.dhis.user.User,
>> name: xxx, uid: spw11k0SXjJ (AuditLogUtil.java [taskScheduler-4])
>>
>> * INFO  2017-03-28 15:20:37,281 'admin' update org.hisp.dhis.user.User,
>> name: xxx, uid: spw11k0SXjJ (AuditLogUtil.java [taskScheduler-4])
>>
>> * INFO  2017-03-28 15:20:37,445 'admin' update org.hisp.dhis.user.User,
>> name: xxx, uid: spw11k0SXjJ (AuditLogUtil.java [taskScheduler-4])
>>
>> * ERROR 2017-03-28 15:20:37,460 Unexpected error occurred in scheduled
>> task. (TaskUtils.java [taskScheduler-4])
>>
>> org.hibernate.TransientObjectException: object references an unsaved
>> transient instance - save the transient instance before flushing:
>> org.hisp.dhis.user.User
>>
>> at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifie
>> rIfNotUnsaved(ForeignKeys.java:279)
>>
>> at org.hibernate.type.EntityType.getIdentifier(EntityType.java:455)
>>
>> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:281)
>>
>> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:291)
>>
>> at org.hibernate.type.TypeHelper.findDirty(TypeHelper.jav

[Dhis2-devs] Exception when importing User and User Role metadata in 2.24

2017-03-28 Thread Lorill Crees
rtMetaData(Unknown Source)

at
org.hisp.dhis.importexport.action.util.ImportMetaDataTask.call(ImportMetaDataTask.java:103)

at
org.hisp.dhis.security.SecurityContextRunnable.run(SecurityContextRunnable.java:57)

at
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)
-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Bulk Deletion of ProgramDataElements

2017-03-09 Thread Lorill Crees
Hi Morten,

Sure. Does this mean that both of those should be possible? Here are the
tickets:

https://jira.dhis2.org/browse/DHIS2-1241
https://jira.dhis2.org/browse/DHIS2-1242

Thanks,

Lorill

On Thu, Mar 9, 2017 at 3:40 PM, Morten Olav Hansen  wrote:

> Hi Lorill
>
> Would you mind filing an issue in JIRA?
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Fri, Mar 10, 2017 at 4:16 AM, Lorill Crees  wrote:
>
>> Hi,
>>
>> Just following up on this. I similarly would like to bulk delete Options,
>> but am not successful in this either.
>>
>> When POSTing to api/25/options?strategy=DELETE
>>
>> with this payload:
>>
>> {
>> "options": [
>>   {
>>   "id": "GNJOoVg1CdI"
>>   },
>>   {
>>   "id": "ZPRArfldlqK"
>>   }
>>   ]
>> }
>>
>> I get this returned:
>>
>> {
>> "httpStatus": "Conflict",
>> "httpStatusCode": 409,
>> "status": "WARNING",
>> "message": "One more more errors occurred, please see full details in
>> import report.",
>> "response": {
>> "responseType": "ObjectReport",
>> "uid": "ySD4jtmXNrG",
>> "klass": "org.hisp.dhis.option.Option",
>> "errorReports": [
>> {
>> "message": "Missing required property `name`.",
>> "mainKlass": "org.hisp.dhis.option.Option",
>> "errorKlass": "java.lang.String",
>> "errorCode": "E4000"
>> }
>> ]
>> }
>> }
>>
>> and POSTING to
>>
>> api/25/metadata?strategy=DELETE
>>
>> with this payload:
>>
>> {
>> "options": [
>>   {
>> "id": "GNJOoVg1CdI"
>> },
>> {
>> "id": "ZPRArfldlqK"
>> }
>> ]
>> }
>>
>> returns this:
>>
>> {"status":"ERROR","stats":{"created":0,"updated":0,"deleted"
>> :0,"ignored":2,"total":2},"typeReports":[{"klass":"org.
>> hisp.dhis.option.Option","stats":{"created":0,"updated":0,"
>> deleted":0,"ignored":2,"total":2},"objectReports":[{"klass":
>> "org.hisp.dhis.option.Option","index":0,"uid":"GNJOoVg1CdI",
>> "errorReports":[{"message":"Missing required property
>> `name`.","mainKlass":"org.hisp.dhis.option.Option","errorKla
>> ss":"java.lang.String","errorCode":"E4000"}]},{"klass"
>> :"org.hisp.dhis.option.Option","index":1,"uid":"ZPRArfldlqK"
>> ,"errorReports":[{"message":"Missing required property
>> `name`.","mainKlass":"org.hisp.dhis.option.Option","errorKla
>> ss":"java.lang.String","errorCode":"E4000"}]}]}]}
>>
>> On Tue, Mar 7, 2017 at 12:55 PM, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> I am attempting to do a bulk deletion of ProgramDataElements via the Web
>>> API. I am able to delete one by one by using Http DELETE:
>>>
>>> api/25/programDataElements/s3L7Qamxs0s
>>>
>>> I am not successful when attempting to POST to:
>>>
>>> api/25/programDataElements?strategy=DELETE
>>>
>>> with the payload:
>>>
>>> {
>>>"programDataElements":[
>>>   {
>>>  "id":"B6GVF8xN0QL"
>>>   },
>>>   {
>>>  "id":"VvLbQPQH4xs"
>>>   }
>>>]
>>> }
>>>
>>> or
>>>
>>> {
>>>"programDataElements":[
>>>   {
>>>  "programDataElement":"B6GVF8xN0QL"
>>>   },
>>>   {
>>>  "programDataElement":"VvLbQPQH4xs"
>>>   }
>>>]
>>> }
>>>
>>> A nullpointer is 

Re: [Dhis2-devs] Bulk Deletion of ProgramDataElements

2017-03-09 Thread Lorill Crees
Hi,

Just following up on this. I similarly would like to bulk delete Options,
but am not successful in this either.

When POSTing to api/25/options?strategy=DELETE

with this payload:

{
"options": [
  {
  "id": "GNJOoVg1CdI"
  },
  {
  "id": "ZPRArfldlqK"
  }
  ]
}

I get this returned:

{
"httpStatus": "Conflict",
"httpStatusCode": 409,
"status": "WARNING",
"message": "One more more errors occurred, please see full details in
import report.",
"response": {
"responseType": "ObjectReport",
"uid": "ySD4jtmXNrG",
"klass": "org.hisp.dhis.option.Option",
"errorReports": [
{
"message": "Missing required property `name`.",
"mainKlass": "org.hisp.dhis.option.Option",
"errorKlass": "java.lang.String",
"errorCode": "E4000"
}
]
}
}

and POSTING to

api/25/metadata?strategy=DELETE

with this payload:

{
"options": [
  {
"id": "GNJOoVg1CdI"
},
{
"id": "ZPRArfldlqK"
}
]
}

returns this:

{"status":"ERROR","stats":{"created":0,"updated":0,"deleted":0,"ignored":2,"total":2},"typeReports":[{"klass":"org.hisp.dhis.option.Option","stats":{"created":0,"updated":0,"deleted":0,"ignored":2,"total":2},"objectReports":[{"klass":"org.hisp.dhis.option.Option","index":0,"uid":"GNJOoVg1CdI","errorReports":[{"message":"Missing
required property
`name`.","mainKlass":"org.hisp.dhis.option.Option","errorKlass":"java.lang.String","errorCode":"E4000"}]},{"klass":"org.hisp.dhis.option.Option","index":1,"uid":"ZPRArfldlqK","errorReports":[{"message":"Missing
required property
`name`.","mainKlass":"org.hisp.dhis.option.Option","errorKlass":"java.lang.String","errorCode":"E4000"}]}]}]}

On Tue, Mar 7, 2017 at 12:55 PM, Lorill Crees  wrote:

> Hi,
>
> I am attempting to do a bulk deletion of ProgramDataElements via the Web
> API. I am able to delete one by one by using Http DELETE:
>
> api/25/programDataElements/s3L7Qamxs0s
>
> I am not successful when attempting to POST to:
>
> api/25/programDataElements?strategy=DELETE
>
> with the payload:
>
> {
>"programDataElements":[
>   {
>  "id":"B6GVF8xN0QL"
>   },
>   {
>  "id":"VvLbQPQH4xs"
>   }
>]
> }
>
> or
>
> {
>"programDataElements":[
>   {
>  "programDataElement":"B6GVF8xN0QL"
>   },
>   {
>  "programDataElement":"VvLbQPQH4xs"
>   }
>]
> }
>
> A nullpointer is thrown in the logs (pasted below).
>
> I was unable to find documentation specifically for programDataElements.
> Is bulk deletion even possible? If so, do I need to be doing something
> differently or is this a bug?
>
> Thanks,
>
> Lorill
>
> Version:
> 2.25
> Build revision:
> 910b13a
> Build date:
> 2017-03-07 08:39
>
>
> * INFO  2017-03-07 12:53:13,559 (admin) Import:Start
> (DefaultMetadataImportService.java [http-nio-8090-exec-10])
>
> * INFO  2017-03-07 12:53:13,570 (admin) Import:Preheat[REFERENCE] took
> 0.01 seconds (DefaultPreheatService.java [http-nio-8090-exec-10])
>
> java.lang.NullPointerException
>
> at org.hisp.dhis.program.ProgramDataElement.getName(
> ProgramDataElement.java:79)
>
> at org.hisp.dhis.common.BaseIdentifiableObject.getDisplayName(
> BaseIdentifiableObject.java:266)
>
> at org.hisp.dhis.common.IdentifiableObjectUtils.getDisplayName(
> IdentifiableObjectUtils.java:341)
>
> at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleValidationS
> ervice.validateBySchemas(DefaultObjectBundleValidationService.java:491)
>
> at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleValidationS
> ervice.validate(DefaultObjectBundleValidationService.java:156)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62

[Dhis2-devs] Bulk Deletion of ProgramDataElements

2017-03-07 Thread Lorill Crees
ssFilter.java:115)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at
org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)

at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)

at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)

at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at
org.hisp.dhis.servlet.filter.HttpUrlPatternFilter.doFilter(HttpUrlPatternFilter.java:105)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at
org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:87)

at
org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter.doFilterInternal(ExcludableShallowEtagHeaderFilter.java:110)

at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at
org.springframework.orm.hibernate5.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)

at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)

at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)

at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)

at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)

at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)

at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)

at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1517)

at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1474)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:745)


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
Mailing list: https://launchpad.net/~dhis2-devs
Post t

Re: [Dhis2-devs] Deletion of DataElements or Indicators that are used in Favourites

2017-02-28 Thread Lorill Crees
Hi Morten,

Can I assume then that querying for and deleting favourites via the API is
not possible right now?

I created three different JIRAs for this:

https://jira.dhis2.org/browse/DHIS2-1174 - Show more meaningful message to
user when a favourite cannot be loaded due to missing data elements
https://jira.dhis2.org/browse/DHIS2-1175 - Add ability to query for
Favourites by their corresponding data elements and indicators via the API
https://jira.dhis2.org/browse/DHIS2-1176 - Add ability to delete Favourites
via the API

What is your process for reviewing and prioritizing JIRA issues? Just
wondering when I would know if and when these issues would be developed,
and for which version(s)?

Thanks,

Lorill

On Mon, Feb 27, 2017 at 6:28 PM, Morten Olav Hansen 
wrote:

> Hi Lorill
>
> Would you mind filing an issue in Jira for this?
>
> jira.dhis2.org
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Tue, Feb 28, 2017 at 6:36 AM, Lorill Crees  wrote:
>
>> Hi - just following up on this. Does anyone have any suggestions?
>>
>> On Thu, Feb 16, 2017 at 11:27 AM, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> I am able to successfully delete a Data Set and all corresponding
>>> DataElements and Indicators and corresponding data via the Web API. However
>>> when I then go and attempt to load a Favourite that was created referencing
>>> elements that are now deleted, I get the error
>>>
>>> Code 409
>>> Status: Conflict
>>> Dimension dx is present in query without any valid dimension options
>>>
>>> (see attached screenshot)
>>>
>>> This doesn't give the user any idea that the favourite is no longer
>>> valid because the underlying elements have been deleted. In order for this
>>> functionality to make sense to the user I want to do one of the following:
>>>
>>>1. Prior to deleting the Data Set and related objects, query for all
>>>favourites that use any items to be deleted and list them and allow the
>>>user the option to have them programatically deleted.
>>>1. Is it possible to query for favourites by their corresponding
>>>   data elements and indicators via the API?
>>>   2. Is it possible to delete a favourite via the API?
>>>2. If #1 above is not possible, is it possible to show a more
>>>meaningful message to the user that lets them know why a favourite cannot
>>>    be loaded?
>>>
>>> I am using version:
>>> 2.25
>>> Build revision:
>>> 9f6b262
>>> Build date:
>>> 2017-02-16 06:42
>>>
>>> Thanks,
>>>
>>> Lorill
>>>
>>>
>>> --
>>> Lorill Crees
>>> Project Leader / Senior Developer
>>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>>
>>>
>>
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>
>> lcr...@2paths.com
>> skype: lorill2paths
>> (604) 689-4123 x 15 <(604)%20689-4123>
>>
>> ___
>> 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
>>
>>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Deletion of DataElements or Indicators that are used in Favourites

2017-02-27 Thread Lorill Crees
Hi - just following up on this. Does anyone have any suggestions?

On Thu, Feb 16, 2017 at 11:27 AM, Lorill Crees  wrote:

> Hi,
>
> I am able to successfully delete a Data Set and all corresponding
> DataElements and Indicators and corresponding data via the Web API. However
> when I then go and attempt to load a Favourite that was created referencing
> elements that are now deleted, I get the error
>
> Code 409
> Status: Conflict
> Dimension dx is present in query without any valid dimension options
>
> (see attached screenshot)
>
> This doesn't give the user any idea that the favourite is no longer valid
> because the underlying elements have been deleted. In order for this
> functionality to make sense to the user I want to do one of the following:
>
>1. Prior to deleting the Data Set and related objects, query for all
>favourites that use any items to be deleted and list them and allow the
>user the option to have them programatically deleted.
>1. Is it possible to query for favourites by their corresponding data
>   elements and indicators via the API?
>   2. Is it possible to delete a favourite via the API?
>2. If #1 above is not possible, is it possible to show a more
>meaningful message to the user that lets them know why a favourite cannot
>be loaded?
>
> I am using version:
> 2.25
> Build revision:
> 9f6b262
> Build date:
> 2017-02-16 06:42
>
> Thanks,
>
> Lorill
>
>
> --
> Lorill Crees
> Project Leader / Senior Developer
> 2Paths Solutions Ltd. <http://www.2paths.com>
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] delete existing data elements

2017-02-16 Thread Lorill Crees
Great, thanks Lars!

On Wed, Feb 15, 2017 at 9:20 AM, Lars Helge Øverland  wrote:

> I cannot remember exactly but I think it was in 2.20.
>
> The startup fix was backported to 2.25, 2.26.
>
> regards,
>
> Lars
>
>
> On Tue, Feb 14, 2017 at 11:33 PM, Lorill Crees  wrote:
>
>> Thanks for the quick response Lars.
>>
>> In which version was it removed? We are managing multiple instances on
>> different versions and I just want to make sure we remove it from the right
>> ones.
>>
>> Thanks!
>>
>> On Tue, Feb 14, 2017 at 2:20 PM, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Lorill,
>>>
>>> this happens due to a lingering legacy database table. We will include a
>>> startup statement to remove it. In the meantime you can run this SQL
>>> against your database:
>>>
>>> drop table caseaggregationcondition;
>>>
>>> regards,
>>>
>>> Lars
>>> ​
>>>
>>> On Tue, Feb 14, 2017 at 11:10 PM, Lorill Crees 
>>> wrote:
>>>
>>>> Hi Lars,
>>>>
>>>> I am attempting to delete a data element via the API and am getting the
>>>> below error, due to a foreign key constraint on table
>>>> "caseaggregationcondition".
>>>>
>>>> What are CaseAggregationConditions and where are they in the DHIS 2 UI?
>>>>
>>>> In your prior email to Channara you said that "If you upgrade to a
>>>> later version of DHIS 2, those have been removed completely."
>>>>
>>>> Which version has these removed completely? We are using DHIS 2
>>>> Version:
>>>> 2.25
>>>> Build revision:
>>>> a143100
>>>> Build date:
>>>> 2017-02-07 14:28
>>>>
>>>> If they have not been removed in 2.25, how can we delete them via the
>>>> Web API?
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>>
>>>>
>>>> * ERROR 2017-02-14 13:25:49,092 ERROR: update or delete on table
>>>> "dataelement" violates foreign key constraint 
>>>> "fk_caseaggregationcondition_dataelement"
>>>> on table "caseaggregationcondition"
>>>>   Detail: Key (dataelementid)=(109575) is still referenced from table
>>>> "caseaggregationcondition". (SqlExceptionHelper.java 
>>>> [http-nio-8090-exec-8])
>>>> org.hibernate.exception.ConstraintViolationException: could not
>>>> execute statement
>>>> at org.hibernate.exception.internal.SQLStateConversionDelegate.
>>>> convert(SQLStateConversionDelegate.java:112)
>>>> at org.hibernate.exception.internal.StandardSQLExceptionConvert
>>>> er.convert(StandardSQLExceptionConverter.java:42)
>>>> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(Sql
>>>> ExceptionHelper.java:111)
>>>> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(Sql
>>>> ExceptionHelper.java:97)
>>>> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.execu
>>>> teUpdate(ResultSetReturnImpl.java:207)
>>>> at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.ad
>>>> dToBatch(NonBatchingBatch.java:45)
>>>> at org.hibernate.persister.entity.AbstractEntityPersister.delet
>>>> e(AbstractEntityPersister.java:3233)
>>>> at org.hibernate.persister.entity.AbstractEntityPersister.delet
>>>> e(AbstractEntityPersister.java:3470)
>>>> at org.hibernate.action.internal.EntityDeleteAction.execute(Ent
>>>> ityDeleteAction.java:98)
>>>> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQu
>>>> eue.java:560)
>>>> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQu
>>>> eue.java:434)
>>>> at org.hibernate.event.internal.AbstractFlushingEventListener.p
>>>> erformExecutions(AbstractFlushingEventListener.java:337)
>>>> at org.hibernate.event.internal.DefaultFlushEventListener.onFlu
>>>> sh(DefaultFlushEventListener.java:39)
>>>> at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
>>>> at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundle
>>>> Service.commit(DefaultObjectBundleService.java:158)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>>> ssorImpl.java

Re: [Dhis2-devs] [Dhis2-users] delete existing data elements

2017-02-14 Thread Lorill Crees
Thanks for the quick response Lars.

In which version was it removed? We are managing multiple instances on
different versions and I just want to make sure we remove it from the right
ones.

Thanks!

On Tue, Feb 14, 2017 at 2:20 PM, Lars Helge Øverland  wrote:

> Hi Lorill,
>
> this happens due to a lingering legacy database table. We will include a
> startup statement to remove it. In the meantime you can run this SQL
> against your database:
>
> drop table caseaggregationcondition;
>
> regards,
>
> Lars
> ​
>
> On Tue, Feb 14, 2017 at 11:10 PM, Lorill Crees  wrote:
>
>> Hi Lars,
>>
>> I am attempting to delete a data element via the API and am getting the
>> below error, due to a foreign key constraint on table
>> "caseaggregationcondition".
>>
>> What are CaseAggregationConditions and where are they in the DHIS 2 UI?
>>
>> In your prior email to Channara you said that "If you upgrade to a later
>> version of DHIS 2, those have been removed completely."
>>
>> Which version has these removed completely? We are using DHIS 2 Version:
>> 2.25
>> Build revision:
>> a143100
>> Build date:
>> 2017-02-07 14:28
>>
>> If they have not been removed in 2.25, how can we delete them via the Web
>> API?
>>
>> Thanks,
>>
>> Lorill
>>
>>
>>
>> * ERROR 2017-02-14 13:25:49,092 ERROR: update or delete on table
>> "dataelement" violates foreign key constraint 
>> "fk_caseaggregationcondition_dataelement"
>> on table "caseaggregationcondition"
>>   Detail: Key (dataelementid)=(109575) is still referenced from table
>> "caseaggregationcondition". (SqlExceptionHelper.java [http-nio-8090-exec-8])
>> org.hibernate.exception.ConstraintViolationException: could not execute
>> statement
>> at org.hibernate.exception.internal.SQLStateConversionDelegate.
>> convert(SQLStateConversionDelegate.java:112)
>> at org.hibernate.exception.internal.StandardSQLExceptionConvert
>> er.convert(StandardSQLExceptionConverter.java:42)
>> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(Sql
>> ExceptionHelper.java:111)
>> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(Sql
>> ExceptionHelper.java:97)
>> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.execu
>> teUpdate(ResultSetReturnImpl.java:207)
>> at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.ad
>> dToBatch(NonBatchingBatch.java:45)
>> at org.hibernate.persister.entity.AbstractEntityPersister.delet
>> e(AbstractEntityPersister.java:3233)
>> at org.hibernate.persister.entity.AbstractEntityPersister.delet
>> e(AbstractEntityPersister.java:3470)
>> at org.hibernate.action.internal.EntityDeleteAction.execute(Ent
>> ityDeleteAction.java:98)
>> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQu
>> eue.java:560)
>> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQu
>> eue.java:434)
>> at org.hibernate.event.internal.AbstractFlushingEventListener.p
>> erformExecutions(AbstractFlushingEventListener.java:337)
>> at org.hibernate.event.internal.DefaultFlushEventListener.onFlu
>> sh(DefaultFlushEventListener.java:39)
>> at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
>> at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundle
>> Service.commit(DefaultObjectBundleService.java:158)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>> ssorImpl.java:62)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:483)
>> at org.springframework.aop.support.AopUtils.invokeJoinpointUsin
>> gReflection(AopUtils.java:302)
>> at org.springframework.aop.framework.ReflectiveMethodInvocation
>> .invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>> at org.springframework.aop.framework.ReflectiveMethodInvocation
>> .proceed(ReflectiveMethodInvocation.java:157)
>> at org.springframework.transaction.interceptor.TransactionInter
>> ceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>> at org.springframework.transaction.interceptor.TransactionAspec
>> tSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
>> at org.springframework.transaction.interceptor.TransactionInter
>> ceptor.invoke(TransactionInterceptor.java:96)
>> at org.springframework.aop.framework.ReflectiveMethodInvocation
>> .proceed(ReflectiveM

Re: [Dhis2-devs] [Dhis2-users] delete existing data elements

2017-02-14 Thread Lorill Crees
NioEndpoint$SocketProcessor.doRun
(NioEndpoint.java:1517)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(
NioEndpoint.java:1474)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
Executor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
lExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.
run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on
table "dataelement" violates foreign key constraint
"fk_caseaggregationcondition_dataelement" on table
"caseaggregationcondition"
  Detail: Key (dataelementid)=(109575) is still referenced from table
"caseaggregationcondition".
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorRespons
e(QueryExecutorImpl.java:2455)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(Quer
yExecutorImpl.java:2155)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecut
orImpl.java:288)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgP
reparedStatement.java:168)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPrep
aredStatement.java:135)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUp
date(NewProxyPreparedStatement.java:105)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.execu
teUpdate(ResultSetReturnImpl.java:204)
... 137 more



On Tue, Dec 13, 2016 at 1:13 AM, Lars Helge Øverland  wrote:

> Hi Channara,
>
> that means that the delete was not allowed due to case aggregation
> conditions still referencing the data element. You need to the delete the
> case aggregation queries first. If you upgrade to a later version of DHIS
> 2, those have been removed completely.
>
> regards,
>
> Lars
>
> On Tue, Dec 13, 2016 at 9:50 AM, channara rin 
> wrote:
>
>> dear all,
>> i want to delete in data elements. but when i click remove, i got console
>> like below:
>> * INFO  2016-12-13 15:48:27,917 Delete was not allowed by
>> CaseAggregationConditionDeletionHandler: CaseAggregationCondition
>> (DefaultDeletionManager.java [http-nio-80-exec-8])
>>
>> do you know this problem, how can i delete it?
>>
>> thank you
>> channara
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-us...@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org <https://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
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15 <(604)%20689-4123>
___
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] How to find all Indicators that use a specific DataElement via the API?

2017-02-14 Thread Lorill Crees
Hi Lars,

Thanks, that's exactly what I'm looking for.

Cheers,

Lorill

On Mon, Feb 13, 2017 at 1:15 AM, Lars Helge Øverland  wrote:

> Hi Lorill,
>
> that is the best way at the moment. We do have primitive support for
> logical operators (applies to entire query) so you could combine it like
> this:
>
> https://play.dhis2.org/demo/api/indicators?filter=
> numerator:like:fbfJHSPpUQD&filter=denominator:like:
> fbfJHSPpUQD&rootJunction=OR
>
>
> regards,
>
> Lars
>
>
>
> On Sat, Feb 11, 2017 at 1:07 AM, Lorill Crees  wrote:
>
>> Hi,
>>
>> What is the best way to find all Indicators that use a specific
>> DataElement? Do I have to search for the id in the numerator and
>> denominator strings like this, or is there a better way?
>>
>> /api/25/indicators?filter=numerator:like:HifxrAyx4sO
>> /api/25/indicators?filter=denominator:like:HifxrAyx4sO
>>
>> DHIS 2 Version:
>> 2.25
>> Build revision:
>> a143100
>> Build date:
>> 2017-02-07 14:28
>>
>> Thanks,
>>
>> Lorill
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>
>> lcr...@2paths.com
>> skype: lorill2paths
>> (604) 689-4123 x 15 <(604)%20689-4123>
>>
>> ___
>> 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
> l...@dhis2.org
> http://www.dhis2.org <https://www.dhis2.org/>
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] How to find all Indicators that use a specific DataElement via the API?

2017-02-10 Thread Lorill Crees
Hi,

What is the best way to find all Indicators that use a specific
DataElement? Do I have to search for the id in the numerator and
denominator strings like this, or is there a better way?

/api/25/indicators?filter=numerator:like:HifxrAyx4sO
/api/25/indicators?filter=denominator:like:HifxrAyx4sO

DHIS 2 Version:
2.25
Build revision:
a143100
Build date:
2017-02-07 14:28

Thanks,

Lorill

-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Response differences between /api/metadata and /api/23/metadata

2017-02-06 Thread Lorill Crees
Hi Morten,

At long last I am revisiting using the enhancement you made for including
the displayName in the Error reports documented here, with the
importReportMode import parameter:

https://dhis2.github.io/dhis2-docs/master/en/developer/html/webapi_metadata_import.html

However in our case this doesn't end up reducing the amount of data that we
need to pass around. Basically, the only time we need to have the
displayName included in the response is if it is associated with an Error
that we need to pass back to the user. With the three options "ERRORS",
"FULL", and "DEBUG", we can only get the displayName with the option
"DEBUG", which also returns a separate object report for every object we
posted, regardless of whether or not it was an error.

Is it possible to augment this functionality with a fourth option, which is
"ERRORS" only, but with the displayName included? We don't want to have the
"FULL" functionality that is included in "DEBUG" as the point of us using
this functionality was to reduce the amount of data being passed around in
order to get at the displayName property of an error. In versions prior to
2.23, we got this information returned by default.

Please let me know what you think, and if a fourth option could be added.
It would be basically "ERRORS_DEBUG".

Thanks,

Lorill


On Sun, Oct 23, 2016 at 7:40 PM, Morten Olav Hansen 
wrote:

>
> On Tue, Oct 18, 2016 at 11:51 PM, Lorill Crees  wrote:
>

>>>>>1. The /api/23/metadata response with "errorReports" within
>>>>>"objectReports" appears to have replaced the /api/metadata
>>>>>"importConflicts". In /api/metadata, the "importConflicts" "object" 
>>>>> field
>>>>>contains the actual name of the object that has the error (eg: the 
>>>>> Program
>>>>>short name in our case). However, in /api/23/metadata there is only the
>>>>>index which makes it more work to debug. Is it possible to also 
>>>>> include the
>>>>>name of the object in the error report like the prior API version does?
>>>>>
>>>>> Hm, right. I understand that it's useful, but that can easily add up
>>>> to a lot of data returned. Maybe we should add some kind of "debug" mode
>>>> where more output is provided.
>>>>
>>>
>>> Although I understand that this might add more data to the payload, it
>>> would decrease the amount of data that we need to pass around in our app,
>>> and also potentially decrease the number of API calls we need to do. Not
>>> having this information in the response now means we need to pass around
>>> our original post data (which can be quite large, and which we aren't
>>> currently doing) and do a lookup by ID to send any kind of useful
>>> information back to the user. Additionally, we may have even posted these
>>> objects by ID only, which means we will now need to do another API call to
>>> look up the object to get useful information to send back to the user. Keep
>>> in mind that in our app, the user doesn't actually even have a knowledge of
>>> IDs - we are doing those lookups for them by name or code.
>>> Would it be possible to add a flag to the api call where we can request
>>> the name or shortname or code to be returned in addition to just the ID?
>>> Perhaps similar to the metadata field filter?  Where we could say supply
>>> importConflictsFields=:identifiable?
>>>
>>
>> Yes, let me see what I can do for 225 at least (I might be able to
>> backport to 224 if it doesn't disrupt things too much)
>>
>> https://blueprints.launchpad.net/dhis2/+spec/importer-parame
>> ter-to-adjust-importreport-output
>>
>
> Thanks Morten, that's great!
>

>> I see this blueprint was completed in 2.25 - great! Was this backported
>> to 2.24? Is there documentation for this?
>>
>
> Yes, this is also in 224, docs are here:
>
> https://dhis2.github.io/dhis2-docs/master/en/developer/html/
> webapi_metadata_import.html
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>



-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Determining DHIS2 version in use from database instance

2017-01-12 Thread Lorill Crees
+1 vote for this too!

On Thu, Jan 12, 2017 at 12:29 AM, Olav Poppe  wrote:

> +1 vote for this. I remember it was proposed at the August academy, but I
> don’t see any JIRA issue on it.
>
> Olav
>
>
> 11. jan. 2017 kl. 20.05 skrev Bob Jolliffe :
>
> No I think its a good question.  I've often thought that it would be
> useful for the database to get "marked" in some way once it has been run
> against a particular build of war file.  This can be useful for example
> when dealing with archived backups.
>
> But no I don't think we do this currently.
>
> On 11 January 2017 at 17:01, Calle Hedberg 
> wrote:
>
>> Hi,
>>
>> maybe this is a bit dumb question, but:
>>
>> Is there an easy method of determining which version a specific database
>> is using (e.g. differentiating between 2.25 and earlier versions are easy
>> due to the new softdelete field in the datavalue table, but it is not so
>> easy to differentiate between 2.21, 2.22, 2.23, and 2.24...)
>>
>> Regards
>> Calle
>>
>> ***
>>
>> Calle Hedberg
>>
>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>
>> Tel/fax (home): +27-21-685-6472 <+27%2021%20685%206472>
>>
>> Cell: +27-82-853-5352 <+27%2082%20853%205352>
>>
>> Iridium SatPhone: +8816-315-19119 <+881%206%20315%2019119>
>>
>> Email: calle.hedb...@gmail.com
>>
>> Skype: calle_hedberg
>>
>> ***
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] can't delete data element

2016-12-15 Thread Lorill Crees
Excellent - thanks Lars!

On Thu, Dec 15, 2016 at 4:28 AM, Lars Helge Øverland  wrote:

>
> This should be back-ported to 2.25 now.
>
> https://jira.dhis2.org/browse/DHIS2-209
>
> Lars
>
>
> On Tue, Dec 13, 2016 at 5:15 PM, Lorill Crees  wrote:
>
>> Thanks Lars.
>>
>> On Tue, Dec 13, 2016 at 8:10 AM, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Lorill,
>>>
>>> this is done in master. Issue here:
>>>
>>> https://jira.dhis2.org/browse/DHIS2-209
>>>
>>> Will see if it can be back-ported.
>>>
>>> Lars
>>>
>>>
>>> On Tue, Dec 13, 2016 at 4:58 PM, Lorill Crees  wrote:
>>>
>>>> Hi Lars,
>>>>
>>>> Just following up on progress with this. Do you have an ETA on when
>>>> this will be available in 2.25?
>>>>
>>>> Thanks!
>>>>
>>>> Lorill
>>>>
>>>> On Fri, Nov 18, 2016 at 10:11 AM, Lorill Crees 
>>>> wrote:
>>>>
>>>>> Great, thanks Lars!
>>>>>
>>>>> On Fri, Nov 18, 2016 at 10:03 AM, Lars Helge Øverland 
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> Sure - will keep you posted - we will get it done in a few weeks time.
>>>>>>
>>>>>> regards,
>>>>>>
>>>>>> Lars
>>>>>>
>>>>>>
>>>>>> On Fri, Nov 18, 2016 at 7:01 PM, Lorill Crees 
>>>>>> wrote:
>>>>>>
>>>>>>> Thanks Lars. Yes - keeping it on a data element will work for us.
>>>>>>>
>>>>>>> Could you please let me know when this is complete for us to try
>>>>>>> out? Or let me know the issue so I can track it?
>>>>>>>
>>>>>>> Thanks for accommodating this functionality - much appreciated!
>>>>>>>
>>>>>>> On Fri, Nov 18, 2016 at 9:50 AM, Lars Helge Øverland >>>>>> > wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Nov 18, 2016 at 6:43 PM, Lorill Crees 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Lars,
>>>>>>>>>
>>>>>>>>> That functionality would be what we need. Is this something that
>>>>>>>>> you could backport to 2.25?
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Okay we can work on that. I have written an issue. Yes I think we
>>>>>>>> can back-port to 2.25.
>>>>>>>>
>>>>>>>>
>>>>>>>>> Also wondering if it would be possible to prune for a Data Set?
>>>>>>>>> That would reduce the amount of API calls as our end goal is to 
>>>>>>>>> delete the
>>>>>>>>> Data Set itself.
>>>>>>>>>
>>>>>>>>>
>>>>>>>> I think we will keep it on data element - don't want to take this
>>>>>>>> too far. I guess you could chain API calls for this without too much 
>>>>>>>> hassle.
>>>>>>>>
>>>>>>>> best regards,
>>>>>>>>
>>>>>>>> Lars
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Let me know. Thanks,
>>>>>>>>>
>>>>>>>>> Lorill
>>>>>>>>>
>>>>>>>>> On Fri, Nov 18, 2016 at 9:16 AM, Lars Helge Øverland <
>>>>>>>>> l...@dhis2.org> wrote:
>>>>>>>>>
>>>>>>>>>> Sorry Lorill, I misread your question.
>>>>>>>>>>
>>>>>>>>>> No we haven't changed the policy that data element can be deleted
>>>>>>>>>> if data value audits exist.
>>>>>>>>>>
>>>>>>>>>> We recently implemented a feature for pruning
>>>>>>>>>> <https://dhis2.github.io/dhis2-docs/master/en/developer/html/webapi_maintenance.html>
>>>>>>>>>> data (including app

Re: [Dhis2-devs] [Dhis2-users] can't delete data element

2016-12-13 Thread Lorill Crees
Thanks Lars.

On Tue, Dec 13, 2016 at 8:10 AM, Lars Helge Øverland  wrote:

> Hi Lorill,
>
> this is done in master. Issue here:
>
> https://jira.dhis2.org/browse/DHIS2-209
>
> Will see if it can be back-ported.
>
> Lars
>
>
> On Tue, Dec 13, 2016 at 4:58 PM, Lorill Crees  wrote:
>
>> Hi Lars,
>>
>> Just following up on progress with this. Do you have an ETA on when this
>> will be available in 2.25?
>>
>> Thanks!
>>
>> Lorill
>>
>> On Fri, Nov 18, 2016 at 10:11 AM, Lorill Crees  wrote:
>>
>>> Great, thanks Lars!
>>>
>>> On Fri, Nov 18, 2016 at 10:03 AM, Lars Helge Øverland 
>>> wrote:
>>>
>>>>
>>>> Sure - will keep you posted - we will get it done in a few weeks time.
>>>>
>>>> regards,
>>>>
>>>> Lars
>>>>
>>>>
>>>> On Fri, Nov 18, 2016 at 7:01 PM, Lorill Crees 
>>>> wrote:
>>>>
>>>>> Thanks Lars. Yes - keeping it on a data element will work for us.
>>>>>
>>>>> Could you please let me know when this is complete for us to try out?
>>>>> Or let me know the issue so I can track it?
>>>>>
>>>>> Thanks for accommodating this functionality - much appreciated!
>>>>>
>>>>> On Fri, Nov 18, 2016 at 9:50 AM, Lars Helge Øverland 
>>>>> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Nov 18, 2016 at 6:43 PM, Lorill Crees 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Lars,
>>>>>>>
>>>>>>> That functionality would be what we need. Is this something that you
>>>>>>> could backport to 2.25?
>>>>>>>
>>>>>>>
>>>>>> Okay we can work on that. I have written an issue. Yes I think we can
>>>>>> back-port to 2.25.
>>>>>>
>>>>>>
>>>>>>> Also wondering if it would be possible to prune for a Data Set? That
>>>>>>> would reduce the amount of API calls as our end goal is to delete the 
>>>>>>> Data
>>>>>>> Set itself.
>>>>>>>
>>>>>>>
>>>>>> I think we will keep it on data element - don't want to take this too
>>>>>> far. I guess you could chain API calls for this without too much hassle.
>>>>>>
>>>>>> best regards,
>>>>>>
>>>>>> Lars
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Let me know. Thanks,
>>>>>>>
>>>>>>> Lorill
>>>>>>>
>>>>>>> On Fri, Nov 18, 2016 at 9:16 AM, Lars Helge Øverland >>>>>> > wrote:
>>>>>>>
>>>>>>>> Sorry Lorill, I misread your question.
>>>>>>>>
>>>>>>>> No we haven't changed the policy that data element can be deleted
>>>>>>>> if data value audits exist.
>>>>>>>>
>>>>>>>> We recently implemented a feature for pruning
>>>>>>>> <https://dhis2.github.io/dhis2-docs/master/en/developer/html/webapi_maintenance.html>
>>>>>>>> data (including approval records, data set completeness records, data 
>>>>>>>> value
>>>>>>>> audits and data values) for organisation unit units.
>>>>>>>>
>>>>>>>> /api/26/maintenance/dataPruning/organisationUnits/
>>>>>>>>
>>>>>>>> We could implement something similar for data elements.
>>>>>>>>
>>>>>>>>
>>>>>>>> Lars
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Nov 18, 2016 at 6:03 PM, Lorill Crees 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Lars,
>>>>>>>>>
>>>>>>>>> Thanks for the quick reply. Does this mean if we soft delete all
>>>>>>>>> data values associated with a dat

Re: [Dhis2-devs] [Dhis2-users] can't delete data element

2016-12-13 Thread Lorill Crees
Hi Lars,

Just following up on progress with this. Do you have an ETA on when this
will be available in 2.25?

Thanks!

Lorill

On Fri, Nov 18, 2016 at 10:11 AM, Lorill Crees  wrote:

> Great, thanks Lars!
>
> On Fri, Nov 18, 2016 at 10:03 AM, Lars Helge Øverland 
> wrote:
>
>>
>> Sure - will keep you posted - we will get it done in a few weeks time.
>>
>> regards,
>>
>> Lars
>>
>>
>> On Fri, Nov 18, 2016 at 7:01 PM, Lorill Crees  wrote:
>>
>>> Thanks Lars. Yes - keeping it on a data element will work for us.
>>>
>>> Could you please let me know when this is complete for us to try out? Or
>>> let me know the issue so I can track it?
>>>
>>> Thanks for accommodating this functionality - much appreciated!
>>>
>>> On Fri, Nov 18, 2016 at 9:50 AM, Lars Helge Øverland 
>>> wrote:
>>>
>>>>
>>>>
>>>> On Fri, Nov 18, 2016 at 6:43 PM, Lorill Crees 
>>>> wrote:
>>>>
>>>>> Hi Lars,
>>>>>
>>>>> That functionality would be what we need. Is this something that you
>>>>> could backport to 2.25?
>>>>>
>>>>>
>>>> Okay we can work on that. I have written an issue. Yes I think we can
>>>> back-port to 2.25.
>>>>
>>>>
>>>>> Also wondering if it would be possible to prune for a Data Set? That
>>>>> would reduce the amount of API calls as our end goal is to delete the Data
>>>>> Set itself.
>>>>>
>>>>>
>>>> I think we will keep it on data element - don't want to take this too
>>>> far. I guess you could chain API calls for this without too much hassle.
>>>>
>>>> best regards,
>>>>
>>>> Lars
>>>>
>>>>
>>>>
>>>>
>>>>> Let me know. Thanks,
>>>>>
>>>>> Lorill
>>>>>
>>>>> On Fri, Nov 18, 2016 at 9:16 AM, Lars Helge Øverland 
>>>>> wrote:
>>>>>
>>>>>> Sorry Lorill, I misread your question.
>>>>>>
>>>>>> No we haven't changed the policy that data element can be deleted if
>>>>>> data value audits exist.
>>>>>>
>>>>>> We recently implemented a feature for pruning
>>>>>> <https://dhis2.github.io/dhis2-docs/master/en/developer/html/webapi_maintenance.html>
>>>>>> data (including approval records, data set completeness records, data 
>>>>>> value
>>>>>> audits and data values) for organisation unit units.
>>>>>>
>>>>>> /api/26/maintenance/dataPruning/organisationUnits/
>>>>>>
>>>>>> We could implement something similar for data elements.
>>>>>>
>>>>>>
>>>>>> Lars
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Nov 18, 2016 at 6:03 PM, Lorill Crees 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Lars,
>>>>>>>
>>>>>>> Thanks for the quick reply. Does this mean if we soft delete all
>>>>>>> data values associated with a data element we will then be able to hard
>>>>>>> delete the data element?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Lorill
>>>>>>>
>>>>>>> On Fri, Nov 18, 2016 at 8:54 AM, Lars Helge Øverland >>>>>> > wrote:
>>>>>>>
>>>>>>>> Hi Lorill,
>>>>>>>>
>>>>>>>> in 2.25 we introduced "soft data value" delete, meaning that in the
>>>>>>>> database we simply mark data values as deleted using the "deleted" 
>>>>>>>> property
>>>>>>>> (this is transparent to the users). This means that foreign key 
>>>>>>>> constraints
>>>>>>>> from data value audit values should not be a problem anymore. Let us 
>>>>>>>> know
>>>>>>>> if that solves it.
>>>>>>>>
>>>>>>>> regards,
>>>>>>>>
>>>&g

Re: [Dhis2-devs] Upgrade from 2.24 to 2.25 -> DataElements relationship to existing DataSets Lost

2016-11-21 Thread Lorill Crees
Hi Lars,

I thought of one more thing to try before sending you a database - I hadn't
dropped our custom SQL views prior to the upgrade. Dropping the views prior
to starting up DHIS 2 fixed the issue and we can now see the relationships
between DataSets and DataElements via DataSetElements preserved.

By the way there wasn't any exceptions in the logs when the views were
present, the data transformation just silently failed. We just need to be
mindful to always drop the SQL views as part of all upgrade processes
(which we usually do).

Cheers,

Lorill



On Mon, Nov 21, 2016 at 3:43 PM, Lorill Crees  wrote:

> Hi Lars,
>
> Thanks, I will follow up with you privately to share a 2.24 database.
>
> Thanks,
>
> Lorill
>
> On Mon, Nov 21, 2016 at 3:37 PM, Lars Helge Øverland 
> wrote:
>
>> Hi Lorill,
>>
>> okay no that is clearly not supposed to happen. Are you able to share
>> privately a database dump from before the 2.25 upgrade?
>>
>> regards,
>>
>> Lars
>>
>>
>> On Tue, Nov 22, 2016 at 12:25 AM, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> We are in the process of testing an upgrade from 2.24 to 2.25. We have
>>> followed the upgrade procedures and run the upgrade sql script
>>> <https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/upgrade-225.sql>.
>>> We have also noted the change in relationship between DataElements and
>>> DataSets in 2.25 with the introduction of DataSetElements as outlined in
>>> the release notes <https://www.dhis2.org/225-upgrade>.
>>>
>>> However, after upgrading, all our DataElements that were previously
>>> associated with specific DataSets are no longer related. After the upgrade
>>> all our existing DataSets have an empty array of DataSetElements.
>>>
>>> Is there something else we need to do here as part of the upgrade to
>>> ensure the DataSet / DataElements relationships are retained and
>>> transformed properly into DataSet / DataSetElements relationships?
>>>
>>> Thanks,
>>>
>>> Lorill
>>>
>>> --
>>> Lorill Crees
>>> Project Leader / Senior Developer
>>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>>
>>> lcr...@2paths.com
>>> skype: lorill2paths
>>> (604) 689-4123 x 15
>>>
>>> ___
>>> 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
>> l...@dhis2.org
>> http://www.dhis2.org <https://www.dhis2.org/>
>>
>>
>
>
> --
> Lorill Crees
> Project Leader / Senior Developer
> 2Paths Solutions Ltd. <http://www.2paths.com>
>
> lcr...@2paths.com
> skype: lorill2paths
> (604) 689-4123 x 15
>



-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Upgrade from 2.24 to 2.25 -> DataElements relationship to existing DataSets Lost

2016-11-21 Thread Lorill Crees
Hi Lars,

Thanks, I will follow up with you privately to share a 2.24 database.

Thanks,

Lorill

On Mon, Nov 21, 2016 at 3:37 PM, Lars Helge Øverland  wrote:

> Hi Lorill,
>
> okay no that is clearly not supposed to happen. Are you able to share
> privately a database dump from before the 2.25 upgrade?
>
> regards,
>
> Lars
>
>
> On Tue, Nov 22, 2016 at 12:25 AM, Lorill Crees  wrote:
>
>> Hi,
>>
>> We are in the process of testing an upgrade from 2.24 to 2.25. We have
>> followed the upgrade procedures and run the upgrade sql script
>> <https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/upgrade-225.sql>.
>> We have also noted the change in relationship between DataElements and
>> DataSets in 2.25 with the introduction of DataSetElements as outlined in
>> the release notes <https://www.dhis2.org/225-upgrade>.
>>
>> However, after upgrading, all our DataElements that were previously
>> associated with specific DataSets are no longer related. After the upgrade
>> all our existing DataSets have an empty array of DataSetElements.
>>
>> Is there something else we need to do here as part of the upgrade to
>> ensure the DataSet / DataElements relationships are retained and
>> transformed properly into DataSet / DataSetElements relationships?
>>
>> Thanks,
>>
>> Lorill
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>
>> lcr...@2paths.com
>> skype: lorill2paths
>> (604) 689-4123 x 15
>>
>> ___
>> 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
> l...@dhis2.org
> http://www.dhis2.org <https://www.dhis2.org/>
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Upgrade from 2.24 to 2.25 -> DataElements relationship to existing DataSets Lost

2016-11-21 Thread Lorill Crees
Hi,

We are in the process of testing an upgrade from 2.24 to 2.25. We have
followed the upgrade procedures and run the upgrade sql script
<https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/upgrade-225.sql>.
We have also noted the change in relationship between DataElements and
DataSets in 2.25 with the introduction of DataSetElements as outlined in
the release notes <https://www.dhis2.org/225-upgrade>.

However, after upgrading, all our DataElements that were previously
associated with specific DataSets are no longer related. After the upgrade
all our existing DataSets have an empty array of DataSetElements.

Is there something else we need to do here as part of the upgrade to ensure
the DataSet / DataElements relationships are retained and transformed
properly into DataSet / DataSetElements relationships?

Thanks,

Lorill

-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] can't delete data element

2016-11-18 Thread Lorill Crees
Great, thanks Lars!

On Fri, Nov 18, 2016 at 10:03 AM, Lars Helge Øverland 
wrote:

>
> Sure - will keep you posted - we will get it done in a few weeks time.
>
> regards,
>
> Lars
>
>
> On Fri, Nov 18, 2016 at 7:01 PM, Lorill Crees  wrote:
>
>> Thanks Lars. Yes - keeping it on a data element will work for us.
>>
>> Could you please let me know when this is complete for us to try out? Or
>> let me know the issue so I can track it?
>>
>> Thanks for accommodating this functionality - much appreciated!
>>
>> On Fri, Nov 18, 2016 at 9:50 AM, Lars Helge Øverland 
>> wrote:
>>
>>>
>>>
>>> On Fri, Nov 18, 2016 at 6:43 PM, Lorill Crees  wrote:
>>>
>>>> Hi Lars,
>>>>
>>>> That functionality would be what we need. Is this something that you
>>>> could backport to 2.25?
>>>>
>>>>
>>> Okay we can work on that. I have written an issue. Yes I think we can
>>> back-port to 2.25.
>>>
>>>
>>>> Also wondering if it would be possible to prune for a Data Set? That
>>>> would reduce the amount of API calls as our end goal is to delete the Data
>>>> Set itself.
>>>>
>>>>
>>> I think we will keep it on data element - don't want to take this too
>>> far. I guess you could chain API calls for this without too much hassle.
>>>
>>> best regards,
>>>
>>> Lars
>>>
>>>
>>>
>>>
>>>> Let me know. Thanks,
>>>>
>>>> Lorill
>>>>
>>>> On Fri, Nov 18, 2016 at 9:16 AM, Lars Helge Øverland 
>>>> wrote:
>>>>
>>>>> Sorry Lorill, I misread your question.
>>>>>
>>>>> No we haven't changed the policy that data element can be deleted if
>>>>> data value audits exist.
>>>>>
>>>>> We recently implemented a feature for pruning
>>>>> <https://dhis2.github.io/dhis2-docs/master/en/developer/html/webapi_maintenance.html>
>>>>> data (including approval records, data set completeness records, data 
>>>>> value
>>>>> audits and data values) for organisation unit units.
>>>>>
>>>>> /api/26/maintenance/dataPruning/organisationUnits/
>>>>>
>>>>> We could implement something similar for data elements.
>>>>>
>>>>>
>>>>> Lars
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Nov 18, 2016 at 6:03 PM, Lorill Crees 
>>>>> wrote:
>>>>>
>>>>>> Hi Lars,
>>>>>>
>>>>>> Thanks for the quick reply. Does this mean if we soft delete all data
>>>>>> values associated with a data element we will then be able to hard delete
>>>>>> the data element?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Lorill
>>>>>>
>>>>>> On Fri, Nov 18, 2016 at 8:54 AM, Lars Helge Øverland 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Lorill,
>>>>>>>
>>>>>>> in 2.25 we introduced "soft data value" delete, meaning that in the
>>>>>>> database we simply mark data values as deleted using the "deleted" 
>>>>>>> property
>>>>>>> (this is transparent to the users). This means that foreign key 
>>>>>>> constraints
>>>>>>> from data value audit values should not be a problem anymore. Let us 
>>>>>>> know
>>>>>>> if that solves it.
>>>>>>>
>>>>>>> regards,
>>>>>>>
>>>>>>> Lars
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Nov 18, 2016 at 5:48 PM, Lorill Crees 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> We have a long standing request to allow users of our custom DHIS 2
>>>>>>>> app to delete specific Data Sets and all corresponding data elements 
>>>>>>>> and
>>>>>>>> values. We need to do this via the 

Re: [Dhis2-devs] [Dhis2-users] can't delete data element

2016-11-18 Thread Lorill Crees
Thanks Lars. Yes - keeping it on a data element will work for us.

Could you please let me know when this is complete for us to try out? Or
let me know the issue so I can track it?

Thanks for accommodating this functionality - much appreciated!

On Fri, Nov 18, 2016 at 9:50 AM, Lars Helge Øverland  wrote:

>
>
> On Fri, Nov 18, 2016 at 6:43 PM, Lorill Crees  wrote:
>
>> Hi Lars,
>>
>> That functionality would be what we need. Is this something that you
>> could backport to 2.25?
>>
>>
> Okay we can work on that. I have written an issue. Yes I think we can
> back-port to 2.25.
>
>
>> Also wondering if it would be possible to prune for a Data Set? That
>> would reduce the amount of API calls as our end goal is to delete the Data
>> Set itself.
>>
>>
> I think we will keep it on data element - don't want to take this too far.
> I guess you could chain API calls for this without too much hassle.
>
> best regards,
>
> Lars
>
>
>
>
>> Let me know. Thanks,
>>
>> Lorill
>>
>> On Fri, Nov 18, 2016 at 9:16 AM, Lars Helge Øverland 
>> wrote:
>>
>>> Sorry Lorill, I misread your question.
>>>
>>> No we haven't changed the policy that data element can be deleted if
>>> data value audits exist.
>>>
>>> We recently implemented a feature for pruning
>>> <https://dhis2.github.io/dhis2-docs/master/en/developer/html/webapi_maintenance.html>
>>> data (including approval records, data set completeness records, data value
>>> audits and data values) for organisation unit units.
>>>
>>> /api/26/maintenance/dataPruning/organisationUnits/
>>>
>>> We could implement something similar for data elements.
>>>
>>>
>>> Lars
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Nov 18, 2016 at 6:03 PM, Lorill Crees  wrote:
>>>
>>>> Hi Lars,
>>>>
>>>> Thanks for the quick reply. Does this mean if we soft delete all data
>>>> values associated with a data element we will then be able to hard delete
>>>> the data element?
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>> On Fri, Nov 18, 2016 at 8:54 AM, Lars Helge Øverland 
>>>> wrote:
>>>>
>>>>> Hi Lorill,
>>>>>
>>>>> in 2.25 we introduced "soft data value" delete, meaning that in the
>>>>> database we simply mark data values as deleted using the "deleted" 
>>>>> property
>>>>> (this is transparent to the users). This means that foreign key 
>>>>> constraints
>>>>> from data value audit values should not be a problem anymore. Let us know
>>>>> if that solves it.
>>>>>
>>>>> regards,
>>>>>
>>>>> Lars
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Nov 18, 2016 at 5:48 PM, Lorill Crees 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> We have a long standing request to allow users of our custom DHIS 2
>>>>>> app to delete specific Data Sets and all corresponding data elements and
>>>>>> values. We need to do this via the API.
>>>>>>
>>>>>> It seems the only thing preventing us from doing this now is the
>>>>>> deletion of datavalueaudit records. Is there any plan to allow
>>>>>> deletion of datavalueaudit records via the API? Or to remove
>>>>>> dependencies from the datavalueaudit records so they can be standalone 
>>>>>> and
>>>>>> not prevent the deletion of the corresponding data elements?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Lorill
>>>>>>
>>>>>> On Thu, Nov 17, 2016 at 11:37 PM, channara rin <
>>>>>> rin.chann...@gmail.com> wrote:
>>>>>>
>>>>>>> YES,
>>>>>>> thank you for reminding...
>>>>>>>
>>>>>>> ___
>>>>>>> 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.n

Re: [Dhis2-devs] [Dhis2-users] can't delete data element

2016-11-18 Thread Lorill Crees
Hi Lars,

That functionality would be what we need. Is this something that you could
backport to 2.25?

Also wondering if it would be possible to prune for a Data Set? That would
reduce the amount of API calls as our end goal is to delete the Data Set
itself.

Let me know. Thanks,

Lorill

On Fri, Nov 18, 2016 at 9:16 AM, Lars Helge Øverland  wrote:

> Sorry Lorill, I misread your question.
>
> No we haven't changed the policy that data element can be deleted if data
> value audits exist.
>
> We recently implemented a feature for pruning
> <https://dhis2.github.io/dhis2-docs/master/en/developer/html/webapi_maintenance.html>
> data (including approval records, data set completeness records, data value
> audits and data values) for organisation unit units.
>
> /api/26/maintenance/dataPruning/organisationUnits/
>
> We could implement something similar for data elements.
>
>
> Lars
>
>
>
>
>
>
>
> On Fri, Nov 18, 2016 at 6:03 PM, Lorill Crees  wrote:
>
>> Hi Lars,
>>
>> Thanks for the quick reply. Does this mean if we soft delete all data
>> values associated with a data element we will then be able to hard delete
>> the data element?
>>
>> Thanks,
>>
>> Lorill
>>
>> On Fri, Nov 18, 2016 at 8:54 AM, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Lorill,
>>>
>>> in 2.25 we introduced "soft data value" delete, meaning that in the
>>> database we simply mark data values as deleted using the "deleted" property
>>> (this is transparent to the users). This means that foreign key constraints
>>> from data value audit values should not be a problem anymore. Let us know
>>> if that solves it.
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>>
>>> On Fri, Nov 18, 2016 at 5:48 PM, Lorill Crees  wrote:
>>>
>>>> Hi,
>>>>
>>>> We have a long standing request to allow users of our custom DHIS 2 app
>>>> to delete specific Data Sets and all corresponding data elements and
>>>> values. We need to do this via the API.
>>>>
>>>> It seems the only thing preventing us from doing this now is the
>>>> deletion of datavalueaudit records. Is there any plan to allow
>>>> deletion of datavalueaudit records via the API? Or to remove
>>>> dependencies from the datavalueaudit records so they can be standalone and
>>>> not prevent the deletion of the corresponding data elements?
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>> On Thu, Nov 17, 2016 at 11:37 PM, channara rin 
>>>> wrote:
>>>>
>>>>> YES,
>>>>> thank you for reminding...
>>>>>
>>>>> ___
>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Lorill Crees
>>>> Project Leader / Senior Developer
>>>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>>>
>>>> lcr...@2paths.com
>>>> skype: lorill2paths
>>>> (604) 689-4123 x 15
>>>>
>>>> ___
>>>> 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
>>> l...@dhis2.org
>>> http://www.dhis2.org <https://www.dhis2.org/>
>>>
>>>
>>
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>
>> lcr...@2paths.com
>> skype: lorill2paths
>> (604) 689-4123 x 15
>>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org <https://www.dhis2.org/>
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] can't delete data element

2016-11-18 Thread Lorill Crees
Hi Lars,

Thanks for the quick reply. Does this mean if we soft delete all data
values associated with a data element we will then be able to hard delete
the data element?

Thanks,

Lorill

On Fri, Nov 18, 2016 at 8:54 AM, Lars Helge Øverland  wrote:

> Hi Lorill,
>
> in 2.25 we introduced "soft data value" delete, meaning that in the
> database we simply mark data values as deleted using the "deleted" property
> (this is transparent to the users). This means that foreign key constraints
> from data value audit values should not be a problem anymore. Let us know
> if that solves it.
>
> regards,
>
> Lars
>
>
>
> On Fri, Nov 18, 2016 at 5:48 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> We have a long standing request to allow users of our custom DHIS 2 app
>> to delete specific Data Sets and all corresponding data elements and
>> values. We need to do this via the API.
>>
>> It seems the only thing preventing us from doing this now is the deletion
>> of datavalueaudit records. Is there any plan to allow deletion of 
>> datavalueaudit
>> records via the API? Or to remove dependencies from the datavalueaudit
>> records so they can be standalone and not prevent the deletion of the
>> corresponding data elements?
>>
>> Thanks,
>>
>> Lorill
>>
>> On Thu, Nov 17, 2016 at 11:37 PM, channara rin 
>> wrote:
>>
>>> YES,
>>> thank you for reminding...
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>
>> lcr...@2paths.com
>> skype: lorill2paths
>> (604) 689-4123 x 15
>>
>> ___
>> 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
> l...@dhis2.org
> http://www.dhis2.org <https://www.dhis2.org/>
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] can't delete data element

2016-11-18 Thread Lorill Crees
Hi,

We have a long standing request to allow users of our custom DHIS 2 app to
delete specific Data Sets and all corresponding data elements and values.
We need to do this via the API.

It seems the only thing preventing us from doing this now is the deletion
of datavalueaudit records. Is there any plan to allow deletion of
datavalueaudit
records via the API? Or to remove dependencies from the datavalueaudit
records so they can be standalone and not prevent the deletion of the
corresponding data elements?

Thanks,

Lorill

On Thu, Nov 17, 2016 at 11:37 PM, channara rin 
wrote:

> YES,
> thank you for reminding...
>
> ___
> 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
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] DHIS 2 V 2.24 - /api/24/currentUser not available

2016-10-24 Thread Lorill Crees
Hi Morten,

Thanks for this. We are getting the user roles from the user credentials,
and I've confirmed this is available under /api/me and /api/24/me.

Thanks,

Lorill

On Sun, Oct 23, 2016 at 7:49 PM, Morten Olav Hansen 
wrote:

> Hi Lorill
>
> So there's a couple of things to note here:
>
> 1) You probably want to use the name `me` instead of `currentUser` as it'
> the new name for it (and has been for a while, just being aliased to
> `currentUser``
> 2) In 224 we included a new `me` endpoint, which can now be reached at
> `/api/24/me` and `/api/25/me`
>
> There seems to be a bug here though, that new endpoint should also be
> available at `/api/me` (and not `/api/currentUser`)
>
> That said, the new endpoint is a bit different. What are you using this
> endpoint for? is it just to get info about current user, or is it to use
> some of its other capabilities ? like data set, program availability
> (`/api/23/currentUser/programs` `/api/23/currentUser/dataSet`)
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Tue, Oct 18, 2016 at 10:46 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> We are using 2.24 revision e2f8d0e and the endpoint /api/24/currentUser
>> is not available. However, these two endpoints *are* available:
>>
>>- /api/currentUser
>>- /api/23/currentUser
>>
>> Is it possible to add the endpoint /api/24/currentUser, or is there a
>> reason it is missing?
>>
>> Thanks,
>>
>> Lorill
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>
>> lcr...@2paths.com
>> skype: lorill2paths
>> (604) 689-4123 x 15
>>
>> _______
>> 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
>>
>>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Response differences between /api/metadata and /api/23/metadata

2016-10-18 Thread Lorill Crees
Hi Morten,

I'm just following up on the two items below (inline).

Thanks!

Lorill


On Fri, Sep 16, 2016 at 8:24 AM, Lorill Crees  wrote:

> Thanks for getting back to me so quickly Morten! I've answered inline
> below.
>
> On Thu, Sep 15, 2016 at 10:19 PM, Morten Olav Hansen 
> wrote:
>
>1. When submitting an identical post containing
>{"programTrackedEntityAttributes" [...], "program" [...]}, where there
>is an error in the Program being posted, the call to /api/metadata responds
>with success for "programTrackedEntityAttributes" with the correct
>"importCount" counts, but the call to /api/23/metadata responds for
>"programTrackedEntityAttributes" with "stats" counts containing all
>zeros, and no "objectReports". It is like the first item being posted is
>completely ignored if the second item posted has errors. Is this the
>intended behaviour? And should there be "objectReports" regardless? Please
>see attached examples.
>
> Yes, what kind of error are you getting? a reference error, or a
>>>> validation error? in the old importer, it would always try to just import
>>>> what it could.. which was not always ideal (missing references etc was just
>>>> ignored). If it's just reference error, and you want to ignore them..
>>>> please try with `atomicMode=NONE`, regarding the object report..
>>>>
>>>
>>> We need to write our response parser to be able to parse any kind of
>>> error that may happen. Our program ingests CSV files from the user and we
>>> attempt to do as much error checking in advance as possible, but there may
>>> be other errors that happen when posting to the API such as validation
>>> errors, reference errors, or even 500 errors if there is an error within
>>> DHIS 2 itself. Given that we need to cater to every possible scenario, I'm
>>> not sure if we should be using "atomicMode=NONE" or not. Also, should there
>>> be "objectReports" regardless?
>>>
>>
>> I'm not 100% sure what is the best approach here, I think maybe we want
>> to add some new parameters to control the output a bit. If you are posting
>> 10 new data elements, it is very useful to get the object report back as
>> they will contain the new UID of the object, on the flipside.. if you are
>> importing 5 objects.. the payload sent back might just too much in most
>> cases, and not very useful (in that case, probably you are more interested
>> in errors)
>>
>
>
1. Adding new parameters to control the output is a great idea, is this
something that you plan to implement as part of the blueprint you mention
below?
2. I'm also wondering if it would make more sense to mark the ignored
objects as "ignored" in the stats, instead of having zeros for all the
stats? I've re-attached our output, and you can see that I posted 4
programTrackedEntityAttributes, and the stats show 0 total / 0 ignored
which is not entirely accurate. I would have expected 4 total / 4 ignored.
Thoughts?

>
>>
>
>>
>>>>>1. The /api/23/metadata response with "errorReports" within
>>>>>"objectReports" appears to have replaced the /api/metadata
>>>>>"importConflicts". In /api/metadata, the "importConflicts" "object" 
>>>>> field
>>>>>contains the actual name of the object that has the error (eg: the 
>>>>> Program
>>>>>short name in our case). However, in /api/23/metadata there is only the
>>>>>index which makes it more work to debug. Is it possible to also 
>>>>> include the
>>>>>name of the object in the error report like the prior API version does?
>>>>>
>>>>> Hm, right. I understand that it's useful, but that can easily add up
>>>> to a lot of data returned. Maybe we should add some kind of "debug" mode
>>>> where more output is provided.
>>>>
>>>
>>> Although I understand that this might add more data to the payload, it
>>> would decrease the amount of data that we need to pass around in our app,
>>> and also potentially decrease the number of API calls we need to do. Not
>>> having this information in the response now means we need to pass around
>>> our original post data (which can be quite large, and which we aren't
>>> currently doing) and do a lookup by ID to send any kind of useful
>>> informat

[Dhis2-devs] DHIS 2 V 2.24 - /api/24/currentUser not available

2016-10-18 Thread Lorill Crees
Hi,

We are using 2.24 revision e2f8d0e and the endpoint /api/24/currentUser is
not available. However, these two endpoints *are* available:

   - /api/currentUser
   - /api/23/currentUser

Is it possible to add the endpoint /api/24/currentUser, or is there a
reason it is missing?

Thanks,

Lorill

-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Problem generating resource tables

2016-09-19 Thread Lorill Crees
t;>>> at org.hisp.dhis.resourcetable.table.DataSetOrganisationUnitCat
>>>>> egoryResourceTable.getPopulateTempTableContent(DataSetOrgani
>>>>> sationUnitCategoryResourceTable.java:96)
>>>>>
>>>>> at org.hisp.dhis.resourcetable.jdbc.JdbcResourceTableStore.gene
>>>>> rateResourceTable(JdbcResourceTableStore.java:77)
>>>>>
>>>>> at org.hisp.dhis.resourcetable.DefaultResourceTableService.gene
>>>>> rateDataSetOrganisationUnitCategoryTable(DefaultResourceTabl
>>>>> eService.java:145)
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>>>> ssorImpl.java:62)
>>>>>
>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>>>> thodAccessorImpl.java:43)
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:498)
>>>>>
>>>>> at org.springframework.aop.support.AopUtils.invokeJoinpointUsin
>>>>> gReflection(AopUtils.java:302)
>>>>>
>>>>> at org.springframework.aop.framework.ReflectiveMethodInvocation
>>>>> .invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>>>>
>>>>> at org.springframework.aop.framework.ReflectiveMethodInvocation
>>>>> .proceed(ReflectiveMethodInvocation.java:157)
>>>>>
>>>>> at org.springframework.transaction.interceptor.TransactionInter
>>>>> ceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>>>>>
>>>>> at org.springframework.transaction.interceptor.TransactionAspec
>>>>> tSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
>>>>>
>>>>> at org.springframework.transaction.interceptor.TransactionInter
>>>>> ceptor.invoke(TransactionInterceptor.java:96)
>>>>>
>>>>> at org.springframework.aop.framework.ReflectiveMethodInvocation
>>>>> .proceed(ReflectiveMethodInvocation.java:179)
>>>>>
>>>>> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
>>>>> JdkDynamicAopProxy.java:208)
>>>>>
>>>>> at 
>>>>> com.sun.proxy.$Proxy76.generateDataSetOrganisationUnitCategoryTable(Unknown
>>>>> Source)
>>>>>
>>>>> at org.hisp.dhis.resourcetable.scheduling.ResourceTableTask.gen
>>>>> erateAll(ResourceTableTask.java:115)
>>>>>
>>>>> at org.hisp.dhis.resourcetable.scheduling.ResourceTableTask.run
>>>>> (ResourceTableTask.java:84)
>>>>>
>>>>> at org.springframework.scheduling.support.DelegatingErrorHandli
>>>>> ngRunnable.run(DelegatingErrorHandlingRunnable.java:54)
>>>>>
>>>>> at java.util.concurrent.Executors$RunnableAdapter.call(
>>>>> Executors.java:511)
>>>>>
>>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>>>
>>>>> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFu
>>>>> tureTask.ac
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Knut Staring
>>>> Dept. of Informatics, University of Oslo
>>>> Norway: +4791880522
>>>> Skype: knutstar
>>>> http://dhis2.org
>>>>
>>>
>>>
>>>
>>> --
>>> Knut Staring
>>> Dept. of Informatics, University of Oslo
>>> Norway: +4791880522
>>> Skype: knutstar
>>> http://dhis2.org
>>>
>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Response differences between /api/metadata and /api/23/metadata

2016-09-16 Thread Lorill Crees
re is only the
>>>>index which makes it more work to debug. Is it possible to also include 
>>>> the
>>>>name of the object in the error report like the prior API version does?
>>>>
>>>> Hm, right. I understand that it's useful, but that can easily add up to
>>> a lot of data returned. Maybe we should add some kind of "debug" mode where
>>> more output is provided.
>>>
>>
>> Although I understand that this might add more data to the payload, it
>> would decrease the amount of data that we need to pass around in our app,
>> and also potentially decrease the number of API calls we need to do. Not
>> having this information in the response now means we need to pass around
>> our original post data (which can be quite large, and which we aren't
>> currently doing) and do a lookup by ID to send any kind of useful
>> information back to the user. Additionally, we may have even posted these
>> objects by ID only, which means we will now need to do another API call to
>> look up the object to get useful information to send back to the user. Keep
>> in mind that in our app, the user doesn't actually even have a knowledge of
>> IDs - we are doing those lookups for them by name or code.
>> Would it be possible to add a flag to the api call where we can request
>> the name or shortname or code to be returned in addition to just the ID?
>> Perhaps similar to the metadata field filter?  Where we could say supply
>> importConflictsFields=:identifiable?
>>
>
> Yes, let me see what I can do for 225 at least (I might be able to
> backport to 224 if it doesn't disrupt things too much)
>
> https://blueprints.launchpad.net/dhis2/+spec/importer-parameter-to-adjust-
> importreport-output
>

Thanks Morten, that's great!

>
>
>
>>
>>
>>>
>>> --
>>> Morten
>>>
>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>>
>>>>
>>>> ___
>>>> 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
>>>>
>>>>
>>>
>>
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>
>> lcr...@2paths.com
>> skype: lorill2paths
>> (604) 689-4123 x 15
>>
>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15


metadata23PostResponse.json
Description: application/json


metadataDefaultPostResponse.json
Description: application/json


metadataPostBody.json
Description: application/json
___
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] Response differences between /api/metadata and /api/23/metadata

2016-09-15 Thread Lorill Crees
 error (eg: the Program
>>short name in our case). However, in /api/23/metadata there is only the
>>index which makes it more work to debug. Is it possible to also include 
>> the
>>name of the object in the error report like the prior API version does?
>>
>> Hm, right. I understand that it's useful, but that can easily add up to a
> lot of data returned. Maybe we should add some kind of "debug" mode where
> more output is provided.
>

Although I understand that this might add more data to the payload, it
would decrease the amount of data that we need to pass around in our app,
and also potentially decrease the number of API calls we need to do. Not
having this information in the response now means we need to pass around
our original post data (which can be quite large, and which we aren't
currently doing) and do a lookup by ID to send any kind of useful
information back to the user. Additionally, we may have even posted these
objects by ID only, which means we will now need to do another API call to
look up the object to get useful information to send back to the user. Keep
in mind that in our app, the user doesn't actually even have a knowledge of
IDs - we are doing those lookups for them by name or code.
Would it be possible to add a flag to the api call where we can request the
name or shortname or code to be returned in addition to just the ID?
Perhaps similar to the metadata field filter?  Where we could say supply
importConflictsFields=:identifiable?


>
> --
> Morten
>
>
>> Thanks,
>>
>> Lorill
>>
>>
>>
>> ___
>> 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
>>
>>
>


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

lcr...@2paths.com
skype: lorill2paths
(604) 689-4123 x 15
___
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] Response differences between /api/metadata and /api/23/metadata

2016-08-31 Thread Lorill Crees
Hi - I'm just following up on these questions. Your help is appreciated.

Thanks,

Lorill

On Mon, Aug 22, 2016 at 2:10 PM, Lorill Crees  wrote:

> Hi,
>
> I am working on updating our applications to DHIS 2 v 2.23 specifically in
> regards to upgrading to using the /api/23/metadata api call. I am testing
> against revision 23053.
>
> We have a few issues:
>
>1. Is there any documentation outlining the response structure from
>all API calls, including when there are errors or any other scenarios? We
>have been upgrading our response parser on a trial and error basis
>attempting to mimic all possible scenarios which is not ideal.
>2. When submitting an identical post containing {"
>programTrackedEntityAttributes" [...], "program" [...]}, where there
>is an error in the Program being posted, the call to /api/metadata responds
>with success for "programTrackedEntityAttributes" with the correct
>"importCount" counts, but the call to /api/23/metadata responds for "
>programTrackedEntityAttributes" with "stats" counts containing all
>zeros, and no "objectReports". It is like the first item being posted is
>completely ignored if the second item posted has errors. Is this the
>intended behaviour? And should there be "objectReports" regardless? Please
>see attached examples.
>3. There is no longer a "lastImported" field. Is this now deprecated?
>4. The /api/23/metadata response with "errorReports" within
>"objectReports" appears to have replaced the /api/metadata
>"importConflicts". In /api/metadata, the "importConflicts" "object" field
>contains the actual name of the object that has the error (eg: the Program
>short name in our case). However, in /api/23/metadata there is only the
>index which makes it more work to debug. Is it possible to also include the
>name of the object in the error report like the prior API version does?
>
> Thanks,
>
> Lorill
>
>
>
___
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] GIS App Does Not Load and Just Hangs

2016-08-23 Thread Lorill Crees
Hi Jan,

I am just following up on the developer list thread with our offline
discussions for everyone's benefit. I've pasted your response below. We
will upgrade to 2.24 to fix this issue.

Cheers,

Lorill

On Tue, Aug 23, 2016 at 1:00 AM, Jan Henrik Øverland  wrote:

> Hi Lorill,
>
> Yes, we have done some testing and it seems nothing is wrong with your
> data or the GIS app.
>
> Turns out the way optionsets are handled on the server is not at all
> optimised in 2.22, but this has been taken care of in 2.24. The initial
> optionsets request that the GIS app does (which times out for you in 2.22)
> should load in less than a second in 2.24..
>
> I have talked to the backend guys and they say that this is unfortunately
> not a simple backport to 2.22. Any chance you could upgrade to 2.24? That
> will also provide you with a lot of nice new GIS functionality, like
> clustering of (millions of) events, access to Google Earth Engine layers
> etc.
>
> Jan
>

On Tue, Aug 16, 2016 at 10:20 AM, Lorill Crees  wrote:

> Hi Jan,
>
> I am checking with the team that owns this instance for permission to
> share the database with you and will get back to you.
>
> Thanks,
>
> Lorill
>
> On Tue, Aug 16, 2016 at 12:45 AM, Jan Henrik Øverland 
> wrote:
>
>> Hi Lorill,
>>
>> We are looking into ways to speed up the loading of option sets. Any
>> chance you could share a sample database privately so we can test it
>> properly?
>>
>> Jan
>>
>> On 16 August 2016 at 00:42, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> Do you have any suggestions for this issue? We're currently blocked and
>>> not able to use the GIS app on this instance.
>>>
>>> Thanks,
>>>
>>> Lorill
>>>
>>> On Thu, Aug 11, 2016 at 12:00 PM, Lorill Crees 
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> In a separate thread "GIS Google Maps Error" I had mentioned we are
>>>> having an issue with one of our instances where the GIS app will not load
>>>> and just hangs.
>>>>
>>>> After much investigation, we have tracked this down to one of the api
>>>> calls that DHIS 2 is doing when loading the app to retrieve option sets.
>>>>
>>>> When viewing the browser network JS console, there is a call to
>>>> /optionSets. It takes too long and times out (it gets cancelled). I've
>>>> pasted the api call below. The result is that the GIS app just hangs and
>>>> never loads.
>>>>
>>>> Further investigating, it looks like EXTJS has a default timeout of 30s
>>>> which explains the timeout from within the DHIS 2 code. Performing the
>>>> request outside of the DHIS 2 app returns OK, although the call takes
>>>> almost 80 seconds to return.
>>>>
>>>> By the way, the instance has the DHIS 2 server setting of "no cache", I
>>>> have used the Browser Cache Cleaner within DHIS 2, and also manually
>>>> cleared the cache in my browser.
>>>>
>>>> I have also made a copy of the database locally, and am running the
>>>> instance directly via Tomcat (no NGINX). I can sporadically recreate this
>>>> as the return time for the call to optionSets is close to 30 seconds.
>>>> Please see my two screenshots with the same url locally:
>>>>
>>>>- when /optionSets returns under 30 seconds, the GIS app loads
>>>>properly
>>>>- when /optionSets returns over 30 seconds, the GIS app hangs
>>>>
>>>> One odd thing is that the api call being used locally for optionSets is
>>>> slightly different than the one on the server, although they are both
>>>> running the exact version / revision of DHIS 2 and I am calling the same
>>>> url.
>>>>
>>>> We are using 2.22 R 22089.
>>>>
>>>> Any help would be appreciated!
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>> 
>>>>
>>>> *On Server:*
>>>>
>>>> url: https://[server]/dhis-web-mapping/index.html
>>>>
>>>> /api/optionSets.json?fields=id,displayName|rename(name),vers
>>>> ion,options[code,displayName|rename(name)]&paging=false&_dc=
>>>> 1470939760248
>>>>
>>>> *(*Cancelled at 30.00s) See screenshot
>>>>
>>>> When loading this url directly, it takes 79 seconds to return and the
>>>> response is very large
>>>>
>>>> *On Localhost:*
>>>>
>>>> url: http://localhost:8090/dhis/dhis-web-mapping/index.html
>>>>
>>>> /api/optionSets.json?fields=id,version&paging=false&_dc=1470934124633
>>>>
>>>>- app loads when api call returns in 22.25 seconds
>>>>- app hang when api call cancelled at 30 seconds
>>>>
>>>>
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Jan Henrik Øverland
>> Software developer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org <https://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] Response differences between /api/metadata and /api/23/metadata

2016-08-22 Thread Lorill Crees
Hi,

I am working on updating our applications to DHIS 2 v 2.23 specifically in
regards to upgrading to using the /api/23/metadata api call. I am testing
against revision 23053.

We have a few issues:

   1. Is there any documentation outlining the response structure from all
   API calls, including when there are errors or any other scenarios? We have
   been upgrading our response parser on a trial and error basis attempting to
   mimic all possible scenarios which is not ideal.
   2. When submitting an identical post containing
   {"programTrackedEntityAttributes" [...], "program" [...]}, where there is
   an error in the Program being posted, the call to /api/metadata responds
   with success for "programTrackedEntityAttributes" with the correct
   "importCount" counts, but the call to /api/23/metadata responds for
   "programTrackedEntityAttributes" with "stats" counts containing all zeros,
   and no "objectReports". It is like the first item being posted is
   completely ignored if the second item posted has errors. Is this the
   intended behaviour? And should there be "objectReports" regardless? Please
   see attached examples.
   3. There is no longer a "lastImported" field. Is this now deprecated?
   4. The /api/23/metadata response with "errorReports" within
   "objectReports" appears to have replaced the /api/metadata
   "importConflicts". In /api/metadata, the "importConflicts" "object" field
   contains the actual name of the object that has the error (eg: the Program
   short name in our case). However, in /api/23/metadata there is only the
   index which makes it more work to debug. Is it possible to also include the
   name of the object in the error report like the prior API version does?

Thanks,

Lorill


metadata23PostResponse.json
Description: application/json


metadataDefaultPostResponse.json
Description: application/json


metadataPostBody.json
Description: application/json
___
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] GIS App Does Not Load and Just Hangs

2016-08-16 Thread Lorill Crees
Hi Jan,

I am checking with the team that owns this instance for permission to share
the database with you and will get back to you.

Thanks,

Lorill

On Tue, Aug 16, 2016 at 12:45 AM, Jan Henrik Øverland  wrote:

> Hi Lorill,
>
> We are looking into ways to speed up the loading of option sets. Any
> chance you could share a sample database privately so we can test it
> properly?
>
> Jan
>
> On 16 August 2016 at 00:42, Lorill Crees  wrote:
>
>> Hi,
>>
>> Do you have any suggestions for this issue? We're currently blocked and
>> not able to use the GIS app on this instance.
>>
>> Thanks,
>>
>> Lorill
>>
>> On Thu, Aug 11, 2016 at 12:00 PM, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> In a separate thread "GIS Google Maps Error" I had mentioned we are
>>> having an issue with one of our instances where the GIS app will not load
>>> and just hangs.
>>>
>>> After much investigation, we have tracked this down to one of the api
>>> calls that DHIS 2 is doing when loading the app to retrieve option sets.
>>>
>>> When viewing the browser network JS console, there is a call to
>>> /optionSets. It takes too long and times out (it gets cancelled). I've
>>> pasted the api call below. The result is that the GIS app just hangs and
>>> never loads.
>>>
>>> Further investigating, it looks like EXTJS has a default timeout of 30s
>>> which explains the timeout from within the DHIS 2 code. Performing the
>>> request outside of the DHIS 2 app returns OK, although the call takes
>>> almost 80 seconds to return.
>>>
>>> By the way, the instance has the DHIS 2 server setting of "no cache", I
>>> have used the Browser Cache Cleaner within DHIS 2, and also manually
>>> cleared the cache in my browser.
>>>
>>> I have also made a copy of the database locally, and am running the
>>> instance directly via Tomcat (no NGINX). I can sporadically recreate this
>>> as the return time for the call to optionSets is close to 30 seconds.
>>> Please see my two screenshots with the same url locally:
>>>
>>>- when /optionSets returns under 30 seconds, the GIS app loads
>>>properly
>>>- when /optionSets returns over 30 seconds, the GIS app hangs
>>>
>>> One odd thing is that the api call being used locally for optionSets is
>>> slightly different than the one on the server, although they are both
>>> running the exact version / revision of DHIS 2 and I am calling the same
>>> url.
>>>
>>> We are using 2.22 R 22089.
>>>
>>> Any help would be appreciated!
>>>
>>> Thanks,
>>>
>>> Lorill
>>>
>>> 
>>>
>>> *On Server:*
>>>
>>> url: https://[server]/dhis-web-mapping/index.html
>>>
>>> /api/optionSets.json?fields=id,displayName|rename(name),vers
>>> ion,options[code,displayName|rename(name)]&paging=false&_dc=
>>> 1470939760248
>>>
>>> *(*Cancelled at 30.00s) See screenshot
>>>
>>> When loading this url directly, it takes 79 seconds to return and the
>>> response is very large
>>>
>>> *On Localhost:*
>>>
>>> url: http://localhost:8090/dhis/dhis-web-mapping/index.html
>>>
>>> /api/optionSets.json?fields=id,version&paging=false&_dc=1470934124633
>>>
>>>- app loads when api call returns in 22.25 seconds
>>>- app hang when api call cancelled at 30 seconds
>>>
>>>
>>
>> ___
>> 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
>>
>>
>
>
> --
> Jan Henrik Øverland
> Software developer, DHIS 2
> University of Oslo
> http://www.dhis2.org <https://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


Re: [Dhis2-devs] GIS App Does Not Load and Just Hangs

2016-08-15 Thread Lorill Crees
Hi,

Do you have any suggestions for this issue? We're currently blocked and not
able to use the GIS app on this instance.

Thanks,

Lorill

On Thu, Aug 11, 2016 at 12:00 PM, Lorill Crees  wrote:

> Hi,
>
> In a separate thread "GIS Google Maps Error" I had mentioned we are having
> an issue with one of our instances where the GIS app will not load and just
> hangs.
>
> After much investigation, we have tracked this down to one of the api
> calls that DHIS 2 is doing when loading the app to retrieve option sets.
>
> When viewing the browser network JS console, there is a call to
> /optionSets. It takes too long and times out (it gets cancelled). I've
> pasted the api call below. The result is that the GIS app just hangs and
> never loads.
>
> Further investigating, it looks like EXTJS has a default timeout of 30s
> which explains the timeout from within the DHIS 2 code. Performing the
> request outside of the DHIS 2 app returns OK, although the call takes
> almost 80 seconds to return.
>
> By the way, the instance has the DHIS 2 server setting of "no cache", I
> have used the Browser Cache Cleaner within DHIS 2, and also manually
> cleared the cache in my browser.
>
> I have also made a copy of the database locally, and am running the
> instance directly via Tomcat (no NGINX). I can sporadically recreate this
> as the return time for the call to optionSets is close to 30 seconds.
> Please see my two screenshots with the same url locally:
>
>- when /optionSets returns under 30 seconds, the GIS app loads properly
>- when /optionSets returns over 30 seconds, the GIS app hangs
>
> One odd thing is that the api call being used locally for optionSets is
> slightly different than the one on the server, although they are both
> running the exact version / revision of DHIS 2 and I am calling the same
> url.
>
> We are using 2.22 R 22089.
>
> Any help would be appreciated!
>
> Thanks,
>
> Lorill
>
> 
>
> *On Server:*
>
> url: https://[server]/dhis-web-mapping/index.html
>
> /api/optionSets.json?fields=id,displayName|rename(name),vers
> ion,options[code,displayName|rename(name)]&paging=false&_dc=1470939760248
>
> *(*Cancelled at 30.00s) See screenshot
>
> When loading this url directly, it takes 79 seconds to return and the
> response is very large
>
> *On Localhost:*
>
> url: http://localhost:8090/dhis/dhis-web-mapping/index.html
>
> /api/optionSets.json?fields=id,version&paging=false&_dc=1470934124633
>
>- app loads when api call returns in 22.25 seconds
>- app hang when api call cancelled at 30 seconds
>
>
___
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] "Analytics table dimensions contain duplicates" Error

2016-08-09 Thread Lorill Crees
Hi,

To follow up with this, with a bit of sql I tracked this UID to
a trackedentityattribute. Tracing it further I discovered that there were
two entries in the program_attributes table for this trackedentityattribute
and a particular program. Basically it looks like somehow the attribute got
assigned to the program twice. I'm not sure how that is possible, although
perhaps it could have been via the API?

When removing one of the attributes via the edit program UI (the attribute
was repeated in the select list), the analytics now run.

Although this seems like a fluke edge case, I'm wondering if it is possible
to improve the error handling around the assigning of attributes to a
program so that it can't be done twice? And also if it is possible to
improve the error message in the analytics generation for this to point to
what exactly is duplicated?

Thanks,

Lorill



On Mon, Aug 8, 2016 at 5:03 PM, Lorill Crees  wrote:

> Hi,
>
> When running analytics on one of our instances, we get the error "Process
> failed: Analytics table dimensions contain duplicates: ["oZXosvGYth6"]".
> The full stack is pasted below.
>
> How can I fix this? I took a quick look through a couple tables to see if
> I could find this UID but no success, and wasn't sure where I should be
> looking.
>
> We are on 2.22 R 22089.
>
> Thanks!
>
> Lorill
>
>
> * ERROR 2016-08-08 16:48:12,556 Unexpected error occurred in scheduled
> task. (TaskUtils.java [taskScheduler-4])
>
> java.lang.IllegalStateException: Analytics table dimensions contain
> duplicates: ["oZXosvGYth6"]
>
> at org.hisp.dhis.analytics.table.AbstractJdbcTableManager.
> validateDimensionColumns(AbstractJdbcTableManager.java:323)
>
> at org.hisp.dhis.analytics.table.JdbcEventAnalyticsTableManager
> .createTable(JdbcEventAnalyticsTableManager.java:145)
>
> at sun.reflect.GeneratedMethodAccessor935.invoke(Unknown Source)
>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:483)
>
> at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> (AopUtils.java:317)
>
> at org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:201)
>
> at com.sun.proxy.$Proxy146.createTable(Unknown Source)
>
> at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.
> createTables(DefaultAnalyticsTableService.java:193)
>
> at org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.update(
> DefaultAnalyticsTableService.java:124)
>
> at org.hisp.dhis.analytics.table.scheduling.AnalyticsTableTask.
> call(AnalyticsTableTask.java:158)
>
> at org.hisp.dhis.security.NoSecurityContextRunnable.run(
> NoSecurityContextRunnable.java:47)
>
> at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl
> e.run(DelegatingErrorHandlingRunnable.java:54)
>
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>
> at java.util.concurrent.ScheduledThreadPoolExecutor$
> ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>
> at java.util.concurrent.ScheduledThreadPoolExecutor$
> ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
>
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>
> at java.lang.Thread.run(Thread.java:745)
>
> *
>
___
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] "Analytics table dimensions contain duplicates" Error

2016-08-08 Thread Lorill Crees
Hi,

When running analytics on one of our instances, we get the error "Process
failed: Analytics table dimensions contain duplicates: ["oZXosvGYth6"]".
The full stack is pasted below.

How can I fix this? I took a quick look through a couple tables to see if I
could find this UID but no success, and wasn't sure where I should be
looking.

We are on 2.22 R 22089.

Thanks!

Lorill


* ERROR 2016-08-08 16:48:12,556 Unexpected error occurred in scheduled
task. (TaskUtils.java [taskScheduler-4])

java.lang.IllegalStateException: Analytics table dimensions contain
duplicates: ["oZXosvGYth6"]

at
org.hisp.dhis.analytics.table.AbstractJdbcTableManager.validateDimensionColumns(AbstractJdbcTableManager.java:323)

at
org.hisp.dhis.analytics.table.JdbcEventAnalyticsTableManager.createTable(JdbcEventAnalyticsTableManager.java:145)

at sun.reflect.GeneratedMethodAccessor935.invoke(Unknown Source)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)

at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)

at com.sun.proxy.$Proxy146.createTable(Unknown Source)

at
org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.createTables(DefaultAnalyticsTableService.java:193)

at
org.hisp.dhis.analytics.table.DefaultAnalyticsTableService.update(DefaultAnalyticsTableService.java:124)

at
org.hisp.dhis.analytics.table.scheduling.AnalyticsTableTask.call(AnalyticsTableTask.java:158)

at
org.hisp.dhis.security.NoSecurityContextRunnable.run(NoSecurityContextRunnable.java:47)

at
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

*
___
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] GIS Google Maps Error

2016-07-27 Thread Lorill Crees
Hi Bjørn,

These instances will eventually be upgraded, perhaps in the next 3-6
months, but not immediately.

Do you have any ideas with how we can address this specific issue in
version 2.22?

Thanks,

Lorill

On Wed, Jul 27, 2016 at 4:03 AM, Bjørn Sandvik  wrote:

> Hi Lorill,
>
> Do you have the chance to upgrade to a new version of DHIS 2?
>
> There is a lot of GIS improvements in DHIS 2.23 and 2.24.
>
> Bjørn
>
> --
> Bjørn Sandvik
> GIS developer, DHIS 2
> University of Oslo
> www.dhis2.org
>
>
>
> On Tue, Jul 26, 2016 at 10:15 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> When attempting to load up the GIS app in DHIS 2 in some of our
>> instances, we are getting the following error popup:
>>
>> "This page was unable to display a Google Maps element. Please contact
>> the site administrator. If you are the administrator of this site, please
>> check the JavaScript console or check the following page for
>> troubleshooting: http://g.co/mapsJSApiErrors";
>>
>> URL:
>>
>> https://[server]/dhis-web-mapping/index.html
>>
>> Please see the attached screenshot of the javascript console, which shows
>> this error:
>>
>> "Google Maps API error: Google Maps API error: MissingKeyMapError
>> https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
>> "
>>
>> When closing the popover, the world map does not render.
>>
>> We are using 2.22 R 22026.
>>
>> How can we fix this?
>>
>> Thanks,
>>
>> Lorill
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] DHIS2 Docs

2016-05-30 Thread Lorill Crees
Hi Lars,

Just following up on this. What would the timeline look like for the
implementation of POST support for resources in api/documents?

Thanks,

Lorill

On Thu, May 12, 2016 at 3:26 PM, Lorill Crees  wrote:

> Thanks Lars, that is helpful.
>
> We have a couple of use cases for this functionality:
>
>1. There is a desire to upload supporting documents around particular
>surveys in DHIS 2. For example, there may be a Word doc with the background
>information around what a particular survey is about and how it was
>conducted, and users want that linked to the particular survey (Program).
>2. We had been investigating different options for integrating R with
>DHIS 2, and were looking for a way to store binary file outputs from R such
>as pngs etc. These would be related to a Program in general, and we would
>not want to store those on a data value basis.
>
> Users would also want the above documents to be available on Dashboards.
>
> In regards to the short-term workaround you suggested, what would the
> timeline for that look like?
>
> Thanks again,
>
> Lorill
>
> On Thu, May 12, 2016 at 3:02 PM, Lars Helge Øverland 
> wrote:
>
>> Hi Lorill,
>>
>> we are not going to deprecate/remove api/documents so it is safe to use
>> it, however like you say we do not have POST support in the API so it is a
>> bit useless at the moment. A short-term workaround would be to simply
>>
>> - implement POST support for files in DocumentController - patch? ;)
>> - use some sort of soft reference like prefixing the document name with
>> the program or data set UID.
>> - documents support the sharing paradigm so you could use that for access
>> control
>>
>> Longer term (around 2.25) we are planning to generalize the file resource
>> concept we did for 2.20 into more of a general purpose file store. As you
>> know this has cloud backend support and is a more scalable solution.
>> However this design of this is still on the drawing board - we will keep
>> you posted!
>>
>> If you could provide a bit more detail about your requirement that would
>> also be helpful to guide us.
>>
>> best regards,
>>
>> Lars
>>
>>
>>
>>
>> On Thu, May 12, 2016 at 10:14 PM, Lorill Crees  wrote:
>>
>>> Thanks Morten. That's great news about web-api versioning.
>>>
>>> In regards to the /api/documents endpoint, is it possible to create a
>>> document or is it read-only? I can't find documentation on that call.
>>>
>>> Halvdan - I look forward to your responses about the current available
>>> storage methods.
>>>
>>>
>>>
>>> On Wed, May 11, 2016 at 9:18 PM, Morten Olav Hansen 
>>> wrote:
>>>
>>>> I don't think there are any plans to deprecate this endpoint right now
>>>> (we are hoping to have web-api versioning in 2.24, so that at least would
>>>> make it easier going forward). So you can assume that endpoint will
>>>> continue to live on.
>>>>
>>>> For the current available storage methods, I will let Halvdan answer
>>>> that. We already have a filestore abstraction internally (which allows for
>>>> adding files to data elements), but I'm not sure if the plans is to have
>>>> this as a more generic functionality.
>>>>
>>>>
>>>>
>>>> --
>>>> Morten Olav Hansen
>>>> Senior Engineer, DHIS 2
>>>> University of Oslo
>>>> http://www.dhis2.org
>>>>
>>>> On Thu, May 12, 2016 at 12:54 AM, Lorill Crees 
>>>> wrote:
>>>>
>>>>> Hi Morten and Team,
>>>>>
>>>>> Following up on this again. Are there still plans to deprecate the
>>>>> /api/documents functionality? And what are your recommendations on how we
>>>>> should approach the storage of dataset & program level documents? Please
>>>>> see my questions below.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Lorill
>>>>>
>>>>> On Mon, May 2, 2016 at 10:59 AM, Lorill Crees 
>>>>> wrote:
>>>>>
>>>>>> Hi - just following up on this. Any recommendations on how we should
>>>>>> approach the storage of dataset & program level documents?
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 2:13 PM, Lorill Crees 
>>>>>> wrote:
>>>>>>
>>>>>>>

Re: [Dhis2-devs] SQL View Doesn't work for comma seperated variables

2016-05-28 Thread Lorill Crees
Hi Priyanka,

I had asked a related question recently about the ability to support "IN"
clauses, you can view the thread here:

https://lists.launchpad.net/dhis2-devs/msg44763.html

Lorill

On Thu, May 26, 2016 at 11:34 PM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Hi there.
>
> This syntax is not supported as you can see from the documentation
> 
>
> *The variable parameter must contain alphanumeric characters only. The
> variables must contain alphanumeric, dash, underscore and whitespace
> characters only.*
>
> This might be something which can added, but there could be an increased
> risk of SQL injection attacks, which these restrictions are meant to try
> and prevent to some extent.  Maybe the developers can say more about this.
>
> Regards,
> Jason
>
>
> On Fri, May 27, 2016 at 8:14 AM, Priyanka Bawa 
> wrote:
>
>> This error comes in version 2.20.
>>
>> Regards
>> Priyanka
>>
>> On Fri, May 27, 2016 at 11:36 AM, Priyanka Bawa <
>> priyankabawa...@gmail.com> wrote:
>>
>>> Hi
>>> I am trying to create an SQLView where i am using a variable (
>>> *populationFormSOU1).* The result of this variable is comma separated
>>> as :-
>>>  shvnNIx,1biz5LW,BZuwzHr5,RP4CW,lYFre,n5z2VKrv,5Ut1oxMO,FJETOdBp,h7sbFDA
>>>
>>> SELECT COUNT(*) FROM completedatasetregistration WHERE sourceid IN
>>> (populationFormSOU1='${*populationFormSOU1*}') AND datasetid = 52 AND
>>> periodid = '${periodid}';
>>>
>>>
>>> The result of above SQLView says that the variables are invalid [image:
>>> Inline image 1]
>>> Seems that the query doesn't take variables having any special character.
>>> Any help will be appreciated.
>>>
>>> Regards
>>> Priyanka
>>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
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] Caching issue with pivot table when editing program indicators

2016-05-25 Thread Lorill Crees
Thanks Lars for the quick response, much appreciated!

On Wed, May 25, 2016 at 12:44 PM, Lars Helge Øverland 
wrote:

> Hi Lorill,
>
> this could happen if you have a server-side cache (like nginx) enabled.
> Nginx will cache responses based on the analytics URLs, so updates the
> program indicator formula will not be detected.
>
> Ways to fix this:
>
> - Disable the server side cache (if nginx uncomment the proxy_cache_path
> directive
> <http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s04.html#d0e1184>
> )
>
> or
>
> - Disable analytics caching in dhis from Settings > Server > Cache
> strategy > No cache.
>
> best regards,
>
> Lars
>
>
>
>
>
> On Wed, May 25, 2016 at 9:34 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> I'm writing on behalf of some users who are reportedly having continual
>> caching issues when editing program indicator calculations. Their edits do
>> not end up being reflected on the pivot table.
>>
>> They have tried running the cache cleaner and even re-running analytics,
>> and trying on different computers, but apparently with no luck. Do you have
>> any suggestions for them that I can pass on?
>>
>> Thanks,
>>
>> Lorill
>>
>>
>> ___
>> 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
> l...@dhis2.org
> http://www.dhis2.org <https://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] Caching issue with pivot table when editing program indicators

2016-05-25 Thread Lorill Crees
Hi,

I'm writing on behalf of some users who are reportedly having continual
caching issues when editing program indicator calculations. Their edits do
not end up being reflected on the pivot table.

They have tried running the cache cleaner and even re-running analytics,
and trying on different computers, but apparently with no luck. Do you have
any suggestions for them that I can pass on?

Thanks,

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


Re: [Dhis2-devs] DHIS2 Docs

2016-05-12 Thread Lorill Crees
Thanks Lars, that is helpful.

We have a couple of use cases for this functionality:

   1. There is a desire to upload supporting documents around particular
   surveys in DHIS 2. For example, there may be a Word doc with the background
   information around what a particular survey is about and how it was
   conducted, and users want that linked to the particular survey (Program).
   2. We had been investigating different options for integrating R with
   DHIS 2, and were looking for a way to store binary file outputs from R such
   as pngs etc. These would be related to a Program in general, and we would
   not want to store those on a data value basis.

Users would also want the above documents to be available on Dashboards.

In regards to the short-term workaround you suggested, what would the
timeline for that look like?

Thanks again,

Lorill

On Thu, May 12, 2016 at 3:02 PM, Lars Helge Øverland  wrote:

> Hi Lorill,
>
> we are not going to deprecate/remove api/documents so it is safe to use
> it, however like you say we do not have POST support in the API so it is a
> bit useless at the moment. A short-term workaround would be to simply
>
> - implement POST support for files in DocumentController - patch? ;)
> - use some sort of soft reference like prefixing the document name with
> the program or data set UID.
> - documents support the sharing paradigm so you could use that for access
> control
>
> Longer term (around 2.25) we are planning to generalize the file resource
> concept we did for 2.20 into more of a general purpose file store. As you
> know this has cloud backend support and is a more scalable solution.
> However this design of this is still on the drawing board - we will keep
> you posted!
>
> If you could provide a bit more detail about your requirement that would
> also be helpful to guide us.
>
> best regards,
>
> Lars
>
>
>
>
> On Thu, May 12, 2016 at 10:14 PM, Lorill Crees  wrote:
>
>> Thanks Morten. That's great news about web-api versioning.
>>
>> In regards to the /api/documents endpoint, is it possible to create a
>> document or is it read-only? I can't find documentation on that call.
>>
>> Halvdan - I look forward to your responses about the current available
>> storage methods.
>>
>>
>>
>> On Wed, May 11, 2016 at 9:18 PM, Morten Olav Hansen 
>> wrote:
>>
>>> I don't think there are any plans to deprecate this endpoint right now
>>> (we are hoping to have web-api versioning in 2.24, so that at least would
>>> make it easier going forward). So you can assume that endpoint will
>>> continue to live on.
>>>
>>> For the current available storage methods, I will let Halvdan answer
>>> that. We already have a filestore abstraction internally (which allows for
>>> adding files to data elements), but I'm not sure if the plans is to have
>>> this as a more generic functionality.
>>>
>>>
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Thu, May 12, 2016 at 12:54 AM, Lorill Crees 
>>> wrote:
>>>
>>>> Hi Morten and Team,
>>>>
>>>> Following up on this again. Are there still plans to deprecate the
>>>> /api/documents functionality? And what are your recommendations on how we
>>>> should approach the storage of dataset & program level documents? Please
>>>> see my questions below.
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>> On Mon, May 2, 2016 at 10:59 AM, Lorill Crees 
>>>> wrote:
>>>>
>>>>> Hi - just following up on this. Any recommendations on how we should
>>>>> approach the storage of dataset & program level documents?
>>>>>
>>>>> On Tue, Apr 26, 2016 at 2:13 PM, Lorill Crees 
>>>>> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I just wanted to revive this old thread regarding the storage of
>>>>>> documents in DHIS 2. We are wanting to programatically upload files into
>>>>>> DHIS 2 that are related to Data Sets and Programs in general, for users 
>>>>>> to
>>>>>> be able to view/download via the DHIS 2 UI.
>>>>>>
>>>>>> Using the file resource functionality for this would be clunky, as we
>>>>>> would not want to have these files related to specific data values. For
>>>>>>

Re: [Dhis2-devs] Changing the parent of an org unit

2016-05-12 Thread Lorill Crees
Thanks Lars!

On Thu, May 12, 2016 at 2:29 PM, Lars Helge Øverland  wrote:

> Hi Lorill,
>
> sure - you can use the hierarchy operations.
>
> Changing the parentid will work.
>
> Doing this on a running prod system is not recommended, however if so you
> need to i) clear the application cache (under data admin) and ii) Update
> organisation unit paths under maintenance.
>
> regards,
>
> Lars
>
>
>
>
>
>
> On Thu, May 12, 2016 at 11:14 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> I was previously unaware that there was the "Hierarchy Operations" option
>> available under the "Organisation Unit" app, so was able to do this easily
>> via the UI.
>>
>> However for future reference, if doing this via the db, is it as simple
>> as changing the parent ID for the org unit, or are there other dependencies
>> that would break because of this?
>>
>> Thanks,
>>
>> Lorill
>>
>> On Mon, May 2, 2016 at 10:57 AM, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> We have a DHIS 2 instance where the org unit hierarchy was initially set
>>> up incorrectly for a couple districts. The districts were placed under an
>>> incorrect parent, and now we want to move them to the correct parent.
>>>
>>> What would be the best way to do this, assuming there is associated
>>> data? Can we simply change the parent ID for the org unit in the database?
>>> Or are there other dependencies that would break because of this?
>>>
>>> Please let me know.
>>>
>>> Thanks,
>>>
>>> Lorill
>>>
>>
>>
>> ___
>> 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
> l...@dhis2.org
> http://www.dhis2.org <https://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


Re: [Dhis2-devs] Changing the parent of an org unit

2016-05-12 Thread Lorill Crees
Hi,

I was previously unaware that there was the "Hierarchy Operations" option
available under the "Organisation Unit" app, so was able to do this easily
via the UI.

However for future reference, if doing this via the db, is it as simple as
changing the parent ID for the org unit, or are there other dependencies
that would break because of this?

Thanks,

Lorill

On Mon, May 2, 2016 at 10:57 AM, Lorill Crees  wrote:

> Hi,
>
> We have a DHIS 2 instance where the org unit hierarchy was initially set
> up incorrectly for a couple districts. The districts were placed under an
> incorrect parent, and now we want to move them to the correct parent.
>
> What would be the best way to do this, assuming there is associated data?
> Can we simply change the parent ID for the org unit in the database? Or are
> there other dependencies that would break because of this?
>
> Please let me know.
>
> Thanks,
>
> Lorill
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] DHIS2 Docs

2016-05-12 Thread Lorill Crees
Thanks Morten. That's great news about web-api versioning.

In regards to the /api/documents endpoint, is it possible to create a
document or is it read-only? I can't find documentation on that call.

Halvdan - I look forward to your responses about the current available
storage methods.



On Wed, May 11, 2016 at 9:18 PM, Morten Olav Hansen 
wrote:

> I don't think there are any plans to deprecate this endpoint right now (we
> are hoping to have web-api versioning in 2.24, so that at least would make
> it easier going forward). So you can assume that endpoint will continue to
> live on.
>
> For the current available storage methods, I will let Halvdan answer that.
> We already have a filestore abstraction internally (which allows for adding
> files to data elements), but I'm not sure if the plans is to have this as a
> more generic functionality.
>
>
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, May 12, 2016 at 12:54 AM, Lorill Crees  wrote:
>
>> Hi Morten and Team,
>>
>> Following up on this again. Are there still plans to deprecate the
>> /api/documents functionality? And what are your recommendations on how we
>> should approach the storage of dataset & program level documents? Please
>> see my questions below.
>>
>> Thanks,
>>
>> Lorill
>>
>> On Mon, May 2, 2016 at 10:59 AM, Lorill Crees  wrote:
>>
>>> Hi - just following up on this. Any recommendations on how we should
>>> approach the storage of dataset & program level documents?
>>>
>>> On Tue, Apr 26, 2016 at 2:13 PM, Lorill Crees  wrote:
>>>
>>>> Hi All,
>>>>
>>>> I just wanted to revive this old thread regarding the storage of
>>>> documents in DHIS 2. We are wanting to programatically upload files into
>>>> DHIS 2 that are related to Data Sets and Programs in general, for users to
>>>> be able to view/download via the DHIS 2 UI.
>>>>
>>>> Using the file resource functionality for this would be clunky, as we
>>>> would not want to have these files related to specific data values. For
>>>> example, if we had District-level survey data, we would want one file to be
>>>> uploaded that was related to *all* data values in this Program for a
>>>> country. We could maybe have a kludge where we add one data value for this
>>>> file associated with the country-level org unit but this does not seem
>>>> ideal.
>>>>
>>>> Additionally it doesn't seem easy via the DHIS 2 UI to actually
>>>> view/download the files themselves. I see the RESTful url for the file is
>>>> shown as a link in the data entry screen, but don't see another way to get
>>>> at the files via the UI without constructing the RESTful url for the Web
>>>> API manually (unless I'm missing something?). It looks like we would likely
>>>> need to make a DHIS 2 app to allow users more easy access to the files
>>>> themselves for our particular use case.
>>>>
>>>> It seems that the Resource (aka Document) functionality would make more
>>>> sense for us to use:
>>>> http:///dhis-web-reporting/displayViewDocumentForm.action
>>>> /api/documents
>>>> We could have a kludge where we reference the Data Set or Program via
>>>> naming convention.
>>>>
>>>> However, in reading this thread I see that the plan is to deprecate
>>>> /api/documents altogether. I also couldn't find documentation regarding
>>>> this API call and how to actually create a resource(document) via the API.
>>>>
>>>> I did notice in another thread "Using DHIS File Store" that supporting
>>>> "standalone" file resources is a feature that is in the pipeline. Is there
>>>> any ETA for that functionality?
>>>>
>>>> Do you have any recommendations for us of how we should tackle this use
>>>> case?
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>> On Fri, Jul 31, 2015 at 5:59 AM, Halvdan Grelland 
>>>> wrote:
>>>>
>>>>> Yes, eventually we could probably do that.
>>>>>
>>>>> First order of business is really to allow (external) files to be
>>>>> stored in lieu of the value field of DataValue. The details of how the
>>>>> model will look in the end is still to be decided and is very much

Re: [Dhis2-devs] DHIS2 Docs

2016-05-11 Thread Lorill Crees
Hi Morten and Team,

Following up on this again. Are there still plans to deprecate the
/api/documents functionality? And what are your recommendations on how we
should approach the storage of dataset & program level documents? Please
see my questions below.

Thanks,

Lorill

On Mon, May 2, 2016 at 10:59 AM, Lorill Crees  wrote:

> Hi - just following up on this. Any recommendations on how we should
> approach the storage of dataset & program level documents?
>
> On Tue, Apr 26, 2016 at 2:13 PM, Lorill Crees  wrote:
>
>> Hi All,
>>
>> I just wanted to revive this old thread regarding the storage of
>> documents in DHIS 2. We are wanting to programatically upload files into
>> DHIS 2 that are related to Data Sets and Programs in general, for users to
>> be able to view/download via the DHIS 2 UI.
>>
>> Using the file resource functionality for this would be clunky, as we
>> would not want to have these files related to specific data values. For
>> example, if we had District-level survey data, we would want one file to be
>> uploaded that was related to *all* data values in this Program for a
>> country. We could maybe have a kludge where we add one data value for this
>> file associated with the country-level org unit but this does not seem
>> ideal.
>>
>> Additionally it doesn't seem easy via the DHIS 2 UI to actually
>> view/download the files themselves. I see the RESTful url for the file is
>> shown as a link in the data entry screen, but don't see another way to get
>> at the files via the UI without constructing the RESTful url for the Web
>> API manually (unless I'm missing something?). It looks like we would likely
>> need to make a DHIS 2 app to allow users more easy access to the files
>> themselves for our particular use case.
>>
>> It seems that the Resource (aka Document) functionality would make more
>> sense for us to use:
>> http:///dhis-web-reporting/displayViewDocumentForm.action
>> /api/documents
>> We could have a kludge where we reference the Data Set or Program via
>> naming convention.
>>
>> However, in reading this thread I see that the plan is to deprecate
>> /api/documents altogether. I also couldn't find documentation regarding
>> this API call and how to actually create a resource(document) via the API.
>>
>> I did notice in another thread "Using DHIS File Store" that supporting
>> "standalone" file resources is a feature that is in the pipeline. Is there
>> any ETA for that functionality?
>>
>> Do you have any recommendations for us of how we should tackle this use
>> case?
>>
>> Thanks,
>>
>> Lorill
>>
>> On Fri, Jul 31, 2015 at 5:59 AM, Halvdan Grelland 
>> wrote:
>>
>>> Yes, eventually we could probably do that.
>>>
>>> First order of business is really to allow (external) files to be stored
>>> in lieu of the value field of DataValue. The details of how the model will
>>> look in the end is still to be decided and is very much dependent on the
>>> requirements of the storage backend (I'm experimenting with Apache jClouds
>>> to do this at the moment) and the range of uses we envision within DHIS2.
>>>
>>> I would not recommend hacking a solution together using the
>>> datavalue.value field. It might work (kind of), but is hardly scalable and
>>> will be (I assure you) a complete pain to maintain and will be hard to
>>> migrate when we eventually get a more integrated solution to this
>>> requirement.
>>>
>>> As for ETA It's a bit up in the air currently. As said, it's proven to
>>> be complex to implement properly.
>>>
>>> Btw. Morten, there is an api/files endpoint (it's used to manage custom
>>> css/js). ;)
>>>
>>> 2015-07-29 11:38 GMT+02:00 Morten Olav Hansen :
>>>
>>>> We also already have the /api/documents endpoint, is the idea to
>>>> somehow merge these similar functionalities? Maybe we need a /api/files
>>>> endpoint.. and we can deprecate /api/documents (and then later replace it
>>>> with a document store as it has been discussed before... always wanted to
>>>> remove /api/documents)
>>>>
>>>> --
>>>> Morten
>>>>
>>>> On Wed, Jul 29, 2015 at 6:16 AM, Halvdan Grelland 
>>>> wrote:
>>>>
>>>>> Definitely agree! The working title at the moment is 'file resource',
>>>>> which seems to be descriptive enough and not too gener

[Dhis2-devs] Support of "IN" clauses in SQL Views / Queries?

2016-05-03 Thread Lorill Crees
Hi,

We're attempting to pull data from DHIS 2 via DHIS 2 SQL Views / Queries
and want to be able to use "IN" clauses to filter the data. Is there a way
to do this?

For example we want to create a SQL View or query to get tracked entity
data values, but only for specific data elements. The number of data
elements that will be used in a filter will vary.

The documentation here doesn't mention anything:
http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s30.html

Attempting to create a query with a variable like this doesn't seem to work
(it seems to not allow quoting and commas):

select * from foo where bar in (${bars});

Alternately, is it possible to add criteria to a sql view where the
criteria are appended as "OR"s?

view: select * from foo;

/api/sqlViews/UuRVaRmfHwa/data.csv?criteria=bar:azikLil2Nl1&criteria=bar:A2Kgu7zMgJr
(select * from foo where bar= azikLil2Nl1 OR bar = A2Kgu7zMgJr;)

This one seems more complicated because we would want a mixture of "AND"s
and "OR"s for our particular view.

Please let us know thoughts on how we can get this to work for our use case.

Thanks!

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


Re: [Dhis2-devs] DHIS2 Docs

2016-05-02 Thread Lorill Crees
Hi - just following up on this. Any recommendations on how we should
approach the storage of dataset & program level documents?

On Tue, Apr 26, 2016 at 2:13 PM, Lorill Crees  wrote:

> Hi All,
>
> I just wanted to revive this old thread regarding the storage of documents
> in DHIS 2. We are wanting to programatically upload files into DHIS 2 that
> are related to Data Sets and Programs in general, for users to be able to
> view/download via the DHIS 2 UI.
>
> Using the file resource functionality for this would be clunky, as we
> would not want to have these files related to specific data values. For
> example, if we had District-level survey data, we would want one file to be
> uploaded that was related to *all* data values in this Program for a
> country. We could maybe have a kludge where we add one data value for this
> file associated with the country-level org unit but this does not seem
> ideal.
>
> Additionally it doesn't seem easy via the DHIS 2 UI to actually
> view/download the files themselves. I see the RESTful url for the file is
> shown as a link in the data entry screen, but don't see another way to get
> at the files via the UI without constructing the RESTful url for the Web
> API manually (unless I'm missing something?). It looks like we would likely
> need to make a DHIS 2 app to allow users more easy access to the files
> themselves for our particular use case.
>
> It seems that the Resource (aka Document) functionality would make more
> sense for us to use:
> http:///dhis-web-reporting/displayViewDocumentForm.action
> /api/documents
> We could have a kludge where we reference the Data Set or Program via
> naming convention.
>
> However, in reading this thread I see that the plan is to deprecate
> /api/documents altogether. I also couldn't find documentation regarding
> this API call and how to actually create a resource(document) via the API.
>
> I did notice in another thread "Using DHIS File Store" that supporting
> "standalone" file resources is a feature that is in the pipeline. Is there
> any ETA for that functionality?
>
> Do you have any recommendations for us of how we should tackle this use
> case?
>
> Thanks,
>
> Lorill
>
> On Fri, Jul 31, 2015 at 5:59 AM, Halvdan Grelland 
> wrote:
>
>> Yes, eventually we could probably do that.
>>
>> First order of business is really to allow (external) files to be stored
>> in lieu of the value field of DataValue. The details of how the model will
>> look in the end is still to be decided and is very much dependent on the
>> requirements of the storage backend (I'm experimenting with Apache jClouds
>> to do this at the moment) and the range of uses we envision within DHIS2.
>>
>> I would not recommend hacking a solution together using the
>> datavalue.value field. It might work (kind of), but is hardly scalable and
>> will be (I assure you) a complete pain to maintain and will be hard to
>> migrate when we eventually get a more integrated solution to this
>> requirement.
>>
>> As for ETA It's a bit up in the air currently. As said, it's proven to be
>> complex to implement properly.
>>
>> Btw. Morten, there is an api/files endpoint (it's used to manage custom
>> css/js). ;)
>>
>> 2015-07-29 11:38 GMT+02:00 Morten Olav Hansen :
>>
>>> We also already have the /api/documents endpoint, is the idea to somehow
>>> merge these similar functionalities? Maybe we need a /api/files endpoint..
>>> and we can deprecate /api/documents (and then later replace it with a
>>> document store as it has been discussed before... always wanted to remove
>>> /api/documents)
>>>
>>> --
>>> Morten
>>>
>>> On Wed, Jul 29, 2015 at 6:16 AM, Halvdan Grelland 
>>> wrote:
>>>
>>>> Definitely agree! The working title at the moment is 'file resource',
>>>> which seems to be descriptive enough and not too generic.
>>>>
>>>> 'Document' as it exists right now in dhis2 is really only local storage
>>>> with a relative path in the DB. 'File resources' could potentially replace
>>>> that (as a more flexible back end).
>>>>
>>>> (There are other questions brought up that I'd like to address but I'm
>>>> on my phone on terrible hotel wifi at the moment so will come back to
>>>> those).
>>>> On 28 Jul 2015 4:45 pm, "Morten Olav Hansen" 
>>>> wrote:
>>>>
>>>>> I don't like that we at naming the bp document. Let&

[Dhis2-devs] Changing the parent of an org unit

2016-05-02 Thread Lorill Crees
Hi,

We have a DHIS 2 instance where the org unit hierarchy was initially set up
incorrectly for a couple districts. The districts were placed under an
incorrect parent, and now we want to move them to the correct parent.

What would be the best way to do this, assuming there is associated data?
Can we simply change the parent ID for the org unit in the database? Or are
there other dependencies that would break because of this?

Please let me know.

Thanks,

Lorill
___
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] Attempting to retrieve data in ADX format

2016-04-28 Thread Lorill Crees
Thanks for this Lars. I will try it out again.

On Thu, Apr 28, 2016 at 1:32 AM, Lars Helge Øverland  wrote:

> Hi Lorill,
>
> thanks for bringing this up. I had a look and the problem was that the
> demo database misses codes for most categories. Seems ADX requires codes to
> be present also for categories and category options which are associated
> with data elements in the data set.
>
> The other problem was that the ADX code swallowed the exception instead of
> returning it through the API. I have done a fix now in trunk and 2.23 for
> this where 409 and a message is returned. I am now getting this:
>
> {"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"Category
> code for Commodities is missing or invalid: null"}
>
>
> So to fix this, I suggest you upgrade to latest 2.23 and make sure that
> codes are present also for categories and category options in you local
> system.
>
> Thanks for reporting and for reproducing on the demo.
>
> best regards,
>
> Lars
>
>
>
>
>
> On Wed, Apr 27, 2016 at 11:49 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> I'm playing around with retrieving data in ADX format. I've been looking
>> at the documentation here:
>>
>> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s16.html#d0e3574
>>
>> I've been unable to retrieve any actual data - I can only receive an
>> empty adx tag.
>>
>> Here are some examples from play.dhis2.com:
>>
>> Doing a straight GET using UIDs with this URL:
>> https://play.dhis2.org/demo/api/dataValueSets?orgUnit=
>> jNb63DIHuwU&dataSet=ULowA8V3ucd&startDate=2015-01-01&endDate=2015-12-31
>>
>> will return data values. EG:
>> {
>> "dataValues": [
>> {
>> "dataElement": "JIazHXNSnFJ",
>> "period": "201501",
>> 
>>
>> However, doing a GET using Codes and adding the "Accept:
>> application/xml+adx"  in the header with this URL:
>>
>>
>> https://play.dhis2.org/demo/api/dataValueSets?orgUnit=OU_573&dataSet=DS_1153709&startDate=2015-01-01&endDate=2015-12-31
>>
>> only returns this empty tag:
>> > xmlns="urn:ihe:qrph:adx:2015"/>
>>
>> Is there something I'm doing wrong here? How can I get the data in this
>> example returned in ADX format?
>>
>> Thanks,
>>
>> Lorill
>>
>> ___
>> 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 <https://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] Attempting to retrieve data in ADX format

2016-04-27 Thread Lorill Crees
Hi,

I'm playing around with retrieving data in ADX format. I've been looking at
the documentation here:
http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s16.html#d0e3574

I've been unable to retrieve any actual data - I can only receive an empty
adx tag.

Here are some examples from play.dhis2.com:

Doing a straight GET using UIDs with this URL:
https://play.dhis2.org/demo/api/dataValueSets?orgUnit=
jNb63DIHuwU&dataSet=ULowA8V3ucd&startDate=2015-01-01&endDate=2015-12-31

will return data values. EG:
{
"dataValues": [
{
"dataElement": "JIazHXNSnFJ",
"period": "201501",


However, doing a GET using Codes and adding the "Accept:
application/xml+adx"  in the header with this URL:

https://play.dhis2.org/demo/api/dataValueSets?orgUnit=OU_573&dataSet=DS_1153709&startDate=2015-01-01&endDate=2015-12-31

only returns this empty tag:


Is there something I'm doing wrong here? How can I get the data in this
example returned in ADX format?

Thanks,

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


Re: [Dhis2-devs] DHIS2 Docs

2016-04-26 Thread Lorill Crees
Hi All,

I just wanted to revive this old thread regarding the storage of documents
in DHIS 2. We are wanting to programatically upload files into DHIS 2 that
are related to Data Sets and Programs in general, for users to be able to
view/download via the DHIS 2 UI.

Using the file resource functionality for this would be clunky, as we would
not want to have these files related to specific data values. For example,
if we had District-level survey data, we would want one file to be uploaded
that was related to *all* data values in this Program for a country. We
could maybe have a kludge where we add one data value for this file
associated with the country-level org unit but this does not seem ideal.

Additionally it doesn't seem easy via the DHIS 2 UI to actually
view/download the files themselves. I see the RESTful url for the file is
shown as a link in the data entry screen, but don't see another way to get
at the files via the UI without constructing the RESTful url for the Web
API manually (unless I'm missing something?). It looks like we would likely
need to make a DHIS 2 app to allow users more easy access to the files
themselves for our particular use case.

It seems that the Resource (aka Document) functionality would make more
sense for us to use:
http:///dhis-web-reporting/displayViewDocumentForm.action
/api/documents
We could have a kludge where we reference the Data Set or Program via
naming convention.

However, in reading this thread I see that the plan is to deprecate
/api/documents altogether. I also couldn't find documentation regarding
this API call and how to actually create a resource(document) via the API.

I did notice in another thread "Using DHIS File Store" that supporting
"standalone" file resources is a feature that is in the pipeline. Is there
any ETA for that functionality?

Do you have any recommendations for us of how we should tackle this use
case?

Thanks,

Lorill

On Fri, Jul 31, 2015 at 5:59 AM, Halvdan Grelland 
wrote:

> Yes, eventually we could probably do that.
>
> First order of business is really to allow (external) files to be stored
> in lieu of the value field of DataValue. The details of how the model will
> look in the end is still to be decided and is very much dependent on the
> requirements of the storage backend (I'm experimenting with Apache jClouds
> to do this at the moment) and the range of uses we envision within DHIS2.
>
> I would not recommend hacking a solution together using the
> datavalue.value field. It might work (kind of), but is hardly scalable and
> will be (I assure you) a complete pain to maintain and will be hard to
> migrate when we eventually get a more integrated solution to this
> requirement.
>
> As for ETA It's a bit up in the air currently. As said, it's proven to be
> complex to implement properly.
>
> Btw. Morten, there is an api/files endpoint (it's used to manage custom
> css/js). ;)
>
> 2015-07-29 11:38 GMT+02:00 Morten Olav Hansen :
>
>> We also already have the /api/documents endpoint, is the idea to somehow
>> merge these similar functionalities? Maybe we need a /api/files endpoint..
>> and we can deprecate /api/documents (and then later replace it with a
>> document store as it has been discussed before... always wanted to remove
>> /api/documents)
>>
>> --
>> Morten
>>
>> On Wed, Jul 29, 2015 at 6:16 AM, Halvdan Grelland 
>> wrote:
>>
>>> Definitely agree! The working title at the moment is 'file resource',
>>> which seems to be descriptive enough and not too generic.
>>>
>>> 'Document' as it exists right now in dhis2 is really only local storage
>>> with a relative path in the DB. 'File resources' could potentially replace
>>> that (as a more flexible back end).
>>>
>>> (There are other questions brought up that I'd like to address but I'm
>>> on my phone on terrible hotel wifi at the moment so will come back to
>>> those).
>>> On 28 Jul 2015 4:45 pm, "Morten Olav Hansen"  wrote:
>>>
 I don't like that we at naming the bp document. Let's file it a file
 api.

 As much as possible I want to save the wording document until we
 implement a proper nosql document storage.

 We already have /api:documents which I want to remove (I doubt many
 external apps depend on it)

 On Tuesday, July 28, 2015, Elmarie Claasen  wrote:

> Hi all, there is a blueprint for this already
>
>
> https://blueprints.launchpad.net/dhis2/+spec/document-dataelement-attribute-type
>
> Elmarie
> On 28 Jul 2015 11:27 AM, "Greg Rowles"  wrote:
>
>> Hi Halvdan
>>
>> Sounds great and a good alternative! I'd like to work through an
>> example or two:
>>
>> We have annual performance plans made up of multiple quarterly
>> reports so I would expect there to be 2 data sets:
>>  - Annual Performance Plans (fYear)
>>  - Quarterly Performance Reports (fQuarter)
>>
>> If we configure these data sets to include a single data element of
>> type 'T

Re: [Dhis2-devs] Importing of GML Files / Districts without Coordinates

2016-03-08 Thread Lorill Crees
Hi Jan,

Thanks for investigating, will try getting latest 2.22 and will try again.

Lorill

On Tue, Mar 8, 2016 at 12:15 PM, Jan Henrik Øverland <
janhenrik.overl...@gmail.com> wrote:

> Hi Lorill,
>
> I am actually not able to reproduce it. I tried this:
>
> - Removed coordinates and feature type for one district
> - Created a pivot table and selected one district with coordinates plus
> the one without
> - Opened it as map
>
> -> The map shows up containing only the district with coordinates
>
> I also tried setting different combinations of NULL/[[[]]]/ as
> coordinate and NULL/NONE/ as featuretype, but never managed to get
> that error message.
>
> Version 2.22, rev 21892.
>
> Jan
>
> On Mon, Feb 22, 2016 at 12:34 PM, Jan Henrik Øverland <
> janhenrik.overl...@gmail.com> wrote:
>
>> Hi Lorill,
>>
>> Ok thanks, will fix this properly. Please try Jason's suggestion in the
>> meantime.
>>
>> Jan
>>
>> On Mon, Feb 22, 2016 at 11:39 AM, Jason Pickering <
>> jason.p.picker...@gmail.com> wrote:
>>
>>> Seems like a hack, but I would try and set it to "POLYGON".
>>>
>>> The client will likely accept these empty polygons, but that would be
>>> the correct type in this case.
>>>
>>> Not ideal, but maybe give it a try.
>>>
>>> On Fri, Feb 19, 2016 at 7:32 PM, Lorill Crees  wrote:
>>>
>>>> Sorry - forgot to mention this is 2.22 r 21826.
>>>>
>>>> In the featuretype field we have tried both null and 'NONE'.
>>>>
>>>> On Fri, Feb 19, 2016 at 4:30 AM, Knut Staring  wrote:
>>>>
>>>>> What did you put in the Featuretype field?
>>>>>
>>>>> On Thu, Feb 18, 2016 at 11:04 PM, Lorill Crees 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> We're importing GML files into a DHIS 2 instance and there are a
>>>>>> couple of districts that we don't have coordinates for yet. We've 
>>>>>> uploaded
>>>>>> what we have successfully and the mapping looks great.
>>>>>>
>>>>>> However, if we have a pivot table with data points included from the
>>>>>> two districts that we don't have coordinates for then view it as a map, 
>>>>>> the
>>>>>> entire map does not load at all and gives a javascript error "Cannot read
>>>>>> property 'length' of null in core.js. 
>>>>>> (util.map.getTransformedFeatureArray
>>>>>> function). There is no messaging to the user of why the map does not 
>>>>>> load.
>>>>>> Of course we could manually exclude these two districts from the table 
>>>>>> and
>>>>>> it will work, but this is not ideal or intuitive for the users of the
>>>>>> system.
>>>>>>
>>>>>> What can we set the coordinates to for these two districts in the
>>>>>> meantime so that the rest of the map will not break? We've tried setting 
>>>>>> it
>>>>>> to null, empty string, and '[[[]]]'.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Lorill
>>>>>>
>>>>>> ___
>>>>>> 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
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Knut Staring
>>>>> Dept. of Informatics, University of Oslo
>>>>> Norway: +4791880522
>>>>> Skype: knutstar
>>>>> http://dhis2.org
>>>>>
>>>>
>>>>
>>>> ___
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to : dhis2-devs@lists.launchpad.net
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Jason P. Pickering
>>> email: jason.p.picker...@gmail.com
>>> tel:+46764147049
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Unable to add Program Indicators from different Programs in Data Visualizer

2016-03-08 Thread Lorill Crees
Thanks Jan!

On Tue, Mar 8, 2016 at 9:14 AM, Jan Henrik Øverland <
janhenrik.overl...@gmail.com> wrote:

> (Fixed, closing this thread)
>
> On Fri, Mar 4, 2016 at 12:13 AM, Lars Helge Øverland 
> wrote:
>
>> Hi Lorill,
>>
>> can confirm this. We will fix asap.
>>
>> https://bugs.launchpad.net/dhis2/+bug/1552954
>>
>>
>> regards,
>>
>> Lars
>>
>> On Thu, Mar 3, 2016 at 11:45 PM, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> We are attempting to create a chart of some program indicators across
>>> different programs. In the Data Visualizer, first we go to Data -> Program
>>> Indicators -> [select program], then select a couple of indicators. When we
>>> then change the program in the dropdown, the selections we just made are
>>> cleared from the "Selected" list, making it impossible for us to create the
>>> chart we need.
>>>
>>> However, if we follow the same steps in the Pivot Table, the selections
>>> from the first program remain and we are able to add more program
>>> indicators from the second program then view the table. We can then select
>>> Chart -> Open this table as a chart, and we can view the chart this way,
>>> but can't do it directly through the Data Visualizer itself.
>>>
>>> This is 2.22 r 21844. Any suggestions?
>>>
>>> Thanks,
>>>
>>> Lorill
>>>
>>>
>>> ___
>>> 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 <https://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
>>
>>
>
___
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] [Bug 1552954] [NEW] Unable to add Program Indicators from different Programs in Data Visualizer

2016-03-04 Thread Lorill Crees
Thanks Lars.

Is it possible to backport this also to 2.22?

On Thu, Mar 3, 2016 at 3:12 PM, Lars Helge Øverland  wrote:

> Public bug reported:
>
> We are attempting to create a chart of some program indicators across
> different programs. In the Data Visualizer, first we go to Data ->
> Program Indicators -> [select program], then select a couple of
> indicators. When we then change the program in the dropdown, the
> selections we just made are cleared from the "Selected" list, making it
> impossible for us to create the chart we need.
>
> However, if we follow the same steps in the Pivot Table, the selections
> from the first program remain and we are able to add more program
> indicators from the second program then view the table. We can then
> select Chart -> Open this table as a chart, and we can view the chart
> this way, but can't do it directly through the Data Visualizer itself.
>
> This is 2.22 r 21844.
>
> ** Affects: dhis2
>  Importance: Medium
>  Assignee: Jan Henrik Øverland (janhenrik-overland)
>  Status: Confirmed
>
> ** Changed in: dhis2
>  Assignee: (unassigned) => Jan Henrik Øverland (janhenrik-overland)
>
> ** Changed in: dhis2
> Milestone: None => 2.23
>
> ** Changed in: dhis2
>Importance: Undecided => Medium
>
> ** Changed in: dhis2
>Status: New => Confirmed
>
> --
> You received this bug notification because you are a member of DHIS 2
> developers, which is subscribed to DHIS.
> https://bugs.launchpad.net/bugs/1552954
>
> Title:
>   Unable to add Program Indicators from different Programs in Data
>   Visualizer
>
> Status in DHIS:
>   Confirmed
>
> Bug description:
>   We are attempting to create a chart of some program indicators across
>   different programs. In the Data Visualizer, first we go to Data ->
>   Program Indicators -> [select program], then select a couple of
>   indicators. When we then change the program in the dropdown, the
>   selections we just made are cleared from the "Selected" list, making
>   it impossible for us to create the chart we need.
>
>   However, if we follow the same steps in the Pivot Table, the
>   selections from the first program remain and we are able to add more
>   program indicators from the second program then view the table. We can
>   then select Chart -> Open this table as a chart, and we can view the
>   chart this way, but can't do it directly through the Data Visualizer
>   itself.
>
>   This is 2.22 r 21844.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1552954/+subscriptions
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Unable to add Program Indicators from different Programs in Data Visualizer

2016-03-03 Thread Lorill Crees
Hi,

We are attempting to create a chart of some program indicators across
different programs. In the Data Visualizer, first we go to Data -> Program
Indicators -> [select program], then select a couple of indicators. When we
then change the program in the dropdown, the selections we just made are
cleared from the "Selected" list, making it impossible for us to create the
chart we need.

However, if we follow the same steps in the Pivot Table, the selections
from the first program remain and we are able to add more program
indicators from the second program then view the table. We can then select
Chart -> Open this table as a chart, and we can view the chart this way,
but can't do it directly through the Data Visualizer itself.

This is 2.22 r 21844. Any suggestions?

Thanks,

Lorill
___
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] Importing of GML Files / Districts without Coordinates

2016-02-22 Thread Lorill Crees
Sorry - forgot to mention this is 2.22 r 21826.

In the featuretype field we have tried both null and 'NONE'.

On Fri, Feb 19, 2016 at 4:30 AM, Knut Staring  wrote:

> What did you put in the Featuretype field?
>
> On Thu, Feb 18, 2016 at 11:04 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> We're importing GML files into a DHIS 2 instance and there are a couple
>> of districts that we don't have coordinates for yet. We've uploaded what we
>> have successfully and the mapping looks great.
>>
>> However, if we have a pivot table with data points included from the two
>> districts that we don't have coordinates for then view it as a map, the
>> entire map does not load at all and gives a javascript error "Cannot read
>> property 'length' of null in core.js. (util.map.getTransformedFeatureArray
>> function). There is no messaging to the user of why the map does not load.
>> Of course we could manually exclude these two districts from the table and
>> it will work, but this is not ideal or intuitive for the users of the
>> system.
>>
>> What can we set the coordinates to for these two districts in the
>> meantime so that the rest of the map will not break? We've tried setting it
>> to null, empty string, and '[[[]]]'.
>>
>> Thanks,
>>
>> Lorill
>>
>> ___
>> 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
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Importing of GML Files / Districts without Coordinates

2016-02-18 Thread Lorill Crees
Hi,

We're importing GML files into a DHIS 2 instance and there are a couple of
districts that we don't have coordinates for yet. We've uploaded what we
have successfully and the mapping looks great.

However, if we have a pivot table with data points included from the two
districts that we don't have coordinates for then view it as a map, the
entire map does not load at all and gives a javascript error "Cannot read
property 'length' of null in core.js. (util.map.getTransformedFeatureArray
function). There is no messaging to the user of why the map does not load.
Of course we could manually exclude these two districts from the table and
it will work, but this is not ideal or intuitive for the users of the
system.

What can we set the coordinates to for these two districts in the meantime
so that the rest of the map will not break? We've tried setting it to null,
empty string, and '[[[]]]'.

Thanks,

Lorill
___
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] App Installation - SSL issue

2016-02-17 Thread Lorill Crees
Thanks all for your help with this. I will take a look at the config pieces
you mentioned.

Cheers,

Lorill

On Wed, Feb 17, 2016 at 4:08 AM, Lars Helge Øverland  wrote:

>
> Hi Lorill,
>
> DHIS 2 is looking at a header in the web request called X-Forwarded-Proto
> when determining the protocol.
>
> Are you running behind nginx? Could you check that this directive is part
> of the location block which proxy passes to Tomcat? Or, at least make sure
> this directive is not set to https (defaults to http).
>
> proxy_set_header  X-Forwarded-Proto  http;
>
> best regards,
>
> Lars
>
> On Wed, Feb 17, 2016 at 1:27 AM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> Hi Lorill,
>> I think you need to modify the Tomcat server.xml file to get this to work
>> properly.
>>
>> I usually add an additional connector
>>
>>  > scheme="https"
>>connectionTimeout="2"
>>URIEncoding="UTF-8"
>>redirectPort="8443" />
>>
>>
>> and then point the reverse proxy to that.
>>
>> Regards
>> Jason
>>
>>
>> On Wed, Feb 17, 2016 at 6:40 AM, Morten Olav Hansen 
>> wrote:
>>
>>> Ok, sounds like you have a misconfigured reverse proxy? How is the
>>> internal instance set up? is it directly tomcat, or do you have apache or
>>> nginx in front of it?
>>>
>>> On Wed, Feb 17, 2016 at 12:35 PM, Lorill Crees 
>>> wrote:
>>>
>>>> Yes - I can go directly to the app if I change the url to http, but
>>>> within the apps other things related to urls are messed up. The icons in
>>>> the app menu for manually installed apps also point to https so they don't
>>>> show up, but I can manually navigate to the icons by using the url with
>>>> http. The native DHIS 2 apps are all fine and properly reference http.
>>>>
>>>> Another thing I've just noticed is that when pulling up 
>>>> http://[server]/api/resources,
>>>> all the "href" resource elements are incorrectly referencing https.
>>>>
>>>> On Tue, Feb 16, 2016 at 9:20 PM, Morten Olav Hansen 
>>>> wrote:
>>>>
>>>>> Hm, ok. I haven't seen that issue before. So the app shows up, just
>>>>> that the link in the menu is wrong? What if you go there directly,
>>>>> /api/apps/{app-name} ?
>>>>>
>>>>> On Wed, Feb 17, 2016 at 12:08 PM, Lorill Crees 
>>>>> wrote:
>>>>>
>>>>>> Hi Morten,
>>>>>>
>>>>>> Yes - the baseUrl is set to *.
>>>>>>
>>>>>> Lorill
>>>>>>
>>>>>> On Tue, Feb 16, 2016 at 6:17 PM, Morten Olav Hansen >>>>> > wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> Could you have a look at your manifest file and see what the baseUrl
>>>>>>> is set to? for 2.22 it should just be *
>>>>>>>
>>>>>>> On Wed, Feb 17, 2016 at 7:03 AM, Lorill Crees 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> We have set up an internal test instance of DHIS 2 that is not
>>>>>>>> running via ssl. When installing apps into the instance, it is not 
>>>>>>>> able to
>>>>>>>> load any of the apps or resources because it is redirecting to a path 
>>>>>>>> of
>>>>>>>> https instead of http.
>>>>>>>>
>>>>>>>> eg:
>>>>>>>>
>>>>>>>> our website:
>>>>>>>> http://[server]
>>>>>>>>
>>>>>>>> installed app is attempting to navigate to:
>>>>>>>>
>>>>>>>> https://[server]/api/apps/customjscss/index.html
>>>>>>>>
>>>>>>>> Is there somewhere where we need to configure this to use http?
>>>>>>>> I've looked around but not sure if I'm missing something.
>>>>>>>>
>>>>>>>> I went into the settings and set the Server Base URL for 
>>>>>>>> http://[server],
>>>>>>>> restarted and reinstalled the apps but

Re: [Dhis2-devs] App Installation - SSL issue

2016-02-16 Thread Lorill Crees
Yes - I can go directly to the app if I change the url to http, but within
the apps other things related to urls are messed up. The icons in the app
menu for manually installed apps also point to https so they don't show up,
but I can manually navigate to the icons by using the url with http. The
native DHIS 2 apps are all fine and properly reference http.

Another thing I've just noticed is that when pulling up
http://[server]/api/resources,
all the "href" resource elements are incorrectly referencing https.

On Tue, Feb 16, 2016 at 9:20 PM, Morten Olav Hansen 
wrote:

> Hm, ok. I haven't seen that issue before. So the app shows up, just that
> the link in the menu is wrong? What if you go there directly,
> /api/apps/{app-name} ?
>
> On Wed, Feb 17, 2016 at 12:08 PM, Lorill Crees  wrote:
>
>> Hi Morten,
>>
>> Yes - the baseUrl is set to *.
>>
>> Lorill
>>
>> On Tue, Feb 16, 2016 at 6:17 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Hi
>>>
>>> Could you have a look at your manifest file and see what the baseUrl is
>>> set to? for 2.22 it should just be *
>>>
>>> On Wed, Feb 17, 2016 at 7:03 AM, Lorill Crees  wrote:
>>>
>>>> Hi,
>>>>
>>>> We have set up an internal test instance of DHIS 2 that is not running
>>>> via ssl. When installing apps into the instance, it is not able to load any
>>>> of the apps or resources because it is redirecting to a path of https
>>>> instead of http.
>>>>
>>>> eg:
>>>>
>>>> our website:
>>>> http://[server]
>>>>
>>>> installed app is attempting to navigate to:
>>>>
>>>> https://[server]/api/apps/customjscss/index.html
>>>>
>>>> Is there somewhere where we need to configure this to use http? I've
>>>> looked around but not sure if I'm missing something.
>>>>
>>>> I went into the settings and set the Server Base URL for http://[server],
>>>> restarted and reinstalled the apps but this didn't fix it.
>>>>
>>>> I also saw in the database there is an appBaseUrl setting in the
>>>> systemsetting table but it is not in clear text so I'm not sure what it's
>>>> set to. This db was copied from another instance that is running under ssl
>>>> so maybe that is the issue? I tried deleting this property, restarting and
>>>> reinstalling the app but it still defaults to https.
>>>>
>>>> How can we fix this?
>>>>
>>>> We are using 2.22 r 21832.
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>> ___
>>>> 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
>>>
>>
>>
>
>
> --
> Morten
>
___
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] App Installation - SSL issue

2016-02-16 Thread Lorill Crees
Hi Morten,

Yes - the baseUrl is set to *.

Lorill

On Tue, Feb 16, 2016 at 6:17 PM, Morten Olav Hansen 
wrote:

> Hi
>
> Could you have a look at your manifest file and see what the baseUrl is
> set to? for 2.22 it should just be *
>
> On Wed, Feb 17, 2016 at 7:03 AM, Lorill Crees  wrote:
>
>> Hi,
>>
>> We have set up an internal test instance of DHIS 2 that is not running
>> via ssl. When installing apps into the instance, it is not able to load any
>> of the apps or resources because it is redirecting to a path of https
>> instead of http.
>>
>> eg:
>>
>> our website:
>> http://[server]
>>
>> installed app is attempting to navigate to:
>>
>> https://[server]/api/apps/customjscss/index.html
>>
>> Is there somewhere where we need to configure this to use http? I've
>> looked around but not sure if I'm missing something.
>>
>> I went into the settings and set the Server Base URL for http://[server],
>> restarted and reinstalled the apps but this didn't fix it.
>>
>> I also saw in the database there is an appBaseUrl setting in the
>> systemsetting table but it is not in clear text so I'm not sure what it's
>> set to. This db was copied from another instance that is running under ssl
>> so maybe that is the issue? I tried deleting this property, restarting and
>> reinstalling the app but it still defaults to https.
>>
>> How can we fix this?
>>
>> We are using 2.22 r 21832.
>>
>> Thanks,
>>
>> Lorill
>>
>> ___
>> 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
>
___
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] App Installation - SSL issue

2016-02-16 Thread Lorill Crees
Hi,

We have set up an internal test instance of DHIS 2 that is not running via
ssl. When installing apps into the instance, it is not able to load any of
the apps or resources because it is redirecting to a path of https instead
of http.

eg:

our website:
http://[server]

installed app is attempting to navigate to:

https://[server]/api/apps/customjscss/index.html

Is there somewhere where we need to configure this to use http? I've looked
around but not sure if I'm missing something.

I went into the settings and set the Server Base URL for http://[server],
restarted and reinstalled the apps but this didn't fix it.

I also saw in the database there is an appBaseUrl setting in the
systemsetting table but it is not in clear text so I'm not sure what it's
set to. This db was copied from another instance that is running under ssl
so maybe that is the issue? I tried deleting this property, restarting and
reinstalling the app but it still defaults to https.

How can we fix this?

We are using 2.22 r 21832.

Thanks,

Lorill
___
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] Unable to see Program Attribute Data in Pivot Table

2016-02-11 Thread Lorill Crees
Hi,

We have tracker data uploaded into DHIS 2 and can verify the attribute data
is there when searching through the tracker capture screen.

However, when attempting to view this data in the pivot table, we can
select the attributes but no data shows up in the table. We select "Event
data items" -> Program -> select all attributes, then the applicable org
units and periods.

We have been unsuccessful in viewing any attribute data from any survey in
the pivot table. Any suggestion of what we can do to troubleshoot?

We are using 2.22 r 21785

Thanks,

Lorill
___
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] Web API User Query Parameter "manage"

2016-02-02 Thread Lorill Crees
Hi,

We are using the Managed User functionality and see that we can query the
user list via the Web API with the parameter "canManage" (true/false).
/api/users?canManage=true

However some borrowed code that we have is using the parameter "manage"
(true/false).
/api/users?manage=true

I cannot find documentation on the parameter "manage" but it appears to be
filtering the user list on different criteria than the "canManage"
parameter. For example, these are a sample of the return counts for the
different calls:

/api/users (263)
/api/users/canManage=true (66)
/api/users/manage=true(8)

What is the "manage" parameter filtering on, and how is it different than
the "canManage" parameter? Is there documentation on this?
http://dhis2.github.io/dhis2-docs/2.21/en/developer/html/ch01s33.html

Thanks,

Lorill
___
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] Hibernate Exception in scheduled task

2016-02-02 Thread Lorill Crees
Thanks Knut.

On Tue, Feb 2, 2016 at 12:46 PM, Knut Staring  wrote:

> Hi Lorill,
>
> This was recently replied to by Halvdan:
>
> https://lists.launchpad.net/dhis2-users/msg09122.html
>
> On Tue, Feb 2, 2016 at 8:18 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> We have 9 separate DHIS 2 instances that we are managing and I notice
>> that we are getting a recurring error logged in the tomcat logs on all
>> instances related to scheduled tasks (stack trace below).
>>
>> We are using 2.22 revision 21782.
>>
>> I'm not sure what functionality this is affecting. Should we be concerned?
>>
>> Thanks,
>>
>> Lorill
>>
>> * ERROR 2016-02-02 02:00:00,005 Unexpected error occurred in scheduled
>> task. (TaskUtils.java [taskScheduler-3])
>>
>> org.hibernate.HibernateException: Could not obtain
>> transaction-synchronized Session for current thread
>>
>> at
>> org.springframework.orm.hibernate4.SpringSessionContext.currentSession(SpringSessionContext.java:134)
>>
>> at
>> org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:993)
>>
>> at
>> org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:205)
>>
>> at
>> org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:200)
>>
>> at
>> org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore.getAllLeCreated(HibernateIdentifiableObjectStore.java:404)
>>
>> at
>> org.hisp.dhis.fileresource.DefaultFileResourceService.getOrphanedFileResources(DefaultFileResourceService.java:138)
>>
>> 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:483)
>>
>> at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>
>> at
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
>>
>> at com.sun.proxy.$Proxy103.getOrphanedFileResources(Unknown Source)
>>
>> at
>> org.hisp.dhis.fileresource.FileResourceCleanUpTask.run(FileResourceCleanUpTask.java:58)
>>
>> at
>> org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
>>
>> at
>> org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
>>
>> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>>
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>>
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>
>> at java.lang.Thread.run(Thread.java:745)
>>
>> ___
>> 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
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Hibernate Exception in scheduled task

2016-02-02 Thread Lorill Crees
Hi,

We have 9 separate DHIS 2 instances that we are managing and I notice that
we are getting a recurring error logged in the tomcat logs on all instances
related to scheduled tasks (stack trace below).

We are using 2.22 revision 21782.

I'm not sure what functionality this is affecting. Should we be concerned?

Thanks,

Lorill

* ERROR 2016-02-02 02:00:00,005 Unexpected error occurred in scheduled
task. (TaskUtils.java [taskScheduler-3])

org.hibernate.HibernateException: Could not obtain transaction-synchronized
Session for current thread

at
org.springframework.orm.hibernate4.SpringSessionContext.currentSession(SpringSessionContext.java:134)

at
org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:993)

at
org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:205)

at
org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:200)

at
org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore.getAllLeCreated(HibernateIdentifiableObjectStore.java:404)

at
org.hisp.dhis.fileresource.DefaultFileResourceService.getOrphanedFileResources(DefaultFileResourceService.java:138)

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:483)

at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)

at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)

at com.sun.proxy.$Proxy103.getOrphanedFileResources(Unknown Source)

at
org.hisp.dhis.fileresource.FileResourceCleanUpTask.run(FileResourceCleanUpTask.java:58)

at
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)

at
org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)
___
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] Tracked Entity Attributes filter not working in API

2015-12-17 Thread Lorill Crees
Thanks Morten, I can confirm it's working again.

On Mon, Dec 14, 2015 at 12:29 AM, Morten Olav Hansen 
wrote:

> This should now be fixed in rev 21433.
>
> --
> Morten
>
> On Mon, Dec 14, 2015 at 9:10 AM, Morten Olav Hansen 
> wrote:
>
>> I can also confirm the issue, will look at it today and provide a fix.
>>
>> --
>> Morten
>>
>> On Wed, Dec 9, 2015 at 3:10 PM, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Lorill,
>>>
>>> I can confirm this on my side.
>>>
>>> Morten is on holiday right now but I am sure he will fix it when he gets
>>> back after this week. (I don't know this code well enough to fix it).
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>> On Tue, Dec 8, 2015 at 8:59 PM, Lorill Crees  wrote:
>>>
>>>> Hi,
>>>>
>>>> With 2.22 rev 21368, filters no longer appear to work with tracked
>>>> entity attributes in the API.
>>>>
>>>> We are using this via GET for example:
>>>>
>>>> api/trackedEntityAttributes?filter=code:eq:v008
>>>>
>>>> but the entire list of tracked entity attributes is being returned
>>>> instead of being filtered by the specified code.
>>>>
>>>> The filter was working in 2.21 - has something changed?
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>> ___
>>>> 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 <https://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


Re: [Dhis2-devs] NPE for category option combos

2015-12-09 Thread Lorill Crees
Thanks Lars.

On Wed, Dec 9, 2015 at 5:08 AM, Lars Helge Øverland 
wrote:

> Hi Lorill,
>
> I have made a fix for this now in 2.21 and trunk.
>
> The crash happened because the option combo must have a category combo. In
> any case, it could be that you plan to set this later and it should not
> crash at that point.
>
> regards,
>
> Lars
>
>
>
>
> On Tue, Dec 8, 2015 at 10:25 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> After upgrading to v 2.22 r 21368 I am getting a NullPointerException
>> back from DHIS 2 (pasted below) when attempting to create a Category Option
>> Combo via the API.
>>
>> URL via POST:
>> http://localhost:8090/dhis/api/categoryOptionCombos
>>
>> with json:
>> {"name":"MALE","categoryCombo":{"id":"bZ8GuALBl4r"}}
>>
>> Has something changed with Category Option Combos in v 2.22 that I need
>> to accommodate? I do notice that we hadn't ever been setting the code field
>> for these and it has never been a problem. Is that now a requirement? The
>> schema doesn't appear to require it.
>>
>> Let me know.
>>
>> Thanks,
>>
>> Lorill
>>
>> HTTP Status 500 - Request processing failed; nested exception is
>> java.lang.NullPointerException
>>
>> *type* Exception report
>>
>> *message* *Request processing failed; nested exception is
>> java.lang.NullPointerException*
>>
>> *description* *The server encountered an internal error that prevented
>> it from fulfilling this request.*
>>
>> *exception*
>>
>> org.springframework.web.util.NestedServletException: Request processing 
>> failed; nested exception is java.lang.NullPointerException
>>  
>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:979)
>>  
>> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:869)
>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
>>  
>> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>>  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>  
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
>>  
>> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
>>  
>> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
>>  
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>>  
>> org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
>>  
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>>  
>> org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
>>  
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>>  
>> org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
>>  
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>>  
>> org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
>>  
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>>  
>> org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
>>  
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>>  
>> org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)
>>  
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>>  org.hisp.dhis.security.filter.CorsFilter.doFilter(CorsFilter.java:95)
>>  
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>>  
>> org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(

[Dhis2-devs] NPE for category option combos

2015-12-08 Thread Lorill Crees
Hi,

After upgrading to v 2.22 r 21368 I am getting a NullPointerException back
from DHIS 2 (pasted below) when attempting to create a Category Option
Combo via the API.

URL via POST:
http://localhost:8090/dhis/api/categoryOptionCombos

with json:
{"name":"MALE","categoryCombo":{"id":"bZ8GuALBl4r"}}

Has something changed with Category Option Combos in v 2.22 that I need to
accommodate? I do notice that we hadn't ever been setting the code field
for these and it has never been a problem. Is that now a requirement? The
schema doesn't appear to require it.

Let me know.

Thanks,

Lorill

HTTP Status 500 - Request processing failed; nested exception is
java.lang.NullPointerException

*type* Exception report

*message* *Request processing failed; nested exception is
java.lang.NullPointerException*

*description* *The server encountered an internal error that prevented it
from fulfilling this request.*

*exception*

org.springframework.web.util.NestedServletException: Request
processing failed; nested exception is java.lang.NullPointerException

org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:979)

org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:869)
javax.servlet.http.HttpServlet.service(HttpServlet.java:648)

org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)

org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.hisp.dhis.security.filter.CorsFilter.doFilter(CorsFilter.java:95)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:64)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:140)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.hisp.dhis.security.filter.

[Dhis2-devs] Tracked Entity Attributes filter not working in API

2015-12-08 Thread Lorill Crees
Hi,

With 2.22 rev 21368, filters no longer appear to work with tracked entity
attributes in the API.

We are using this via GET for example:

api/trackedEntityAttributes?filter=code:eq:v008

but the entire list of tracked entity attributes is being returned instead
of being filtered by the specified code.

The filter was working in 2.21 - has something changed?

Thanks,

Lorill
___
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] DHIS 2 Internal Server Error when updating program via web api v 2.22

2015-12-07 Thread Lorill Crees
)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)

org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)

org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)

org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:82)

org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter.doFilterInternal(ExcludableShallowEtagHeaderFilter.java:102)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

*note* *The full stack trace of the root cause is available in the Apache
Tomcat/8.0.21 logs.*

On Fri, Dec 4, 2015 at 4:02 AM, Morten Olav Hansen 
wrote:

> Hi
>
> Could you please try again with rev 21328.
>
> --
> Morten
>
> On Fri, Dec 4, 2015 at 7:24 AM, Lorill Crees  wrote:
>
>> Hi,
>>
>> I'm testing out upgrading our app to DHIS 2 v 2.22 (r21273) and am
>> getting an internal server error due to an underlying hibernate issue when
>> using the web api via PUT to the following url:
>>
>>
>> http://localhost:8090/dhis/api/programs/su3C65hggZ3?strategy=CREATE_AND_UPDATE
>>
>> We are using this call to associate tracked entity attributes to a
>> program.
>>
>> We didn't have any issue with this in v2.21.
>>
>> Any suggestions?
>>
>> I can supply the json being sent if that is helpful.
>>
>> Thanks,
>>
>> Lorill
>>
>>
>> HTTP Status 500 - Request processing failed; nested exception is
>> org.hibernate.TransientObjectException: object references an unsaved
>> transient instance - save the transient instance before flushing:
>> org.hisp.dhis.trackedentity.TrackedEntityAttribute
>>
>> *type* Exception report
>>
>> *message* *Request processing failed; nested exception is
>> org.hibernate.TransientObjectException: object references an unsaved
>> transient instance - save the transient instance before flushing:
>> org.hisp.dhis.trackedentity.TrackedEntityAttribute*
>>
>> *description* *The server encountered an internal error that prevented
>> it from fulfilling this request.*
>>
>> *exception*
>>
>> org.springframework.web.util.NestedServletException: Request processing 
>> failed; nested exception is org.hibernate.TransientObjectException: object 
>> references an unsaved transient instance - save the transient instance 
>> before flushing: org.hisp.dhis.trackedentity.TrackedEntityAttribute
>>  
>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:979)
>>  
>> org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:880)
>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:651)
>>  
>> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>>  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>  
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
>>  
>> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
>>  
>> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(F

[Dhis2-devs] DHIS 2 Internal Server Error when updating program via web api v 2.22

2015-12-03 Thread Lorill Crees
Hi,

I'm testing out upgrading our app to DHIS 2 v 2.22 (r21273) and am getting
an internal server error due to an underlying hibernate issue when using
the web api via PUT to the following url:

http://localhost:8090/dhis/api/programs/su3C65hggZ3?strategy=CREATE_AND_UPDATE

We are using this call to associate tracked entity attributes to a program.

We didn't have any issue with this in v2.21.

Any suggestions?

I can supply the json being sent if that is helpful.

Thanks,

Lorill


HTTP Status 500 - Request processing failed; nested exception is
org.hibernate.TransientObjectException: object references an unsaved
transient instance - save the transient instance before flushing:
org.hisp.dhis.trackedentity.TrackedEntityAttribute

*type* Exception report

*message* *Request processing failed; nested exception is
org.hibernate.TransientObjectException: object references an unsaved
transient instance - save the transient instance before flushing:
org.hisp.dhis.trackedentity.TrackedEntityAttribute*

*description* *The server encountered an internal error that prevented it
from fulfilling this request.*

*exception*

org.springframework.web.util.NestedServletException: Request
processing failed; nested exception is
org.hibernate.TransientObjectException: object references an unsaved
transient instance - save the transient instance before flushing:
org.hisp.dhis.trackedentity.TrackedEntityAttribute

org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:979)

org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:880)
javax.servlet.http.HttpServlet.service(HttpServlet.java:651)

org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)

org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.hisp.dhis.security.filter.CorsFilter.doFilter(CorsFilter.java:95)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:64)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:140)

org.spri

Re: [Dhis2-devs] Encryption Exception on startup

2015-12-02 Thread Lorill Crees
Thanks Lars. I'm able to start it up now.

On Wed, Dec 2, 2015 at 10:38 AM, Lars Helge Øverland 
wrote:

> Yes it has. You were very unfortunate and caught a bad revision. To fix it
> run this SQL:
>
> update configuration set remotepassword=null, smtppassword=null;
>
> Then get the latest war file again and restart.
>
> regards,
>
> Lars
>
>
> On Wed, Dec 2, 2015 at 7:28 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> I am upgrading from v2.21 to the current trunk version (r 21258). When I
>> attempt to start up tomcat I get the
>> below EncryptionOperationNotPossibleException exception and the app will
>> not start up.
>>
>> Has anything changed with the encryption in this latest version?
>>
>> Thanks,
>>
>> Lorill
>>
>>
>>  ERROR 2015-12-01 14:34:47,480
>> org.jasypt.exceptions.EncryptionOperationNotPossibleException
>>
>> at
>> org.jasypt.encryption.pbe.StandardPBEByteEncryptor.decrypt(StandardPBEByteEncryptor.java:974)
>>
>> at
>> org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:725)
>>
>> at
>> org.jasypt.encryption.pbe.PooledPBEStringEncryptor.decrypt(PooledPBEStringEncryptor.java:498)
>>
>> at
>> org.jasypt.hibernate4.type.AbstractEncryptedAsStringType.nullSafeGet(AbstractEncryptedAsStringType.java:143)
>>
>> at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:127)
>>
>> at org.hibernate.type.AbstractType.hydrate(AbstractType.java:106)
>>
>> at
>> org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2924)
>>
>> at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1695)
>>
>> at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1627)
>>
>> at org.hibernate.loader.Loader.getRow(Loader.java:1509)
>>
>> at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:719)
>>
>> at org.hibernate.loader.Loader.processResultSet(Loader.java:949)
>>
>> at org.hibernate.loader.Loader.doQuery(Loader.java:917)
>>
>> at
>> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:348)
>>
>> at org.hibernate.loader.Loader.doList(Loader.java:2550)
>>
>> at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2395)
>>
>> at org.hibernate.loader.Loader.list(Loader.java:2358)
>>
>> at
>> org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:124)
>>
>> at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1623)
>>
>> at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)
>>
>> at
>> org.hisp.dhis.hibernate.HibernateGenericStore.getAll(HibernateGenericStore.java:481)
>>
>> at
>> org.hisp.dhis.configuration.DefaultConfigurationService.getConfiguration(DefaultConfigurationService.java:70)
>>
>> 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:483)
>>
>> 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.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>>
>> at
>> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
>>
>> at
>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
>>
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>>
>> at
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
>>
>> at com.sun.proxy.$Proxy45.getConfiguration(Unknown Source)
>>
>> at
>> org.hisp.dhis.startup.ConfigurationPopulator.execute(ConfigurationPopulator.java:48)
>>
>> at
>> org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(DefaultStartupRoutineExecutor.java:129)
>>
>> at
>> or

[Dhis2-devs] Encryption Exception on startup

2015-12-02 Thread Lorill Crees
Hi,

I am upgrading from v2.21 to the current trunk version (r 21258). When I
attempt to start up tomcat I get the
below EncryptionOperationNotPossibleException exception and the app will
not start up.

Has anything changed with the encryption in this latest version?

Thanks,

Lorill


 ERROR 2015-12-01 14:34:47,480
org.jasypt.exceptions.EncryptionOperationNotPossibleException

at
org.jasypt.encryption.pbe.StandardPBEByteEncryptor.decrypt(StandardPBEByteEncryptor.java:974)

at
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:725)

at
org.jasypt.encryption.pbe.PooledPBEStringEncryptor.decrypt(PooledPBEStringEncryptor.java:498)

at
org.jasypt.hibernate4.type.AbstractEncryptedAsStringType.nullSafeGet(AbstractEncryptedAsStringType.java:143)

at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:127)

at org.hibernate.type.AbstractType.hydrate(AbstractType.java:106)

at
org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2924)

at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1695)

at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1627)

at org.hibernate.loader.Loader.getRow(Loader.java:1509)

at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:719)

at org.hibernate.loader.Loader.processResultSet(Loader.java:949)

at org.hibernate.loader.Loader.doQuery(Loader.java:917)

at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:348)

at org.hibernate.loader.Loader.doList(Loader.java:2550)

at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2395)

at org.hibernate.loader.Loader.list(Loader.java:2358)

at
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:124)

at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1623)

at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)

at
org.hisp.dhis.hibernate.HibernateGenericStore.getAll(HibernateGenericStore.java:481)

at
org.hisp.dhis.configuration.DefaultConfigurationService.getConfiguration(DefaultConfigurationService.java:70)

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:483)

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.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)

at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)

at com.sun.proxy.$Proxy45.getConfiguration(Unknown Source)

at
org.hisp.dhis.startup.ConfigurationPopulator.execute(ConfigurationPopulator.java:48)

at
org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(DefaultStartupRoutineExecutor.java:129)

at
org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(DefaultStartupRoutineExecutor.java:92)

at
org.hisp.dhis.system.startup.StartupListener.contextInitialized(StartupListener.java:71)

at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4728)

at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)

at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1738)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

 (StartupListener.java [localhost-startStop-1])

01-Dec-2015 14:34:47.480 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.startInternal Error listenerStart
___
Mailing list: https://launchpad.net/~dhis2

Re: [Dhis2-devs] Bulk Deletion of Data

2015-10-28 Thread Lorill Crees
> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
>> P
>> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
>> {color : black;}A.name {color : black;}.line {height: 1px;
>> background-color: #525D76; border: none;} HTTP
>> Status 406 - type Status
>> reportmessage description The
>> resource identified by this request is only capable of generating responses
>> with characteristics not acceptable according to the request "accept"
>> headers.Apache Tomcat/8.0.21
>>
>>
>>
>> On Tue, Oct 27, 2015 at 1:07 AM, Morten Olav Hansen 
>> wrote:
>>
>>> Just FYI, we have two blueprints related to this in 2.22, [1] is
>>> implemented already and [2] will hopefully come (but we are still
>>> discussing implementation details for that one)
>>>
>>> [1]
>>> https://blueprints.launchpad.net/dhis2/+spec/webapi-bulk-deletion-of-tracker-objects
>>> [2] https://blueprints.launchpad.net/dhis2/+spec/soft-event-delete
>>>
>>> --
>>> Morten
>>>
>>> On Tue, Oct 27, 2015 at 4:01 PM, Knut Staring  wrote:
>>>
>>>> My interpretation was that they would like a flag on each datavalue to
>>>> say whether it is still current - which I guess would require an extension
>>>> of that table. However, we do have something akin to this, namely the audit
>>>> functionality, which preserves the history of earlier (overwritten) values
>>>> - perhaps that could be leveraged?
>>>>
>>>> Knut
>>>>
>>>> On Tue, Oct 27, 2015 at 5:50 AM, Jason Pickering <
>>>> jason.p.picker...@gmail.com> wrote:
>>>>
>>>>> Hi Aaron,
>>>>>
>>>>> There is no "soft delete" function, if that is what you are after, but
>>>>> it has been discussed.
>>>>>
>>>>> Although there is no direct way as Lars points out, if you know what
>>>>> you wish to delete, it is still possible.  Namely, if you transmit a ""
>>>>> value for the value which you wish to delete, it will be deleted. Thus, if
>>>>> you wish to delete all values for a given dataset/OU/period, you can get
>>>>> all of the values from the API, then set them all to "", and upload the
>>>>> data again.  I think you can also use the DELETE verb as documented here (
>>>>> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s12.html) to
>>>>> delete a value.
>>>>>
>>>>>
>>>>> Not sure if that is the functionality you are after though. Typically,
>>>>> this would be a DB admin's role though and would be done with SQL, if you
>>>>> are say, going to delete ALL values for a large part of the hierarchy. The
>>>>> possibility for a whoopsie-moment could be large here.
>>>>>
>>>>> Regards,
>>>>> Jason
>>>>>
>>>>>
>>>>> On Mon, Oct 26, 2015 at 10:37 PM, Aaron Gladders >>>> > wrote:
>>>>>
>>>>>> Hi Lars - is there a recommended approach to "deactive" data without
>>>>>> getting into the database itself?  If not is it worth setting up a
>>>>>> blueprint for it?  We may have a group interested in funding that
>>>>>> development.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Aaron
>>>>>>
>>>>>> On Thu, Sep 24, 2015 at 2:39 PM, Lars Helge Øverland <
>>>>>> larshe...@gmail.com> wrote:
>>>>>>
>>>>>>> Hi Lorill,
>>>>>>>
>>>>>>> sorry but at the moment there is no such option. So far we have
>>>>>>> decided not to open up for this to prevent mishaps.
>>>>>>>
>>>>>>> regards,
>>>>>>>
>>>>>>> Lars
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Sep 24, 2015 at 11:37 PM, Lorill Crees 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Just following up on this. Any ideas on the best way to
>>>>>>>> programatically bulk delete data values?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Lorill
>>>>>>>>
>>>>>>>> On Tue, Sep 15, 2015 at 1:04 PM, Lorill Crees 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I seem to remember a prior thread on this but I can't seem to find
>>>>>>>>> it. We want to be able to programatically bulk delete data values 
>>>>>>>>> (both
>>>>>>>>> aggregate and program/program stage data) via the Web API. Is there a 
>>>>>>>>> way
>>>>>>>>> to achieve this?
>>>>>>>>>
>>>>>>>>> We don't want to have to do this on a sql level directly via the
>>>>>>>>> database, nor do we want to have to loop through individual data 
>>>>>>>>> points in
>>>>>>>>> order to delete them.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Lorill
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>> ___
>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>> Post to : dhis2-devs@lists.launchpad.net
>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Jason P. Pickering
>>>>> email: jason.p.picker...@gmail.com
>>>>> tel:+46764147049
>>>>>
>>>>> ___
>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>> Post to : dhis2-devs@lists.launchpad.net
>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Knut Staring
>>>> Dept. of Informatics, University of Oslo
>>>> Norway: +4791880522
>>>> Skype: knutstar
>>>> http://dhis2.org
>>>>
>>>> ___
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to : dhis2-devs@lists.launchpad.net
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] OpenFuturePeriods issue with DHIS 2 v 2.21 Upgrade

2015-10-28 Thread Lorill Crees
Thanks for the explanation Lars, that makes sense.

Cheers,

Lorill

On Tue, Oct 27, 2015 at 9:14 PM, Lars Helge Øverland 
wrote:

> Hi Lorill,
>
> this is admittedly a bit confusing but expected behavior per now.
>
> In 2.21 we have made the rules for data import a bit stricter and made it
> consistent with the rules for direct data entry. The rule is that by
> default you cannot enter data for a period for which the end date is in the
> future (i.e period is not over). This is done to prevent people from
> entering data before the period is over, and makes sense e.g. for service
> delivery data (you cannot enter number of people treated for X before the
> period is over). For some types of data, e.g. population data, this is not
> ideal, as you want to enter population for future periods. To handle that
> you can set the "open future periods" to a value higher than 0.
>
> So you are correct in that this behavior has changed in 2.21, and that is
> seems a bit strange. That said, given the logic explained above it gives
> you better control of what data is imported. E.g. when you allow regular
> users to import data you want to impose stricter control over the data that
> can be imported. So we plan to keep this constraint in place for now - you
> can just adjust the "allow future periods" value to work around it.
>
> regards,
>
> Lars
>
>
>
>
>
>
> On Tue, Oct 27, 2015 at 6:52 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> We're in the process of testing out an upgrade to v 2.21 and are
>> encountering a new issue with the upload of data values via the API in
>> regards to the openFuturePeriods field.
>>
>> The dataset we're uploading data to is set to yearly data, and the data
>> we are uploading has a period of "2015". The openFuturePeriods field is set
>> to "0". When uploading we get the error:
>> "Data element does not allow for future periods through data sets:
>> y8oCRZx5gMs"
>>
>> Testing setting the openFuturePeriods to "1" gets rid of the error.
>>
>> However, in v 2.20 we could upload data for 2015 (current year) with no
>> problem when the openFuturePeriods was set to "0".
>>
>> Has something changed in the logic for how dates are calculated for
>> openFuturePeriods? We wouldn't consider the current year to be a future
>> year.
>>
>> Please help!
>>
>> Thanks,
>>
>> Lorill
>>
>> ___
>> 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 <https://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] OpenFuturePeriods issue with DHIS 2 v 2.21 Upgrade

2015-10-27 Thread Lorill Crees
Hi,

We're in the process of testing out an upgrade to v 2.21 and are
encountering a new issue with the upload of data values via the API in
regards to the openFuturePeriods field.

The dataset we're uploading data to is set to yearly data, and the data we
are uploading has a period of "2015". The openFuturePeriods field is set to
"0". When uploading we get the error:
"Data element does not allow for future periods through data sets:
y8oCRZx5gMs"

Testing setting the openFuturePeriods to "1" gets rid of the error.

However, in v 2.20 we could upload data for 2015 (current year) with no
problem when the openFuturePeriods was set to "0".

Has something changed in the logic for how dates are calculated for
openFuturePeriods? We wouldn't consider the current year to be a future
year.

Please help!

Thanks,

Lorill
___
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] Bulk Deletion of Data

2015-10-27 Thread Lorill Crees
 if you know what you
>>> wish to delete, it is still possible.  Namely, if you transmit a "" value
>>> for the value which you wish to delete, it will be deleted. Thus, if you
>>> wish to delete all values for a given dataset/OU/period, you can get all of
>>> the values from the API, then set them all to "", and upload the data
>>> again.  I think you can also use the DELETE verb as documented here (
>>> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s12.html) to
>>> delete a value.
>>>
>>>
>>> Not sure if that is the functionality you are after though. Typically,
>>> this would be a DB admin's role though and would be done with SQL, if you
>>> are say, going to delete ALL values for a large part of the hierarchy. The
>>> possibility for a whoopsie-moment could be large here.
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>> On Mon, Oct 26, 2015 at 10:37 PM, Aaron Gladders 
>>> wrote:
>>>
>>>> Hi Lars - is there a recommended approach to "deactive" data without
>>>> getting into the database itself?  If not is it worth setting up a
>>>> blueprint for it?  We may have a group interested in funding that
>>>> development.
>>>>
>>>> Thanks,
>>>>
>>>> Aaron
>>>>
>>>> On Thu, Sep 24, 2015 at 2:39 PM, Lars Helge Øverland <
>>>> larshe...@gmail.com> wrote:
>>>>
>>>>> Hi Lorill,
>>>>>
>>>>> sorry but at the moment there is no such option. So far we have
>>>>> decided not to open up for this to prevent mishaps.
>>>>>
>>>>> regards,
>>>>>
>>>>> Lars
>>>>>
>>>>>
>>>>> On Thu, Sep 24, 2015 at 11:37 PM, Lorill Crees 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Just following up on this. Any ideas on the best way to
>>>>>> programatically bulk delete data values?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Lorill
>>>>>>
>>>>>> On Tue, Sep 15, 2015 at 1:04 PM, Lorill Crees 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I seem to remember a prior thread on this but I can't seem to find
>>>>>>> it. We want to be able to programatically bulk delete data values (both
>>>>>>> aggregate and program/program stage data) via the Web API. Is there a 
>>>>>>> way
>>>>>>> to achieve this?
>>>>>>>
>>>>>>> We don't want to have to do this on a sql level directly via the
>>>>>>> database, nor do we want to have to loop through individual data points 
>>>>>>> in
>>>>>>> order to delete them.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Lorill
>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>> ___
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to : dhis2-devs@lists.launchpad.net
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Jason P. Pickering
>>> email: jason.p.picker...@gmail.com
>>> tel:+46764147049
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Bulk Deletion of Data

2015-09-24 Thread Lorill Crees
Hi,

Just following up on this. Any ideas on the best way to programatically
bulk delete data values?

Thanks,

Lorill

On Tue, Sep 15, 2015 at 1:04 PM, Lorill Crees  wrote:

> Hi,
>
> I seem to remember a prior thread on this but I can't seem to find it. We
> want to be able to programatically bulk delete data values (both aggregate
> and program/program stage data) via the Web API. Is there a way to achieve
> this?
>
> We don't want to have to do this on a sql level directly via the database,
> nor do we want to have to loop through individual data points in order to
> delete them.
>
> Thanks,
>
> Lorill
>
___
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] API - User Settings throwing Exceptions

2015-09-23 Thread Lorill Crees
Thanks Lars for the quick turnaround on this!

And thanks Jason for the info on bug reporting - I'll create a report
myself in the future.

Cheers,

Lorill

On Wed, Sep 23, 2015 at 12:48 AM, Lars Helge Øverland 
wrote:

> Hi Lorill,
>
> thanks for pointing this out. It has been fixed now in trunk and 2.20.
>
> best regards,
>
> Lars
>
>
>
> On Wed, Sep 23, 2015 at 9:38 AM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> Hi Lorill,
>> Thanks for the bug report. I created a bug for you here (
>> https://bugs.launchpad.net/dhis2/+bug/1498786). This would be the
>> preferred way to report bugs.
>>
>> Once it has been fixed, the bug will be updated.
>>
>> Best regards,
>> Jason
>>
>>
>> On Tue, Sep 22, 2015 at 11:49 PM, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> I am accessing the User Settings via the api, and if certain settings
>>> for a user are not set, the api is throwing a 500 Null Pointer exception.
>>>
>>> For example, on the demo server, this call properly returns "en":
>>> https://apps.dhis2.org/demo/api/userSettings/keyUiLocale?user=admin
>>>
>>> whereas this call throws a null pointer:
>>> https://apps.dhis2.org/demo/api/userSettings/keyUiLocale?user=mobile
>>>
>>> Also, some keys return Class Cast exceptions, such as this key:
>>> keyMessageEmailNotification
>>>
>>> https://apps.dhis2.org/demo/api/userSettings/keyMessageEmailNotification?user=admin
>>> Request processing failed; nested exception is
>>> java.lang.ClassCastException: java.lang.Boolean cannot be cast to
>>> java.lang.String
>>>
>>> This is for version 2.20.
>>>
>>> Is it possible to fix these? Thanks,
>>>
>>> Lorill
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com
>> tel:+46764147049
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org <https://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] API - User Settings throwing Exceptions

2015-09-22 Thread Lorill Crees
Hi,

I am accessing the User Settings via the api, and if certain settings for a
user are not set, the api is throwing a 500 Null Pointer exception.

For example, on the demo server, this call properly returns "en":
https://apps.dhis2.org/demo/api/userSettings/keyUiLocale?user=admin

whereas this call throws a null pointer:
https://apps.dhis2.org/demo/api/userSettings/keyUiLocale?user=mobile

Also, some keys return Class Cast exceptions, such as this key:
keyMessageEmailNotification
https://apps.dhis2.org/demo/api/userSettings/keyMessageEmailNotification?user=admin
Request processing failed; nested exception is
java.lang.ClassCastException: java.lang.Boolean cannot be cast to
java.lang.String

This is for version 2.20.

Is it possible to fix these? Thanks,

Lorill
___
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] DHIS 2 Documentation in French?

2015-09-16 Thread Lorill Crees
Hi Calle,

The interface is available in English, French and Portuguese.

Cheers,

Lorill

On Wed, Sep 16, 2015 at 4:38 AM, Calle Hedberg 
wrote:

> Lorill,
>
> Excellent - appreciated (btw - interface in English or French?)
>
> Regards
> Calle
>
> On 15 September 2015 at 22:40, Lorill Crees  wrote:
>
>> Hi Calle,
>>
>> Yes - we are working on making it available. It's a standalone Grails
>> application that would require server installation and configuration, so we
>> are currently investigating options that would be the easiest for others to
>> make use of it.
>>
>> I'll definitely contact the dev list when it is available.
>>
>> Cheers,
>>
>> Lorill
>>
>> On Tue, Sep 15, 2015 at 12:35 PM, Calle Hedberg 
>> wrote:
>>
>>> Lorill,
>>>
>>> That custom app seems interesting - are you willing to make it available
>>> via the app store (or just open source it)?
>>>
>>> Regards
>>> Calle
>>>
>>> On 15 September 2015 at 21:51, Lorill Crees  wrote:
>>>
>>>> Hi Matthieu,
>>>>
>>>> Thanks for your response. We have recently rolled out a DHIS 2 instance
>>>> in Mali where staff will be using a custom standalone application we have
>>>> built to import survey (program and program stage) data, as well as
>>>> aggregate data (datasets) into DHIS 2. They will then use DHIS 2 to do
>>>> analysis on the data.
>>>>
>>>> Prior to this rollout the users have had no exposure to DHIS 2 except
>>>> for a 3-5 day training course. A translated User Manual would be invaluable
>>>> to them as they get more comfortable using DHIS 2.
>>>>
>>>> Thanks again for your help.
>>>>
>>>> Lorill
>>>>
>>>> On Mon, Sep 14, 2015 at 12:00 PM, Matthieu Pinard 
>>>> wrote:
>>>>
>>>>> Dear Lorill,
>>>>>
>>>>> thank you for you message. Yes we plan to get up to speed with French
>>>>> Guides (implementation and User Manual). Could you describe a bit more 
>>>>> your
>>>>> need, so that we can see we have available content already.
>>>>>
>>>>> Cheers,
>>>>> Matthieu
>>>>>
>>>>> Matthieu Pinard
>>>>> DHIS 2 Academy & Community Coordinator | University of Oslo
>>>>>
>>>>> On 14 September 2015 at 21:43, Lorill Crees  wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> We have some French DHIS 2 Users and are wondering if there are plans
>>>>>> to have the DHIS 2 User Manual translated into French? The users are
>>>>>> currently using version 2.20.
>>>>>>
>>>>>> The only French documentation we see is for the DHIS 2 Implementation
>>>>>> Guide (which is outdated to 2.17).
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Lorill
>>>>>>
>>>>>> ___
>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>> Post to : dhis2-devs@lists.launchpad.net
>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> ___
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to : dhis2-devs@lists.launchpad.net
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> ***
>>>
>>> Calle Hedberg
>>>
>>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>>
>>> Tel/fax (home): +27-21-685-6472
>>>
>>> Cell: +27-82-853-5352
>>>
>>> Iridium SatPhone: +8816-315-19119
>>>
>>> Email: calle.hedb...@gmail.com
>>>
>>> Skype: calle_hedberg
>>>
>>> ***
>>>
>>>
>>
>
>
> --
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19119
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
>
___
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


  1   2   >