← Back to team overview

dhis2-devs team mailing list archive

Re: API interaction with reportTables bug?

 

Attached is also the PUT file and the file coming back after update from GET.

Thanks!
Best,
Trøyel


From: Trøyel Nerbø
Sent: mandag 23. januar 2017 11.04
To: 'dhis2-devs@xxxxxxxxxxxxxxxxxxx' <dhis2-devs@xxxxxxxxxxxxxxxxxxx>
Subject: API interaction with reportTables bug?

Hey devs,
I have had some issues where suddenly saved favorites go "corrupt" in terms that they somehow lose their relative and fixed periods (and therefore will not load as pe is in dimension but no period selected). I tried through the API to identify the issue and to fix some of these tables. I found a strange issue and tested on play.dhis2.org where it show that:

If I simply GET a "reportTable" and then PUT the whole .json back with only change of the name variable. E.g. from   "name": "ANC: ANC visits 1-3 last 12 months", to "name": "ANC: ANC visits 1-3 last 12 months 2" a lot of un-intended changes happen.

Comparing the before and after .json below. I don't know if I tried doing something rudimentary wrong from an REST viewpoint? If so, perhaps I shouldn't be allowed or is it plainly a bug?

Thanks!

LEFT side is .json before adding "2" to name and immediately after PUT on RIGHT.

[cid:image001.png@01D27569.026205C0]

(...)

[cid:image002.png@01D27569.026205C0]

(...)

[cid:image003.png@01D27569.026205C0]

Thanks!

Best Regards
Halvar Trøyel Nerbø
Reporting Advisor
+47 992 39 817
Skype: nrc_troyel
www.nrc.no<http://www.nrc.no/>
[nrclogo]<http://www.nrc.no/>

PNG image

PNG image

PNG image

JPEG image

Attachment: the PUT file.json
Description: the PUT file.json

Attachment: GET after PUT.json
Description: GET after PUT.json


Follow ups