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
> 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
> (ii) test out all of this sql stuff against your db copy (making sure
> you keep your sql in files so you can rerun against production)
> Once you are happy you can do what you need to do quickly and correctly,
> (iii) shutdown the dhis2 instance
> (iv) make a backup of database (again)
> (v) run the sql
> (vi) restart dhis2 instance
>
> Stay safe.
>
> On 25 January 2018 at 13:05, moses mwale  wrote:
> > 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
> >  wrote:
> >>
> >> 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:
> >>>
> >>> 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 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
> >  wrote:
> >>
> >> 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
> >>
> >> After that, just call the function with
> >>
> >> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
> >>
> >> where `source_uid` is the UID of the organisation unit you want to
> get
> >> rid of, `dest_uid` is the UID of the organisation unit you want to
> keep and
> >> move data to
> >> and `strategy` is one of the following:
> >>
> >> SUM: Returns the sum of the values, when there is overlapping data.
> >> MAX: Returns the max of the values, when there is overlapping data.
> >> MIN: Returns the min of the values, when there is overlapping data.
> >> AVG: Returns the mean of the values, when there is overlapping data.
> >> LAST: Returns the last value entered, when there is overlapping
> data.
> >> FIRST: Returns the first vale entered, when there is overlapping
> data.
> >>
> >> Note that this only applies to numeric data. For other data
> (Boolean,
> >> text, etc) which cannot be aggregated numerically, the last value
> will
> >> always be taken.
> >>
> >> The merge script will not handle situations where you have
> overlapping
> >> tracker/event data, so you would need to figure out how to handle
> that
> >> yourself!
> >>
> >> Hope that helps to clarify and good luck!
> >>
> >> Regards,
> >> Jason Pickering
> >>
> >>
> >>
> >>
> >>
> >> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale  >
> >> wrote:
> >>>
> >>> Hey Jason And Knut, thanks for the information, i have been trying
> to
> >>> understand the sql script shared and tried to execute but to no
> effect,
> >>> please can you help me understand where to place the source id and
> orgunit
> >>> ids in the script after several attempts of try its has became
> more complex.
> >>>
> >>> I have attached a datavalue table and 1 duplicate orgunit to be
> >>> merged. please help me.
> >>>
> >>> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale  >
> >>> wrote:
> 
>  Thanks very much, allow me to go through and implement the given
>  knowledge
> 
>  On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering
>   wrote:
> >
> > Hi Moses
> > We have some SQL scripts for this here.
> >
> >
> > https://github.com/dhis2/dhis2-utils/blob/master/
> resources/sql/merge_orgunits.sql
> >
> > This script will not handle tracker data but could probably be
> > adapted fairly easily to do so.
> >
> > Regards,
> >

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
(ii) test out all of this sql stuff against your db copy (making sure
you keep your sql in files so you can rerun against production)
Once you are happy you can do what you need to do quickly and correctly,
(iii) shutdown the dhis2 instance
(iv) make a backup of database (again)
(v) run the sql
(vi) restart dhis2 instance

Stay safe.

On 25 January 2018 at 13:05, moses mwale  wrote:
> 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
>  wrote:
>>
>> 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:
>>>
>>> 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 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
>  wrote:
>>
>> 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
>>
>> After that, just call the function with
>>
>> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>>
>> where `source_uid` is the UID of the organisation unit you want to get
>> rid of, `dest_uid` is the UID of the organisation unit you want to keep 
>> and
>> move data to
>> and `strategy` is one of the following:
>>
>> SUM: Returns the sum of the values, when there is overlapping data.
>> MAX: Returns the max of the values, when there is overlapping data.
>> MIN: Returns the min of the values, when there is overlapping data.
>> AVG: Returns the mean of the values, when there is overlapping data.
>> LAST: Returns the last value entered, when there is overlapping data.
>> FIRST: Returns the first vale entered, when there is overlapping data.
>>
>> Note that this only applies to numeric data. For other data (Boolean,
>> text, etc) which cannot be aggregated numerically, the last value will
>> always be taken.
>>
>> The merge script will not handle situations where you have overlapping
>> tracker/event data, so you would need to figure out how to handle that
>> yourself!
>>
>> Hope that helps to clarify and good luck!
>>
>> Regards,
>> Jason Pickering
>>
>>
>>
>>
>>
>> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale 
>> wrote:
>>>
>>> Hey Jason And Knut, thanks for the information, i have been trying to
>>> understand the sql script shared and tried to execute but to no effect,
>>> please can you help me understand where to place the source id and 
>>> orgunit
>>> ids in the script after several attempts of try its has became more 
>>> complex.
>>>
>>> I have attached a datavalue table and 1 duplicate orgunit to be
>>> merged. please help me.
>>>
>>> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale 
>>> wrote:

 Thanks very much, allow me to go through and implement the given
 knowledge

 On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering
  wrote:
