Re: [Dhis2-users] Sharing settings for data set reset when new org units assigned

2016-12-15 Thread Knut Staring
If that's correct (have not tested), it is a pretty critical bug

On Dec 16, 2016 05:34, "Shurajit Dutta"  wrote:

> Hi everyone,
>
> I notice that if I set up sharing settings for a data set, but then later
> on assign this data set to new org units, all of the sharing settings for
> the user groups I have selected for that data set are reset. I have tried
> this on both 2.24 locally as well as 2.25 on play.dhis2.org/demo.
>
> Is this by design?
>
> Nick
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] API 2.25: Return Full Property Set

2016-12-15 Thread Uwe Wahser
Thanks a lot, Jason, I will try that. I tried 'fields=' expecting this would be 
the same as 'fields=:all' , which is obviously wrong. 

That's a very useful information - do you mind including it into the manual?

Regards, Uwe

---

> Jason Pickering  hat am 16. Dezember 2016 um 
> 10:13 geschrieben:
> 
> 
> Hi Uwe
> Have a look here
> 
> https://ci.dhis2.org/docs/master/en/developer/html/webapi_metadata_field_filter.html
> 
> and specifically the use of  the ?fields=:all paramater.
> 
> Regards,
> Jason
> 
> 
> On Fri, Dec 16, 2016 at 7:58 AM, Uwe Wahser  wrote:
> 
> > Dear all,
> >
> > I am having a bit of an issue when querying metadata from the api in json
> > format and further processing them in kettle (Pentaho DI): DHIS2 only
> > returns those properties in the json-package that are not NULL. However,
> > the json converter in kettle needs the full property-set in order to create
> > a tabular structure from the data (don't know the reason for that).
> >
> > Is there a way to force the api to return the full property set, e.g. a
> > secret flag? I'd actually expect to get the full list - even if the
> > property is NULL -, at least when I specify a list of properties in the
> > field-filter ...
> >
> > Of course, I could also ask the kettle-guys to be a bit more flexible, but
> > normally they are not as agile as the DHIS2-DEVs ;-)
> >
> > Best regards,
> >
> > Uwe
> >
> > ___
> > Mailing list: https://launchpad.net/~dhis2-users
> > Post to : dhis2-users@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~dhis2-users
> > More help   : https://help.launchpad.net/ListHelp
> >
> 
> 
> 
> -- 
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049

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


Re: [Dhis2-users] API 2.25: Return Full Property Set

2016-12-15 Thread Jason Pickering
Hi Uwe,
I think the manual is correct, as it specifies how the paramater should be
called.

In general, we discourage actually using that "all" paramater, because
things can change from version to version (as you have noticed). Its better
to make explicit calls for the fields which you require for each object,
using something like /api/26/indicators?fields=id,name

where each required field is specified explicitly. This should also
decrease the payloads which the ETL process would need to work with. You
might want to have a look at that approach.

I would be happy to update the manual, but not really sure what is missing
in this case?

Regards,
Jason




On Fri, Dec 16, 2016 at 8:24 AM, Uwe Wahser  wrote:

