Re: [Dhis2-devs] Setting owner of object with API

2017-02-08 Thread Mark Polak
Hey Olav,

PATCH doesn't really work for object references. You can try to download
the whole object and PUT it back ;)

So basically GET ->
https://play.dhis2.org/demo/api/dataSets/lyLU2wR22tC.json?fields=:owner

Change user id on the returned object.

Then PUT that payload back to ->
https://play.dhis2.org/demo/api/dataSets/lyLU2wR22tC.json

On Wed, Feb 8, 2017 at 10:01 AM, Olav Poppe  wrote:

> Hi devs,
> I’m trying to set the owner of an object using the API (using PATCH), but
> it fails.
>
> Example (agains /demo):
> curl -X PATCH -H «Content-Type: application/json" -u admin:district -d ‘{
> "user": { "id": "dXKBEMfyChY" } }' "https://play.dhis2.org/demo/
> api/dataSets/kS1CX1YBcl1/user" -v
>
> Result:
> {«httpStatus":"Internal Server Error","httpStatusCode":500,"
> status":"ERROR","message":"object references an unsaved transient
> instance - save the transient instance before flushing:
> org.hisp.dhis.user.User"}
>
> Is this a bug, or have I misunderstood how to do this?
>
> Regards
> Olav
>
> ___
> 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
>
>


-- 
Regards,


Mark Polak
Software developer, DHIS 2
University of Oslo
http://www.dhis2.org 
m...@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] [Dhis2-users] Visualizer issue

2017-02-08 Thread gerald thomas
Dear all,
I can't really tell what was the issue but after running maintenance &
analytics then change war file to the latest 2.25 war file the issue
was fixed. Everything is OK now. I actually didn't have time to look
at the 'browser console' again because i am afraid of the duration the
analytics will take.

I will keep you posted once those verification exercises are done.

On 2/8/17, Knut Staring  wrote:
> Hello all, what could be the issue with this message in the browser
> console?
>
> Line Number 1, Column 1:  ANALYTICSTABLE_UPDATE:1:1
> XML Parsing Error: syntax error
> Location:
> http://10.100.1.100:8080/api/system/tasks/ANALYTICSTABLE_UPDATE?lastId=StL6eohelA8
>
>
> On Tue, Feb 7, 2017 at 5:59 PM, gerald thomas 
> wrote:
>
>> Dear all,
>> I am trying to see if i could fix the error by running 'analytics' but
>> during my monitoring process using (shift + ctrl + j) i notice
>> something strange. Please find the attached file showing the error.
>>
>> On 2/7/17, gerald thomas  wrote:
>> > Dear All.
>> > I am using version 2.25 war file, build revision 3de90a5.
>> >
>> > On 2/7/17, gerald thomas  wrote:
>> >> Dear all,
>> >> On my local instance I am receiving an error. Please find the attached
>> >> print screen of the error.
>> >>
>> >
>> >
>> > --
>> > Regards,
>> >
>> > Gerald
>> >
>>
>>
>> --
>> Regards,
>>
>> Gerald
>>
>> ___
>> 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
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>


-- 
Regards,

Gerald

___
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] Visualizer issue

2017-02-08 Thread Knut Staring
Hello all, what could be the issue with this message in the browser console?

Line Number 1, Column 1:  ANALYTICSTABLE_UPDATE:1:1
XML Parsing Error: syntax error
Location:
http://10.100.1.100:8080/api/system/tasks/ANALYTICSTABLE_UPDATE?lastId=StL6eohelA8


On Tue, Feb 7, 2017 at 5:59 PM, gerald thomas  wrote:

> Dear all,
> I am trying to see if i could fix the error by running 'analytics' but
> during my monitoring process using (shift + ctrl + j) i notice
> something strange. Please find the attached file showing the error.
>
> On 2/7/17, gerald thomas  wrote:
> > Dear All.
> > I am using version 2.25 war file, build revision 3de90a5.
> >
> > On 2/7/17, gerald thomas  wrote:
> >> Dear all,
> >> On my local instance I am receiving an error. Please find the attached
> >> print screen of the error.
> >>
> >
> >
> > --
> > Regards,
> >
> > Gerald
> >
>
>
> --
> Regards,
>
> Gerald
>
> ___
> 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
>
>


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


