Re: [Dhis2-devs] In DHIS 2.27 Issues with deleting organisation unit

2017-12-14 Thread Jhansi Reddy Karee
Thanks Jason, Since we just have data values for the organisation units (which should be deleted), we are able to remove them after clearing the data associated with them using /api/maintenance/dataPruning/organisationUnits API. Thanks, Jhansi On Fri, Dec 15, 2017 at 11:51 AM, Jason Pickering <

Re: [Dhis2-devs] In DHIS 2.27 Issues with deleting organisation unit

2017-12-14 Thread Jason Pickering
It might work for you, but I am not 100% sure if that API endpoint will clear out everything. As you can see from the SQL function, orgunits may also have other dependencies, like pivots, charts, user associations, etc. The deletion handler for orgunits may refuse to remove it, if the object is a

Re: [Dhis2-devs] In DHIS 2.27 Issues with deleting organisation unit

2017-12-14 Thread Jhansi Reddy Karee
Thanks for the quick reply Jason, In DHIS documentation , we came across a WEB API which can clear all the data of the organisation unit. /api/26/maintenance/dataPruning/organisationUnits/ API Details: Data pruning will remov

Re: [Dhis2-devs] In DHIS 2.27 Issues with deleting organisation unit

2017-12-14 Thread Jason Pickering
Hi Jhansi, You will also need to get rid of the data in the data value audit table. Here is an SQL function which might work for you. https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/delete_orgunit_with_data.sql Regards, Jason On Thu, Dec 14, 2017 at 2:49 PM, Jhansi Reddy Karee <