> Thanks a lot, Jason, I will try that. I tried 'fields=' expecting this
> would be the same as 'fields=:all' , which is obviously wrong.
>
> That's a very useful information - do you mind including it into the
> manual?
>
> Regards, Uwe
>
> ---
>
> > Jason Pickering  hat am 16. Dezember 2016
> um 10:13 geschrieben:
> >
> >
> > Hi Uwe
> > Have a look here
> >
> > https://ci.dhis2.org/docs/master/en/developer/html/
> webapi_metadata_field_filter.html
> >
> > and specifically the use of  the ?fields=:all paramater.
> >
> > Regards,
> > Jason
> >
> >
> > On Fri, Dec 16, 2016 at 7:58 AM, Uwe Wahser  wrote:
> >
> > > Dear all,
> > >
> > > I am having a bit of an issue when querying metadata from the api in
> json
> > > format and further processing them in kettle (Pentaho DI): DHIS2 only
> > > returns those properties in the json-package that are not NULL.
> However,
> > > the json converter in kettle needs the full property-set in order to
> create
> > > a tabular structure from the data (don't know the reason for that).
> > >
> > > Is there a way to force the api to return the full property set, e.g. a
> > > secret flag? I'd actually expect to get the full list - even if the
> > > property is NULL -, at least when I specify a list of properties in the
> > > field-filter ...
> > >
> > > Of course, I could also ask the kettle-guys to be a bit more flexible,
> but
> > > normally they are not as agile as the DHIS2-DEVs ;-)
> > >
> > > Best regards,
> > >
> > > Uwe
> > >
> > > ___
> > > Mailing list: https://launchpad.net/~dhis2-users
> > > Post to : dhis2-users@lists.launchpad.net
> > > Unsubscribe : https://launchpad.net/~dhis2-users
> > > More help   : https://help.launchpad.net/ListHelp
> > >
> >
> >
> >
> > --
> > Jason P. Pickering
> > email: jason.p.picker...@gmail.com
> > tel:+46764147049
>



-- 
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+46764147049
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] API 2.25: Return Full Property Set

2016-12-15 Thread Uwe Wahser
Dear all,

I am having a bit of an issue when querying metadata from the api in json 
format and further processing them in kettle (Pentaho DI): DHIS2 only returns 
those properties in the json-package that are not NULL. However, the json 
converter in kettle needs the full property-set in order to create a tabular 
structure from the data (don't know the reason for that).

Is there a way to force the api to return the full property set, e.g. a secret 
flag? I'd actually expect to get the full list - even if the property is NULL 
-, at least when I specify a list of properties in the field-filter ...

Of course, I could also ask the kettle-guys to be a bit more flexible, but 
normally they are not as agile as the DHIS2-DEVs ;-)

Best regards,

Uwe

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


[Dhis2-users] Sharing settings for data set reset when new org units assigned

2016-12-15 Thread Shurajit Dutta
Hi everyone,

I notice that if I set up sharing settings for a data set, but then later
on assign this data set to new org units, all of the sharing settings for
the user groups I have selected for that data set are reset. I have tried
this on both 2.24 locally as well as 2.25 on play.dhis2.org/demo.

Is this by design?

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


Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-15 Thread Vladimer Shioshvili
Thanks for confirming.

On Thu, Dec 15, 2016 at 2:07 PM Bob Jolliffe  wrote:

> Hi Vlad
>
> No it doesn't currently work with adx files.
>
>
> On 15 December 2016 at 18:52, Vladimer Shioshvili 
> wrote:
>
> Hi Morten,
>
> It does not seem to work with adx message though. Is that right?
>
> Thanks,
> Vlad
>
> On Fri, Dec 9, 2016 at 4:05 AM Lars Helge Øverland  wrote:
>
> Okay thanks Victor, I can see it now, you are right, compressed files are
> supported ;)
>
> Lars
>
>
> On Fri, Dec 9, 2016 at 9:25 AM, Victor Garcia 
> wrote:
>
> You are right, Morten. It works with --data-binary instead of -d.
> Thanks!
>
> On 8 December 2016 at 03:28, Morten Olav Hansen  wrote:
>
> Hi
>
> Do you get any errors? it should be possible, it will take the first file
> in the zip file and use that (so it would be best to always only have one
> file)
>
> Could you also try with --data-binary instead of -d ?
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Dec 8, 2016 at 1:18 AM, Victor Garcia 
> wrote:
>
> Hi,
>
> about importing datavalues in zip format, I think it is possible since it
> was fixed in 2.21 (https://lists.launchpad.net/dhis2-devs/msg46144.html).
> I am able to import a zip file using Postman and using our own webapp both
> in 2.21 and 2.25, so it seems to be working fine.
>
> On the other hand, I am not able to import a zip file using curl with the
> command:
>
> curl.exe -d @test.zip -H "Content-Type: application/json" -X POST "
> http://localhost/api/dataValueSets; -u user:password -v
>
> but I guess I am missing something...
>
> Regards!
>
> On 6 December 2016 at 13:39, Vladimer Shioshvili 
> wrote:
>
> Thanks Lars. It was a human error issue, input i was testing with has
> duplicates and i was looking at ignored, and not noticing the delete count.
> Thanks!
>
> What would be the level of effort and ability to back port to 2.24 of
> supporting compressed files in API?
>
> On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland  wrote:
>
> Hi Vlad,
>
>
>
> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
> vshioshv...@gmail.com> wrote:
>
> 1) just to confirm, web api only accets uncompressed file, right? and it's
> the import/export app that is capable of handling zip file?
>
>
> Yes that is correct per now. We could consider adding that support to the
> API as well.
>
>
>
> 2) does DELETE import strategy work for dataValueSets? I have not been
> able to get it to work.
>
>
> It seems to be working - try running the two curl commands below, which
> indicates that data gets added and then removed.
>
>
> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
> "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
> curl "
> https://play.dhis2.org/demo/api/24/dataValueSets?importStrategy=DELETE;
> -i -X POST -H "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
>
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
> I am running on 2.24, if it makes a difference.
>
> Thanks,
> Vlad
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@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 
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@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 
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users

Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-15 Thread Vladimer Shioshvili
Hi Morten,