Re: [Dhis2-devs] old dhis2 documentation

2017-02-08 Thread Jason Pickering
Hi Nicolas,
We currently do not have these readily available. However, we do have the
source of the documentation here

https://github.com/dhis2/dhis2-docs

You may be able to build the docs yourself  by looking for a specific tag
like

git log --grep=2.20
commit 6252ed8bbe4420297833572543f1708893061508
Author: Morten Olav Hansen 
Date:   Thu Jul 16 17:19:23 2015 +0700

tagged 2.20

This should represent 2.19 documentation (in theory).

Having said all of that, we have not done a great job about strictly
separating out functionality from the various versions in the manuals. We
are getting better at it, but I guess what I am saying is that just because
we tagged 2.20, does not mean that something from 2.21 will be in there. :-/

Maybe not what you are looking for, but hopefully this might help?

Regards,
Jason


On Wed, Feb 8, 2017 at 7:02 PM, Nicolas Germeau 
wrote:

> Hello,
>
> I'm looking for the documentation (developer guide, implementation
> guide...) regarding old dhis2 (2.19,2.20...). Does anyone know where to
> find those online ?
>
> Thanks,
> Nicolas Germeau
>
>
>
> [image: BLUESQUARE NEW FINAL VECT-01.png]
>
> *Nicolas Germeau*
>
> *Software developer*
>
> m: +32487129820 <+32%20487%2012%2098%2020>
>
> www.bluesquarehub.com
>
>
> ___
> 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


[Dhis2-devs] old dhis2 documentation

2017-02-08 Thread Nicolas Germeau
Hello,

I'm looking for the documentation (developer guide, implementation
guide...) regarding old dhis2 (2.19,2.20...). Does anyone know where to
find those online ?

Thanks,
Nicolas Germeau



[image: BLUESQUARE NEW FINAL VECT-01.png]

*Nicolas Germeau*

*Software developer*

m: +32487129820 <+32%20487%2012%2098%2020>

www.bluesquarehub.com
___
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] Ideas for a needed backend process

2017-02-08 Thread Marc Garnica
Hi devs,

We are trying to synchronize the data between Tracker Capture and Event
capture apps. We know that this might not be the expected use of these
apps, but for our requirements (visiblity, privacity, modularity of the
system) we are seriously considering having a process that extracts the
data from the Tracker side and post it as events. Then the tracker app will
be used for example by the end users, tracking their patients, scheduling
stages etc. But the data at event will be open to external but linked users
to see and analyse it.

We've been thinking in several ways of implementing it and before anything
we wonder if there's any work already been done in a similar topic.

- One of our first options was to user program indicators in the tracker
capture. But then we loose the patient level granularity and it means that
we will need to types of PI (one for event programs and one for tracker
programs) and then use both in order to analyze the individual data.

- The technical option is to create a sql script able to transfer the data
from tracker to event accessing directly to the database. In this case,
it's difficult to identify which tracker data is already transferred and
which not and surely we will encounter some other problems to create events
directly in the database. This script can be configured to be executed
daily in the server.

- Another option (preferable?)  is to create an app (normal app or
dashboard app) with a little bit of information (Number of events, number
of tracker entities) and a simple button to start the transfer of the
tracker data already not been transferred to event and the update of the
event not up to date.


We don't know if there are some less complex approaches to do this. Thank
you very much for the help!

Regards,

Marc
___
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] Setting owner of object with API

2017-02-08 Thread Olav Poppe
Hi devs, 
I’m trying to set the owner of an object using the API (using PATCH), but it 
fails.

Example (agains /demo):
curl -X PATCH -H «Content-Type: application/json" -u admin:district -d ‘{ 
"user": { "id": "dXKBEMfyChY" } }' 
"https://play.dhis2.org/demo/api/dataSets/kS1CX1YBcl1/user; -v

Result: 
{«httpStatus":"Internal Server 
Error","httpStatusCode":500,"status":"ERROR","message":"object references an 
unsaved transient instance - save the transient instance before flushing: 
org.hisp.dhis.user.User"}

Is this a bug, or have I misunderstood how to do this?

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