Re: [Dhis2-devs] Bulk Deletion of Data

2016-10-27 Thread Alan Hill
Hi Morten We have been testing the deletion with version 2.25 and have had success with programs / program stages. For data sets we are now able to delete dataValues but cannot delete the dataElements for the following reason: * Deleting the dataValues creates dataValueAudits * These

[Dhis2-devs] [Bug 1511066] [NEW] Successful event update returns zero updated count

2015-10-28 Thread Alan Hill
Public bug reported: PUT /api/events/ returns the following JSON response: { "httpStatus": "OK", "httpStatusCode": 200, "status": "OK", "message": "Import was successful.", "response": { "responseType": "ImportSummary", "status": "SUCCESS",

[Dhis2-devs] Program Org Unit Association and creating TrackedEntityInstances Events

2015-07-16 Thread Alan Hill
Hi there Creating an event with an org unit that is not assigned to a program gives us the following error: Program is not assigned to this organisation unit However, creating a TrackedEntityInstance / Enrollment with the same org unit imports OK and without errors. Is this desired

Re: [Dhis2-devs] Internationalization of Web API response info / conflicts?

2015-07-14 Thread Alan Hill
In which endpoints do you see this? I have fixed it in the data element operand endpoint, but there could be others also -- Morten On Thu, Jul 9, 2015 at 12:23 AM, Alan Hill ah...@2paths.com wrote: Hi Morten Thanks for the information. Regarding the filtering bug, do you know which

Re: [Dhis2-devs] Internationalization of Web API response info / conflicts?

2015-07-08 Thread Alan Hill
now. I think you should be ok if you follow this simple rule 1) if its metadata use paging=true/false 2) if its data use skipPaging=true/false Thanks for reporting the issues. -- Morten On Fri, Jun 19, 2015 at 3:56 AM, Alan Hill ah...@2paths.com wrote: Hi I have a couple of additions

Re: [Dhis2-devs] Filtering sqlViews by name with foreign characters

2015-07-08 Thread Alan Hill
Only that we are not creating the view with a known UID. On Wed, Jul 8, 2015 at 12:38 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Any reason you simply do not use the UID of the sql view instead? On Wed, Jul 8, 2015, 21:18 Alan Hill ah...@2paths.com wrote: Fixed: needed to set

Re: [Dhis2-devs] Filtering sqlViews by name with foreign characters

2015-07-08 Thread Alan Hill
by transmitting this through the API , and even if you changed the name, the UID would never change. Would seem to be simpler and more reliable. Regards, Jason On Wed, Jul 8, 2015, 21:45 Alan Hill ah...@2paths.com wrote: Only that we are not creating the view with a known UID. On Wed, Jul

[Dhis2-devs] Filtering sqlViews by name with foreign characters

2015-07-08 Thread Alan Hill
Hi there We have a number of sqlViews in our DHIS2 instance with foreign characters e.g. Programmes avec les données We are having trouble retrieving these by name through the API e.g. /api/sqlViews.json?filter=name:eq:Programmes%20avec%20les%20données However, the following does

Re: [Dhis2-devs] Filtering sqlViews by name with foreign characters

2015-07-08 Thread Alan Hill
Fixed: needed to set URIEncoding=UTF-8 in tomcat's server.xml file. On Wed, Jul 8, 2015 at 11:49 AM, Alan Hill ah...@2paths.com wrote: Hi there We have a number of sqlViews in our DHIS2 instance with foreign characters e.g. Programmes avec les données We are having trouble

Re: [Dhis2-devs] TrackedEntityInstance update

2015-06-20 Thread Alan Hill
, Alan Hill ah...@2paths.com wrote: Thanks Morten I have completely wiped my DB and started from scratch with the latest build and all seems to OK now. Many thanks for your support. Alan On Fri, Jun 19, 2015 at 3:08 AM, Lars Helge Øverland larshe...@gmail.com wrote: Hi Alan, while