>
> Hi Moses
> We have some SQL scripts for this here.
>
>
> https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/merge_orgunits.sql
>
> This script will not handle tracker data but could probably be
> adapted fairly easily to do so.
>
> Regards,
> Jason
>
>
>
> On Jan 7, 2018 7:28 AM, "Knut Staring"  wrote:
>>
>> Hi Moses,
>> I would take a backup of the database and then do this with an sql
>> script, just changing the sourceid (the database internal referent 
>> to the
>> organisationunitid) in the datavalues table. But you may get blocked 
>> if the
>> same period has been filled for both, in which case you

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 period/data
element/cat option combo/attribute option combo , one of these is going to
be lost or at least affected in some way depending on the merge strategy
you chose. If there is no overlapping data, then there should not be any
data lost, but like I said, be sure you test it very carefully before doing
this on a live system.

Regards,
Jason


On Thu, Jan 25, 2018 at 2:05 PM, moses mwale  wrote:

> 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:
>
>> 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:
>>
>>> 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 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> wrote:
>
>> 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
>> 
>>
>> After that, just call the function with
>>
>> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>>
>> where `source_uid` is the UID of the organisation unit you want to
>> get rid of, `dest_uid` is the UID of the organisation unit you want to 
>> keep
>> and move data to
>> and `strategy` is one of the following:
>>
>> SUM: Returns the sum of the values, when there is overlapping data.
>> MAX: Returns the max of the values, when there is overlapping data.
>> MIN: Returns the min of the values, when there is overlapping data.
>> AVG: Returns the mean of the values, when there is overlapping data.
>> LAST: Returns the last value entered, when there is overlapping data.
>> FIRST: Returns the first vale entered, when there is overlapping data.
>>
>> Note that this only applies to numeric data. For other data (Boolean,
>> text, etc) which cannot be aggregated numerically, the last value will
>> always be taken.
>>
>> The merge script will not handle situations where you have
>> overlapping tracker/event data, so you would need to figure out how to
>> handle that yourself!
>>
>> Hope that helps to clarify and good luck!
>>
>> Regards,
>> Jason Pickering
>>
>>
>>
>>
>>
>> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale 
>> wrote:
>>
>>> Hey Jason And Knut, thanks for the information, i have been trying
>>> to understand the sql script shared and tried to execute but to no 
>>> effect,
>>> please can you help me understand where to place the source id and 
>>> orgunit
>>> ids in the script after several attempts of try its has became more
>>> complex.
>>>
>>> I have attached a datavalue table and 1 duplicate orgunit to be
>>> merged. please help me.
>>>
>>> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale 
>>> wrote:
>>>
 Thanks very much, allow me to go through and implement the given
 knowledge

 On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
 jason.p.picker...@gmail.com> wrote:

> Hi Moses
> We have some SQL scripts for this here.
>
> https://github.com/dhis2/dhis2-utils/blob/master/resources/s
> ql/merge_orgunits.sql
>
> This script will not handle tracker data but could probably be
> adapted fairly easily to do so.
>
> Regards,
> Jason
>
>
>
> On Jan 7, 2018 7:28 AM, "Knut Staring"  wrote:
>
>> Hi Moses,
>> I would take a backup of the da

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:

> 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:
>
>> 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 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> wrote:

> 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
> 
>
> After that, just call the function with
>
> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>
> where `source_uid` is the UID of the organisation unit you want to get
> rid of, `dest_uid` is the UID of the organisation unit you want to keep 
> and
> move data to
> and `strategy` is one of the following:
>
> SUM: Returns the sum of the values, when there is overlapping data.
> MAX: Returns the max of the values, when there is overlapping data.
> MIN: Returns the min of the values, when there is overlapping data.
> AVG: Returns the mean of the values, when there is overlapping data.
> LAST: Returns the last value entered, when there is overlapping data.
> FIRST: Returns the first vale entered, when there is overlapping data.
>
> Note that this only applies to numeric data. For other data (Boolean,
> text, etc) which cannot be aggregated numerically, the last value will
> always be taken.
>
> The merge script will not handle situations where you have overlapping
> tracker/event data, so you would need to figure out how to handle that
> yourself!
>
> Hope that helps to clarify and good luck!
>
> Regards,
> Jason Pickering
>
>
>
>
>
> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale 
> wrote:
>
>> Hey Jason And Knut, thanks for the information, i have been trying to
>> understand the sql script shared and tried to execute but to no effect,
>> please can you help me understand where to place the source id and 
>> orgunit
>> ids in the script after several attempts of try its has became more
>> complex.
>>
>> I have attached a datavalue table and 1 duplicate orgunit to be
>> merged. please help me.
>>
>> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale 
>> wrote:
>>
>>> Thanks very much, allow me to go through and implement the given
>>> knowledge
>>>
>>> On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
>>> jason.p.picker...@gmail.com> wrote:
>>>
 Hi Moses
 We have some SQL scripts for this here.

 https://github.com/dhis2/dhis2-utils/blob/master/resources/s
 ql/merge_orgunits.sql

 This script will not handle tracker data but could probably be
 adapted fairly easily to do so.

 Regards,
 Jason



 On Jan 7, 2018 7:28 AM, "Knut Staring"  wrote:

> Hi Moses,
> I would take a backup of the database and then do this with an sql
> script, just changing the sourceid (the database internal referent to 
> the
> organisationunitid) in the datavalues table. But you may get blocked 
> if the
> same period has been filled for both, in which case you may want to 
> do a
> "NOT IN" or left join.
>
> Knut
>
> On Jan 7, 2018 10:29, "moses mwale"  wrote:
>
>> Hey devs is it possible to merge facilities without losing data,
>> some admin accidentally created other duplicates units into the 
>> system.
>> anyone knows how its done?
>>
>> developer_lusaka_systems
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2

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:

> 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 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> wrote:
>>>
 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
 

 After that, just call the function with

 SELECT merge_organisationunits(source_uid,dest_uid ,strategy);

 where `source_uid` is the UID of the organisation unit you want to get
 rid of, `dest_uid` is the UID of the organisation unit you want to keep and
 move data to
 and `strategy` is one of the following:

 SUM: Returns the sum of the values, when there is overlapping data.
 MAX: Returns the max of the values, when there is overlapping data.
 MIN: Returns the min of the values, when there is overlapping data.
 AVG: Returns the mean of the values, when there is overlapping data.
 LAST: Returns the last value entered, when there is overlapping data.
 FIRST: Returns the first vale entered, when there is overlapping data.

 Note that this only applies to numeric data. For other data (Boolean,
 text, etc) which cannot be aggregated numerically, the last value will
 always be taken.

 The merge script will not handle situations where you have overlapping
 tracker/event data, so you would need to figure out how to handle that
 yourself!

 Hope that helps to clarify and good luck!

 Regards,
 Jason Pickering





 On Thu, Jan 25, 2018 at 5:30 AM, moses mwale 
 wrote:

> Hey Jason And Knut, thanks for the information, i have been trying to
> understand the sql script shared and tried to execute but to no effect,
> please can you help me understand where to place the source id and orgunit
> ids in the script after several attempts of try its has became more
> complex.
>
> I have attached a datavalue table and 1 duplicate orgunit to be
> merged. please help me.
>
> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale 
> wrote:
>
>> Thanks very much, allow me to go through and implement the given
>> knowledge
>>
>> On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
>> jason.p.picker...@gmail.com> wrote:
>>
>>> Hi Moses
>>> We have some SQL scripts for this here.
>>>
>>> https://github.com/dhis2/dhis2-utils/blob/master/resources/s
>>> ql/merge_orgunits.sql
>>>
>>> This script will not handle tracker data but could probably be
>>> adapted fairly easily to do so.
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>>
>>> On Jan 7, 2018 7:28 AM, "Knut Staring"  wrote:
>>>
 Hi Moses,
 I would take a backup of the database and then do this with an sql
 script, just changing the sourceid (the database internal referent to 
 the
 organisationunitid) in the datavalues table. But you may get blocked 
 if the
 same period has been filled for both, in which case you may want to do 
 a
 "NOT IN" or left join.

 Knut

 On Jan 7, 2018 10:29, "moses mwale"  wrote:

> Hey devs is it possible to merge facilities without losing data,
> some admin accidentally created other duplicates units into the 
> system.
> anyone knows how its done?
>
> developer_lusaka_systems
>
> ___
> 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://

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 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> wrote:
>>
>>> 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
>>> 
>>>
>>> After that, just call the function with
>>>
>>> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>>>
>>> where `source_uid` is the UID of the organisation unit you want to get
>>> rid of, `dest_uid` is the UID of the organisation unit you want to keep and
>>> move data to
>>> and `strategy` is one of the following:
>>>
>>> SUM: Returns the sum of the values, when there is overlapping data.
>>> MAX: Returns the max of the values, when there is overlapping data.
>>> MIN: Returns the min of the values, when there is overlapping data.
>>> AVG: Returns the mean of the values, when there is overlapping data.
>>> LAST: Returns the last value entered, when there is overlapping data.
>>> FIRST: Returns the first vale entered, when there is overlapping data.
>>>
>>> Note that this only applies to numeric data. For other data (Boolean,
>>> text, etc) which cannot be aggregated numerically, the last value will
>>> always be taken.
>>>
>>> The merge script will not handle situations where you have overlapping
>>> tracker/event data, so you would need to figure out how to handle that
>>> yourself!
>>>
>>> Hope that helps to clarify and good luck!
>>>
>>> Regards,
>>> Jason Pickering
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale 
>>> wrote:
>>>
 Hey Jason And Knut, thanks for the information, i have been trying to
 understand the sql script shared and tried to execute but to no effect,
 please can you help me understand where to place the source id and orgunit
 ids in the script after several attempts of try its has became more
 complex.

 I have attached a datavalue table and 1 duplicate orgunit to be merged.
 please help me.

 On Mon, Jan 8, 2018 at 8:26 PM, moses mwale 
 wrote:

> Thanks very much, allow me to go through and implement the given
> knowledge
>
> On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> Hi Moses
>> We have some SQL scripts for this here.
>>
>> https://github.com/dhis2/dhis2-utils/blob/master/resources/s
>> ql/merge_orgunits.sql
>>
>> This script will not handle tracker data but could probably be
>> adapted fairly easily to do so.
>>
>> Regards,
>> Jason
>>
>>
>>
>> On Jan 7, 2018 7:28 AM, "Knut Staring"  wrote:
>>
>>> Hi Moses,
>>> I would take a backup of the database and then do this with an sql
>>> script, just changing the sourceid (the database internal referent to 
>>> the
>>> organisationunitid) in the datavalues table. But you may get blocked if 
>>> the
>>> same period has been filled for both, in which case you may want to do a
>>> "NOT IN" or left join.
>>>
>>> Knut
>>>
>>> On Jan 7, 2018 10:29, "moses mwale"  wrote:
>>>
 Hey devs is it possible to merge facilities without losing data,
 some admin accidentally created other duplicates units into the system.
 anyone knows how its done?

 developer_lusaka_systems

 ___
 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
>>>
>>>
>
>
> --
> developer_lusaka_systems
>



 --
 developer_lusaka_systems

