Re: [Dhis2-devs] Removing user-installed App

2018-01-25 Thread Jan Henrik Ă˜verland
Hi Calle, When I click on the three dots the app opens up in a new tab. If I go back to the original tab the context menu for that app is open and I am able to click uninstall. Does that work for you in the mean time? This behaviour should be fixed of course. On 24 January 2018 at 23:05, Calle

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread moses mwale
okay nice thanks, is it to load user-defined functions the same way you load stored procedures, by packaging the Java class or classes into a JAR file and then loading the JAR file using the LOAD CLASSES statement? On Thu, Jan 25, 2018 at 11:38 PM, Jason Pickering < jason.p.picker...@gmail.com>

Re: [Dhis2-devs] Removing user-installed App

2018-01-25 Thread Calle Hedberg
Dan/Jan Henrik Thanks for quick feedback - strange that I did not pick up that the app is opening in a new tab, but maybe I was tired. So as Dan says, if you shift back to the "original" tab then Uninstall is visible, and it works. Agree that the behaviour is a bug - has any of you reported it

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread Jason Pickering
Hi Moses, You need to load both of those functions into your database. 1) Script to delete an orgunit is here 2) Script to merge two orgunits is here

Re: [Dhis2-devs] Fast/bulk delete of events

2018-01-25 Thread Jason Pickering
Hi Petar, You might be able to adapt this script to your needs. This script will actually delete the orgunit, but I think the relevant part you need is here

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread Knut Staring
Just run everything in your PgAdmin SQL interface. On Thu, Jan 25, 2018 at 1:22 PM, moses mwale wrote: > okay nice thanks, is it to load user-defined functions the same way you > load stored procedures, by packaging the Java class or classes into a JAR > file and then

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread moses mwale
This is live (Production) db created a backup. if something goes wrong will revert. But the function itself doesnt affect anything right? what am going to write now will i guess by merging duplicate orgs right? On Fri, Jan 26, 2018 at 2:59 AM, Jason Pickering < jason.p.picker...@gmail.com> wrote:

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread Bob Jolliffe
If you really must work on your production database directly then at the very least you should shutdown the dhis2 instance while you make changes. Naturally you want to keep that down time to a minimum. So I would suggest a sequence of: (i) make a copy of the database to test these procedures

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread Jason Pickering
Hi Moses These are simply Postgresql functions, which you load and execute directly in the database. These are completely external of DHIS2, so you will need to do this operation directly in the database environment. Regards Jason On Thu, Jan 25, 2018 at 1:22 PM, moses mwale

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread moses mwale
Am using psql. see attached if its correct loading procedure. On Fri, Jan 26, 2018 at 2:42 AM, Knut Staring wrote: > Just run everything in your PgAdmin SQL interface. > > On Thu, Jan 25, 2018 at 1:22 PM, moses mwale > wrote: > >> okay nice thanks, is

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread Jason Pickering
That looks correct. It is of course worth saying, that you should not attempt to perform this procedure on your production system, unless you have thoroughly tested it in a development environment! Regards, Jason On Thu, Jan 25, 2018 at 1:55 PM, moses mwale wrote: >

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread Jason Pickering
Hi again Moses, The function itself should not affect anything, but its never a good idea to do these things directly on a production database without extensive testing. Note that this function WILL remove data depending on whether its overlapping. So, if you have two data values for the same

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread moses mwale
Thanks all you are really help i appreciate so much. let me do test first on the backed up db if satisfied will run the merge on the Prod. Thanks. On Fri, Jan 26, 2018 at 3:24 AM, Bob Jolliffe wrote: > If you really must work on your production database directly then at >