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 dataValueAu

[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", "importCount

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

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 wrote: > >> Hi Morten >> >> Thanks for the information. >> >> Regar

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

2015-07-08 Thread Alan Hill
h a known UID 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 wrote: > >> Only that we are not creating

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

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 wrote: > Hi there > > We have a number of sqlViews in our DHIS2 instance with foreign characters > e.g. > > Programmes avec les

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

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

2015-07-08 Thread Alan Hill
ot change > it right 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 H

Re: [Dhis2-devs] TrackedEntityInstance update

2015-06-20 Thread Alan Hill
2015 at 8:04 AM, Alan Hill 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 >

Re: [Dhis2-devs] TrackedEntityInstance update

2015-06-19 Thread Alan Hill
e fixed a nullpointer > vulnerability in that method now in trunk. > > Lars > > > On Fri, Jun 19, 2015 at 8:36 AM, Alan Hill wrote: > >> OK...will do. >> >> Thanks >> >> Alan >> >> On Thu, Jun 18, 2015 at 11:34 PM, Morten Olav Hansen >>

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

2015-06-19 Thread Alan Hill
eference to it. > > -- > Morten > > On Fri, Jun 19, 2015 at 1:35 PM, Alan Hill wrote: > >> Hi Mortenwhen you say 'removing the option set completely', do you >> mean removing from the JSON or deleting from the database? >> >> Thanks >

Re: [Dhis2-devs] TrackedEntityInstance update

2015-06-18 Thread Alan Hill
Fri, Jun 19, 2015 at 12:24 PM, Morten Olav Hansen > 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 >>

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

2015-06-18 Thread Alan Hill
o it then, it should have worked with >> mergeStrategy=REPLACE >> >> -- >> Morten >> >> On Fri, Jun 19, 2015 at 11:26 AM, Alan Hill wrote: >> >>> Hi Morten >>> >>> Many thanks for the response. >>> >>> Yes, remove

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

2015-06-18 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: which always returns the TrackedEntityAttributes that were created through the UI (no

Re: [Dhis2-devs] TrackedEntityInstance update

2015-06-18 Thread Alan Hill
} ] The value I'm setting is "3" which there is definitely an option for. Cheers Alan On Thu, Jun 18, 2015 at 9:44 PM, Morten Olav Hansen wrote: > I was looking at the stack trace, and the code it points to, is checking > the option.code against the value you are s

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 wrote: > Hi Alan > > Seems like you have an invalid optionset, i..e an optionset without code? > > -- > Morten > > On Fri, Jun 19, 20

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

2015-06-18 Thread Alan Hill
;}, "access":{"update":true, "externalize":false, "write":true, "delete":true, "read":true, "manage":true}, "user":{"id":"M4XhsWJlIhk", "name":"admin admin", "created":&q

[Dhis2-devs] TrackedEntityInstance update

2015-06-18 Thread Alan Hill
Hi there *Version 2.20-SNAPSHOT, Build #19453* Trying to update a TrackedEntityInstance but this is failing for attributes that have an optionSet assigned. I've stripped my JSON update down to a single attribute. *API call:* PUT http://localhost:8000/api/trackedEntityInstances/gGCuCUO5Iu0 *

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

2015-06-18 Thread Alan Hill
, rom...@tohouri.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:

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

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

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 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 wrote: > >> Hi there >> >> I have a TrackedEntityAttr

Re: [Dhis2-devs] DHIS2 App i18n

2015-06-17 Thread Alan Hill
ternal apps in the menu? > > -- > Morten > > On Tue, Jun 16, 2015 at 10:12 PM, Alan Hill wrote: > >> I have been trying to internationalize the name/description fields in our >> DHIS2 app manifest.webapp file. >> >> I created a "locales&quo

[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

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

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= Get the orgUnit from the first enrollment /api/trackedEntityInstances?ou=&program= However,

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 wrote: > >> Hi Morten >> >> I think I tried this at some stage but will give it another go. >> >> Many thanks for your reply. >> >> Alan >> >&g

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

2015-05-22 Thread Alan Hill
t; /api/programStages//programStageDataElements/ >>>> >>>> but get this error: >>>> >>>> "Collection programStageDataElements does not have an item with ID: xxx" >>>> >>>> From the example below it would be: >>>>

[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/ with programStageDataElements set to a list of dataElement ids but without joy e.g. { "id": "Ge9BWs3Bin2", "created": "2015-05-12T21:54:21.303+", "name":

[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/ 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. __