>>>
>>>
>>>
>>> --
>>> Jason P. Pickering
>>> email: jason.p.picker...@gmail.com
>>> tel:+46764147049 <+46%2076%20414%2070%2049>
>>>
>>
>>
>>
>> --
>> developer_lusaka_systems
>>
>
>
>
> --
> Knut Staring
>
> Department of Information, Evidence and Research
> W

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 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> wrote:
>
>> 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
>> 
>>
>> After that, just call the function with
>>
>> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>>
>> where `source_uid` is the UID of the organisation unit you want to get
>> rid of, `dest_uid` is the UID of the organisation unit you want to keep and
>> move data to
>> and `strategy` is one of the following:
>>
>> SUM: Returns the sum of the values, when there is overlapping data.
>> MAX: Returns the max of the values, when there is overlapping data.
>> MIN: Returns the min of the values, when there is overlapping data.
>> AVG: Returns the mean of the values, when there is overlapping data.
>> LAST: Returns the last value entered, when there is overlapping data.
>> FIRST: Returns the first vale entered, when there is overlapping data.
>>
>> Note that this only applies to numeric data. For other data (Boolean,
>> text, etc) which cannot be aggregated numerically, the last value will
>> always be taken.
>>
>> The merge script will not handle situations where you have overlapping
>> tracker/event data, so you would need to figure out how to handle that
>> yourself!
>>
>> Hope that helps to clarify and good luck!
>>
>> Regards,
>> Jason Pickering
>>
>>
>>
>>
>>
>> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale 
>> wrote:
>>
>>> Hey Jason And Knut, thanks for the information, i have been trying to
>>> understand the sql script shared and tried to execute but to no effect,
>>> please can you help me understand where to place the source id and orgunit
>>> ids in the script after several attempts of try its has became more
>>> complex.
>>>
>>> I have attached a datavalue table and 1 duplicate orgunit to be merged.
>>> please help me.
>>>
>>> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale 
>>> wrote:
>>>
 Thanks very much, allow me to go through and implement the given
 knowledge

 On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
 jason.p.picker...@gmail.com> wrote:

> Hi Moses
> We have some SQL scripts for this here.
>
> https://github.com/dhis2/dhis2-utils/blob/master/resources/s
> ql/merge_orgunits.sql
>
> This script will not handle tracker data but could probably be adapted
> fairly easily to do so.
>
> Regards,
> Jason
>
>
>
> On Jan 7, 2018 7:28 AM, "Knut Staring"  wrote:
>
>> Hi Moses,
>> I would take a backup of the database and then do this with an sql
>> script, just changing the sourceid (the database internal referent to the
>> organisationunitid) in the datavalues table. But you may get blocked if 
>> the
>> same period has been filled for both, in which case you may want to do a
>> "NOT IN" or left join.
>>
>> Knut
>>
>> On Jan 7, 2018 10:29, "moses mwale"  wrote:
>>
>>> Hey devs is it possible to merge facilities without losing data,
>>> some admin accidentally created other duplicates units into the system.
>>> anyone knows how its done?
>>>
>>> developer_lusaka_systems
>>>
>>> ___
>>> 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
>>
>>


 --
 developer_lusaka_systems

>>>
>>>
>>>
>>> --
>>> developer_lusaka_systems
>>>
>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com
>> tel:+46764147049 <+46%2076%20414%2070%2049>
>>
>
>
>
> --
> developer_lusaka_systems
>