[Dhis2-devs] GET /api/trackedEntityAttributes filter=code:eq:code value attributes that have empty code are also returned

2015-06-19 Thread Alan Hill
Me again... I'm querying TrackedEntityAttributes. Some have been created through web API and have a code value and some have been created through the UI and have an empty code I'm using: ?filter=code:eq:code value which always returns the TrackedEntityAttributes that were created through

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-19 Thread Alan Hill
On Fri, Jun 19, 2015 at 11:26 AM, Alan Hill ah...@2paths.com wrote: Hi Morten Many thanks for the response. Yes, remove the OptionSet assignment from the TrackedEntityAttribute. I have tried as suggested with the following JSON and it does not remove the assignment: { id:z4fdyQtgja3, created

Re: [Dhis2-devs] TrackedEntityInstance update

2015-06-19 Thread Alan Hill
Hansen morte...@gmail.com wrote: Hm, ok. I will need to look more into this then, from the stack trace is seems related to invalid code. I will try it out here locally and see if I an reproduce. -- Morten On Fri, Jun 19, 2015 at 11:59 AM, Alan Hill ah...@2paths.com wrote: Hi again

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-19 Thread Alan Hill
a reference to it. -- Morten On Fri, Jun 19, 2015 at 1:35 PM, Alan Hill ah...@2paths.com wrote: Hi Mortenwhen you say 'removing the option set completely', do you mean removing from the JSON or deleting from the database? Thanks A On Thu, Jun 18, 2015 at 11:26 PM, Morten Olav

Re: [Dhis2-devs] TrackedEntityInstance update

2015-06-19 Thread Alan Hill
fixed a nullpointer vulnerability in that method now in trunk. Lars On Fri, Jun 19, 2015 at 8:36 AM, Alan Hill ah...@2paths.com wrote: OK...will do. Thanks Alan On Thu, Jun 18, 2015 at 11:34 PM, Morten Olav Hansen morte...@gmail.com wrote: Hi I was not able to reproduce

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-18 Thread Alan Hill
. Alan On Wed, Jun 17, 2015 at 6:39 PM, Morten Olav Hansen morte...@gmail.com wrote: Hi Please try again with the latest version of 2.19 or trunk. -- Morten On Thu, Jun 18, 2015 at 1:22 AM, Alan Hill ah...@2paths.com wrote: Hi there I have a TrackedEntityAttribute created through

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-18 Thread Alan Hill
? try and set it over as optionSet: null, and set merge strategy to REPLACE -- Morten On Thu, Jun 18, 2015 at 10:17 PM, Alan Hill ah...@2paths.com wrote: Hi Morten I have tried this with trunk (build # 19453) and assigning the optionSet now seems to function correctly. However, removing

Re: [Dhis2-devs] TrackedEntityInstance update

2015-06-18 Thread Alan Hill
, and the code it points to, is checking the option.code against the value you are sending in.. but it seems maybe some of your options don't have code? which is required -- Morten On Fri, Jun 19, 2015 at 11:28 AM, Alan Hill ah...@2paths.com wrote: Hi again Morten...sorry, can you clarify, where do you

Re: [Dhis2-devs] TrackedEntityInstance update

2015-06-18 Thread Alan Hill
Hi again Morten...sorry, can you clarify, where do you see that? Thanks Alan On Thu, Jun 18, 2015 at 6:56 PM, Morten Olav Hansen morte...@gmail.com wrote: Hi Alan Seems like you have an invalid optionset, i..e an optionset without code? -- Morten On Fri, Jun 19, 2015 at 7:47 AM, Alan

Re: [Dhis2-devs] Internationalization of Web API response info / conflicts?

2015-06-18 Thread Alan Hill
Hi I have a couple of additions: - Filtering results does not always retrieve the record you're after unless you specify paging=false (or it's on the first page) - Some entties use paging=false, others use skipPaging=true Thanks Alan On Thu, Jun 18, 2015 at 1:07 PM, Lorill Crees

Re: [Dhis2-devs] TrackedEntityAttribute - uniqueness of name field

2015-06-18 Thread Alan Hill
...@tohouri.com rtoho...@gmail.com wrote: Hi Alan, maybe a problem with the shortnames? I notice that the beginning of your DE names are the same. Try to specify different shortness or modify the beginning of the DE names. Thx, Romain On Jun 18, 2015, at 21:48, Alan Hill ah...@2paths.com

[Dhis2-devs] TrackedEntityAttribute - uniqueness of name field

2015-06-18 Thread Alan Hill
Hi there I have two TrackedEntityAttributes with names as follows: HH owns a treated mosquito net HH owns a treated mosquito net/IRS previous 12m Which I am trying to create through the web API. However, only the first can be created and the second gets rejected due to an uniqueness

[Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-17 Thread Alan Hill
Hi there I have a TrackedEntityAttribute created through the web api and want to perform an update to both add and remove an optionSet assignment. I have attempted to do this using a PUT, supplying the JSON previously retrieved via a GET and adding/remove the option set and setting the valueType

Re: [Dhis2-devs] DHIS2 App i18n

2015-06-17 Thread Alan Hill
apps in the menu? -- Morten On Tue, Jun 16, 2015 at 10:12 PM, Alan Hill ah...@2paths.com wrote: I have been trying to internationalize the name/description fields in our DHIS2 app manifest.webapp file. I created a locales section with blocks for our different languages as per: https

[Dhis2-devs] DHIS2 App i18n

2015-06-16 Thread Alan Hill
I have been trying to internationalize the name/description fields in our DHIS2 app manifest.webapp file. I created a locales section with blocks for our different languages as per: https://developer.mozilla.org/en-US/Apps/Build/Localization/Getting_started_with_app_localization but this does

Re: [Dhis2-devs] How to determine if a dataset has any data values in it

2015-06-09 Thread Alan Hill
Hi Lars I wonder if you also have any suggestions for checking if data has been imported for Programs and ProgramStages. For Programs, I have been doing the following: /api/enrollments?program=programId Get the orgUnit from the first enrollment

Re: [Dhis2-devs] API - Assign DataElements to ProgramStage

2015-06-01 Thread Alan Hill
need help. regards, Lars On Fri, May 22, 2015 at 10:18 PM, Alan Hill ah...@2paths.com wrote: Hi Morten I think I tried this at some stage but will give it another go. Many thanks for your reply. Alan On Fri, May 22, 2015 at 4:00 AM, Morten Olav Hansen morte...@gmail.com wrote

Re: [Dhis2-devs] API - Assign DataElements to ProgramStage

2015-05-22 Thread Alan Hill
/programStageDataElements/auYAWubqi2C Any thoughts on how we can achieve this? Thanks, Lorill On Tue, May 12, 2015 at 6:56 PM, Alan Hill ah...@2paths.com wrote: Is there any way to assign DataElements to ProgramStages through the API as per the UI? I've tried PUTing to /api/programStage/ID

[Dhis2-devs] Remove OptionSet from DataElement

2015-05-12 Thread Alan Hill
Am trying to unassign an optionSet from a dataElement via the api. Have tried: PUT /api/dataElements/ID In the JSON, have tried removing the optionSet, setting it to {}, setting the optionSetValue to false and many other combinations but nothing seems to work. Any help greatly appreciated.

[Dhis2-devs] API - Assign DataElements to ProgramStage

2015-05-12 Thread Alan Hill
Is there any way to assign DataElements to ProgramStages through the API as per the UI? I've tried PUTing to /api/programStage/ID with programStageDataElements set to a list of dataElement ids but without joy e.g. { id: Ge9BWs3Bin2, created: 2015-05-12T21:54:21.303+, name: NAME,