It does not seem to work with adx message though. Is that right?

Thanks,
Vlad

On Fri, Dec 9, 2016 at 4:05 AM Lars Helge Øverland  wrote:

> Okay thanks Victor, I can see it now, you are right, compressed files are
> supported ;)
>
> Lars
>
>
> On Fri, Dec 9, 2016 at 9:25 AM, Victor Garcia 
> wrote:
>
> You are right, Morten. It works with --data-binary instead of -d.
> Thanks!
>
> On 8 December 2016 at 03:28, Morten Olav Hansen  wrote:
>
> Hi
>
> Do you get any errors? it should be possible, it will take the first file
> in the zip file and use that (so it would be best to always only have one
> file)
>
> Could you also try with --data-binary instead of -d ?
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Dec 8, 2016 at 1:18 AM, Victor Garcia 
> wrote:
>
> Hi,
>
> about importing datavalues in zip format, I think it is possible since it
> was fixed in 2.21 (https://lists.launchpad.net/dhis2-devs/msg46144.html).
> I am able to import a zip file using Postman and using our own webapp both
> in 2.21 and 2.25, so it seems to be working fine.
>
> On the other hand, I am not able to import a zip file using curl with the
> command:
>
> curl.exe -d @test.zip -H "Content-Type: application/json" -X POST "
> http://localhost/api/dataValueSets; -u user:password -v
>
> but I guess I am missing something...
>
> Regards!
>
> On 6 December 2016 at 13:39, Vladimer Shioshvili 
> wrote:
>
> Thanks Lars. It was a human error issue, input i was testing with has
> duplicates and i was looking at ignored, and not noticing the delete count.
> Thanks!
>
> What would be the level of effort and ability to back port to 2.24 of
> supporting compressed files in API?
>
> On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland  wrote:
>
> Hi Vlad,
>
>
>
> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
> vshioshv...@gmail.com> wrote:
>
> 1) just to confirm, web api only accets uncompressed file, right? and it's
> the import/export app that is capable of handling zip file?
>
>
> Yes that is correct per now. We could consider adding that support to the
> API as well.
>
>
>
> 2) does DELETE import strategy work for dataValueSets? I have not been
> able to get it to work.
>
>
> It seems to be working - try running the two curl commands below, which
> indicates that data gets added and then removed.
>
>
> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
> "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
> curl "
> https://play.dhis2.org/demo/api/24/dataValueSets?importStrategy=DELETE;
> -i -X POST -H "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
>
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
> I am running on 2.24, if it makes a difference.
>
> Thanks,
> Vlad
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@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 
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@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 
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : 

Re: [Dhis2-users] [Dhis2-devs] 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
>> 
>> 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 <
>>> l...@dhis2.org> 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 <
 lcr...@2paths.com> 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.
>