-- 
Knut Staring

Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : ht

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  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 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> wrote:
>
>> 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
>> 
>>
>> After that, just call the function with
>>
>> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>>
>> where `source_uid` is the UID of the organisation unit you want to get
>> rid of, `dest_uid` is the UID of the organisation unit you want to keep and
>> move data to
>> and `strategy` is one of the following:
>>
>> SUM: Returns the sum of the values, when there is overlapping data.
>> MAX: Returns the max of the values, when there is overlapping data.
>> MIN: Returns the min of the values, when there is overlapping data.
>> AVG: Returns the mean of the values, when there is overlapping data.
>> LAST: Returns the last value entered, when there is overlapping data.
>> FIRST: Returns the first vale entered, when there is overlapping data.
>>
>> Note that this only applies to numeric data. For other data (Boolean,
>> text, etc) which cannot be aggregated numerically, the last value will
>> always be taken.
>>
>> The merge script will not handle situations where you have overlapping
>> tracker/event data, so you would need to figure out how to handle that
>> yourself!
>>
>> Hope that helps to clarify and good luck!
>>
>> Regards,
>> Jason Pickering
>>
>>
>>
>>
>>
>> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale 
>> wrote:
>>
>>> Hey Jason And Knut, thanks for the information, i have been trying to
>>> understand the sql script shared and tried to execute but to no effect,
>>> please can you help me understand where to place the source id and orgunit
>>> ids in the script after several attempts of try its has became more
>>> complex.
>>>
>>> I have attached a datavalue table and 1 duplicate orgunit to be merged.
>>> please help me.
>>>
>>> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale 
>>> wrote:
>>>
 Thanks very much, allow me to go through and implement the given
 knowledge

 On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
 jason.p.picker...@gmail.com> wrote:

> Hi Moses
> We have some SQL scripts for this here.
>
> https://github.com/dhis2/dhis2-utils/blob/master/resources/s
> ql/merge_orgunits.sql
>
> This script will not handle tracker data but could probably be adapted
> fairly easily to do so.
>
> Regards,
> Jason
>
>
>
> On Jan 7, 2018 7:28 AM, "Knut Staring"  wrote:
>
>> Hi Moses,
>> I would take a backup of the database and then do this with an sql
>> script, just changing the sourceid (the database internal referent to the
>> organisationunitid) in the datavalues table. But you may get blocked if 
>> the
>> same period has been filled for both, in which case you may want to do a
>> "NOT IN" or left join.
>>
>> Knut
>>
>> On Jan 7, 2018 10:29, "moses mwale"  wrote:
>>
>>> Hey devs is it possible to merge facilities without losing data,
>>> some admin accidentally created other duplicates units into the system.
>>> anyone knows how its done?
>>>
>>> developer_lusaka_systems
>>>
>>> ___
>>> 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
>>
>>


 --
 developer_lusaka_systems

>>>
>>>
>>>
>>> --
>>> developer_lusaka_systems
>>>
>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com
>> tel:+46764147049 <+46%2076%20414%2070%2049>
>>
>
>
>
> --
> developer_lusaka_systems
>



-- 
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+46764147049
___
Mailing list: https://launchpad.net/~dhis2-devs
Pos

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> wrote:

> 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
> 
>
> After that, just call the function with
>
> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>
> where `source_uid` is the UID of the organisation unit you want to get rid
> of, `dest_uid` is the UID of the organisation unit you want to keep and
> move data to
> and `strategy` is one of the following:
>
> SUM: Returns the sum of the values, when there is overlapping data.
> MAX: Returns the max of the values, when there is overlapping data.
> MIN: Returns the min of the values, when there is overlapping data.
> AVG: Returns the mean of the values, when there is overlapping data.
> LAST: Returns the last value entered, when there is overlapping data.
> FIRST: Returns the first vale entered, when there is overlapping data.
>
> Note that this only applies to numeric data. For other data (Boolean,
> text, etc) which cannot be aggregated numerically, the last value will
> always be taken.
>
> The merge script will not handle situations where you have overlapping
> tracker/event data, so you would need to figure out how to handle that
> yourself!
>
> Hope that helps to clarify and good luck!
>
> Regards,
> Jason Pickering
>
>
>
>
>
> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale 
> wrote:
>
>> Hey Jason And Knut, thanks for the information, i have been trying to
>> understand the sql script shared and tried to execute but to no effect,
>> please can you help me understand where to place the source id and orgunit
>> ids in the script after several attempts of try its has became more
>> complex.
>>
>> I have attached a datavalue table and 1 duplicate orgunit to be merged.
>> please help me.
>>
>> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale 
>> wrote:
>>
>>> Thanks very much, allow me to go through and implement the given
>>> knowledge
>>>
>>> On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
>>> jason.p.picker...@gmail.com> wrote:
>>>
 Hi Moses
 We have some SQL scripts for this here.

 https://github.com/dhis2/dhis2-utils/blob/master/resources/s
 ql/merge_orgunits.sql

 This script will not handle tracker data but could probably be adapted
 fairly easily to do so.

 Regards,
 Jason



 On Jan 7, 2018 7:28 AM, "Knut Staring"  wrote:

> Hi Moses,
> I would take a backup of the database and then do this with an sql
> script, just changing the sourceid (the database internal referent to the
> organisationunitid) in the datavalues table. But you may get blocked if 
> the
> same period has been filled for both, in which case you may want to do a
> "NOT IN" or left join.
>
> Knut
>
> On Jan 7, 2018 10:29, "moses mwale"  wrote:
>
>> Hey devs is it possible to merge facilities without losing data, some
>> admin accidentally created other duplicates units into the system. anyone
>> knows how its done?
>>
>> developer_lusaka_systems
>>
>> ___
>> 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
>
>
>>>
>>>
>>> --
>>> developer_lusaka_systems
>>>
>>
>>
>>
>> --
>> developer_lusaka_systems
>>
>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049 <+46%2076%20414%2070%2049>
>



-- 
developer_lusaka_systems
___
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] 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


After that, just call the function with

SELECT merge_organisationunits(source_uid,dest_uid ,strategy);

where `source_uid` is the UID of the organisation unit you want to get rid
of, `dest_uid` is the UID of the organisation unit you want to keep and
move data to
and `strategy` is one of the following:

SUM: Returns the sum of the values, when there is overlapping data.
MAX: Returns the max of the values, when there is overlapping data.
MIN: Returns the min of the values, when there is overlapping data.
AVG: Returns the mean of the values, when there is overlapping data.
LAST: Returns the last value entered, when there is overlapping data.
FIRST: Returns the first vale entered, when there is overlapping data.

Note that this only applies to numeric data. For other data (Boolean, text,
etc) which cannot be aggregated numerically, the last value will always be
taken.

The merge script will not handle situations where you have overlapping
tracker/event data, so you would need to figure out how to handle that
yourself!

Hope that helps to clarify and good luck!

Regards,
Jason Pickering





On Thu, Jan 25, 2018 at 5:30 AM, moses mwale  wrote:

> Hey Jason And Knut, thanks for the information, i have been trying to
> understand the sql script shared and tried to execute but to no effect,
> please can you help me understand where to place the source id and orgunit
> ids in the script after several attempts of try its has became more
> complex.
>
> I have attached a datavalue table and 1 duplicate orgunit to be merged.
> please help me.
>
> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale  wrote:
>
>> Thanks very much, allow me to go through and implement the given knowledge
>>
>> On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
>> jason.p.picker...@gmail.com> wrote:
>>
>>> Hi Moses
>>> We have some SQL scripts for this here.
>>>
>>> https://github.com/dhis2/dhis2-utils/blob/master/resources/s
>>> ql/merge_orgunits.sql
>>>
>>> This script will not handle tracker data but could probably be adapted
>>> fairly easily to do so.
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>>
>>> On Jan 7, 2018 7:28 AM, "Knut Staring"  wrote:
>>>
 Hi Moses,
 I would take a backup of the database and then do this with an sql
 script, just changing the sourceid (the database internal referent to the
 organisationunitid) in the datavalues table. But you may get blocked if the
 same period has been filled for both, in which case you may want to do a
 "NOT IN" or left join.

 Knut

 On Jan 7, 2018 10:29, "moses mwale"  wrote:

> Hey devs is it possible to merge facilities without losing data, some
> admin accidentally created other duplicates units into the system. anyone
> knows how its done?
>
> developer_lusaka_systems
>
> ___
> 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


>>
>>
>> --
>> developer_lusaka_systems
>>
>
>
>
> --
> developer_lusaka_systems
>



-- 
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


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

and
here

.

It sounds like in your case you want to delete the data, but not the
orgunit itself.

You could then wrap this function in a loop, to remove the data in bulk,
going one org unit at a time.

Hope this helps,
Jason




On Wed, Jan 24, 2018 at 11:01 PM, Calle Hedberg 
wrote:

> Hi,
>
> For events without registration, bulk deleting directly in the database is
> easy:
> 1. Delete all relevant data element records in the table
> trackedentitydatavalue (and if relevant trackedentitydatavalueaudit)
> 2. Delete the "case" records in the table programstageinstance
>
> Alex' method using the webAPI is OK for moderate number of records, but
> can be painful for large numbers
>
> Regards
> Calle
>
> On 24 January 2018 at 22:41, Petar Jovanovic  wrote:
>
>> Thanks a lot Alex!
>>
>> Anyhow, it would be a convenient feature for end users to do it through
>> the DHIS2 interface as well.
>>
>> Best,
>> Petar
>>
>> Obtener Outlook para Android 
>>
>>
>>
>>
>> On Wed, Jan 24, 2018 at 9:32 PM +0100, "Alex Tumwesigye" <
>> atumwesi...@gmail.com> wrote:
>>
>> Hi,
>>> The easier way is to use the api/events endpoint and query for events
>>> uids you want to delete. Once you have them, you can send http delete
>>> method via curl or nodejs or python or php,etc and loop through each to
>>> delete them via api/events/uid.
>>>
>>> Alex
>>>
>>> On Wednesday, January 24, 2018, Petar Jovanovic 
>>> wrote:
>>>
 Hi,

 We want to quickly (in groups) delete events related to a specific
 program and/or to a specific org unit (or list of org units). In DHIS2, we
 only managed to go one by one in the event capture app.

 Can anyone recommend us any other convenient and faster way to do this,
 or if you are aware of an app that may help us?

 We have also checked if it is possible to do it through the database,
 but we did not find easy to locate the table where the event data are
 stored and it is safe to delete them without loosing references to other
 objects.


 Thank you!


 Best,
 Petar

 --
 _
 Petar Jovanovic
 Department of Service and Information System Engineering (ESSI)
 Universitat Politècnica de Catalunya, BarcelonaTech
 Barcelona, Spain
 _ http://www.essi.upc.edu/~petar/ ___


 ___
 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

>>>
>>>
>>> --
>>> Alex Tumwesigye
>>>
>>> Technical Advisor - DHIS2 (Consultant),
>>> Ministry of Health/AFENET  | HISP Uganda
>>> Kampala
>>> Uganda
>>> +256 774149 775, + 256 759 800161
>>> Skype ID: talexie
>>>
>>> IT Consultant (Servers, Networks and Security, Health Information
>>> Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant
>>>
>>>
>>> "I don't want to be anything other than what I have been - one tree hill
>>> "
>>>
>>>
>> ___
>> 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 <+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
>
>


-- 
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


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 as a jIRA
issue?

Regards
Calle

On 25 January 2018 at 10:30, Jan Henrik Øverland  wrote:

> 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 Hedberg 
> wrote:
>
>> Hi,
>>
>> I've just installed a standard app for testing - installation seemingly
>> worked OK, but the app itself does not work. The problem is that the usual
>> popup menu (the three dots) on the app only opens the app - there is not
>> "remove" option.
>>
>> Is there another way to remove such user-installed apps, in the UI or
>> using the web API?
>>
>> The user and developer manuals don't indicate anything (they are very
>> scanty on the app topic in general).
>>
>> 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
>>
>>
>
>
> --
> Jan Henrik Øverland
> Software developer, DHIS 2
> University of Oslo
> http://www.dhis2.org 
>



-- 

***

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


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 Hedberg  wrote:

> Hi,
>
> I've just installed a standard app for testing - installation seemingly
> worked OK, but the app itself does not work. The problem is that the usual
> popup menu (the three dots) on the app only opens the app - there is not
> "remove" option.
>
> Is there another way to remove such user-installed apps, in the UI or
> using the web API?
>
> The user and developer manuals don't indicate anything (they are very
> scanty on the app topic in general).
>
> Regards
> Calle
>
> --
>
> ***
>
> 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
>
>


-- 
Jan Henrik Øverland
Software developer, DHIS 2
University of Oslo
http://www.dhis2.org 
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp