Re: [Dhis2-devs] Using SMS Commands for data capture

2016-09-01 Thread Zubair Asghar Raja

Hi Jasper,

OrgUnit code is unique identifier for organisation unit so in that sense 
its same as ID.
For period type there is no prefix because the date mentioned in SMS 
text is used to create PeriodType. If Date is not mentioned in SMS then 
it is retrieved from DataSet.


I will test and share sample SMS command by tomorrow.





On 01. sep. 2016 16:55, Jasper Timm wrote:

Thanks very much for the response Zubair, that's quite helpful.

So when specifying the orgUnit in the command you need to precede it 
by 'org '? What exactly is meant by , is it simply the id 
of the orgUnit? Is there a similar prefix required when specifying period?


Maybe you could give an example of an SMS Command submission 
specifying both orgUnit and period?


Thanks,

- Jasper

On Tue, Aug 30, 2016 at 9:01 PM, Zubair Asghar Raja > wrote:


Hi Jasper,

Sorry for the late response.

In SMS orgUnit can be specified like this "org " If
no orgUnit is specified in SMS then first user is retrieved from
phoneNumber and then orgUnit from that user.
As far as PeriodType is concerned it should be specified in this
format "ddMM" for example 3108, but in case its not specified then
PeriodType will be retrieved from DataSet attached to SMSCommand.






On 30. aug. 2016 20:17, Jasper Timm wrote:

Still hoping for a response on this regarding the more specific
questions regarding identifying OrgUnit by phone and how to
specify OrgUnit/Period.

Zubair - are you aware of how that works? Or any other DHIS2 dev?

Thanks,

- Jasper

On Wed, Aug 24, 2016 at 1:38 PM, Jasper Timm
> wrote:

Hi Zubair,

Thanks for the quick response but I don't think it answered
the questions I asked regarding how to specify the OrgUnit
and Period at all.

Also, in the case where no OrgUnit is specified in the SMS,
I'm assuming given there is a 'User belongs to more than one
OrgUnit' message that DHIS2 attempts to guess the user by the
phone number the SMS was received from and uses the OrgUnit
the user is assigned to?

And for the multiple messages then - I assume you need to
split the submission up into multiple SMSs with the same
'header' (command name, orgunit, period?) and separate lists
of the key,value pairs for the data elements?

As in:

MSG1 = "report   de1,1 de2,0 de3,4"
MSG2 = "report   de4,2 de5,2" e.t.c.

Which makes it a bit tricky when it comes to considering the
submission 'complete' I suppose. I guess then you'd have to
allow partial submissions to complete the form.

Thanks,

- Jasper

On Wed, Aug 24, 2016 at 1:04 PM, Zubair Asghar Raja
> wrote:

Hi Jasper,

please find the answers in line.




On 24. aug. 2016 13:58, Jasper Timm wrote:

Hi there,

We're considering using the SMS Commands functionality
of DHIS2 to receive data from the data capture Android
App when there is no internet connectivity.

I'm working from the documentation here:

http://dhis2.github.io/dhis2-docs/master/en/user/html/mobile_sms_command.html



Unfortunately it still leaves a few questions:

- How do you specify the OrgUnit and Period? Does the
discussion from this thread still apply?
(https://lists.launchpad.net/dhis2-users/msg06122.html)
If so - how does the parser differentiate when you
specify BOTH OrgUnit and Period? Where does one assign
codes to the OrgUnits?

*   SMSCommand is associated with a Parser and parser
is attached to certain Programs (with/without registration).

   1. Create SMSCommand
   2. Edit SMSCommand
   3. Set response messages to be sent to the
originating user.
   4. Set codes for data elements ( for example age,
height, orgunit etc )
*


- What happens when a message is longer than one SMS
message?

*  When text is longer then one SMS(160 characters) then
it will be sent as multiple SMSes each having <= 160
characters. *


It'd be great to see these answers in the documentation
itself.

Thanks,

- Jasper




___
Mailing list:https://launchpad.net/~dhis2-devs

Post to 

Re: [Dhis2-devs] Using SMS Commands for data capture

2016-09-01 Thread Jasper Timm
Thanks very much for the response Zubair, that's quite helpful.

So when specifying the orgUnit in the command you need to precede it by
'org '? What exactly is meant by , is it simply the id of the
orgUnit? Is there a similar prefix required when specifying period?

Maybe you could give an example of an SMS Command submission specifying
both orgUnit and period?

Thanks,

- Jasper

On Tue, Aug 30, 2016 at 9:01 PM, Zubair Asghar Raja 
wrote:

> Hi Jasper,
>
> Sorry for the late response.
>
> In SMS orgUnit can be specified like this "org " If no
> orgUnit is specified in SMS then first user is retrieved from phoneNumber
> and then orgUnit from that user.
> As far as PeriodType is concerned it should be specified in this format
> "ddMM" for example 3108, but in case its not specified then PeriodType will
> be retrieved from DataSet attached to SMSCommand.
>
>
>
>
>
>
> On 30. aug. 2016 20:17, Jasper Timm wrote:
>
> Still hoping for a response on this regarding the more specific questions
> regarding identifying OrgUnit by phone and how to specify OrgUnit/Period.
>
> Zubair - are you aware of how that works? Or any other DHIS2 dev?
>
> Thanks,
>
> - Jasper
>
> On Wed, Aug 24, 2016 at 1:38 PM, Jasper Timm  org> wrote:
>
>> Hi Zubair,
>>
>> Thanks for the quick response but I don't think it answered the questions
>> I asked regarding how to specify the OrgUnit and Period at all.
>>
>> Also, in the case where no OrgUnit is specified in the SMS, I'm assuming
>> given there is a 'User belongs to more than one OrgUnit' message that DHIS2
>> attempts to guess the user by the phone number the SMS was received from
>> and uses the OrgUnit the user is assigned to?
>>
>> And for the multiple messages then - I assume you need to split the
>> submission up into multiple SMSs with the same 'header' (command name,
>> orgunit, period?) and separate lists of the key,value pairs for the data
>> elements?
>>
>> As in:
>>
>> MSG1 = "report   de1,1 de2,0 de3,4"
>> MSG2 = "report   de4,2 de5,2" e.t.c.
>>
>> Which makes it a bit tricky when it comes to considering the submission
>> 'complete' I suppose. I guess then you'd have to allow partial submissions
>> to complete the form.
>>
>> Thanks,
>>
>> - Jasper
>>
>> On Wed, Aug 24, 2016 at 1:04 PM, Zubair Asghar Raja < 
>> zub...@dhis2.org> wrote:
>>
>>> Hi Jasper,
>>>
>>> please find the answers in line.
>>>
>>>
>>>
>>>
>>> On 24. aug. 2016 13:58, Jasper Timm wrote:
>>>
>>> Hi there,
>>>
>>> We're considering using the SMS Commands functionality of DHIS2 to
>>> receive data from the data capture Android App when there is no internet
>>> connectivity.
>>>
>>> I'm working from the documentation here: http://dhis2.github.io/d
>>> his2-docs/master/en/user/html/mobile_sms_command.html
>>>
>>> Unfortunately it still leaves a few questions:
>>>
>>> - How do you specify the OrgUnit and Period? Does the discussion from
>>> this thread still apply? (
>>> 
>>> https://lists.launchpad.net/dhis2-users/msg06122.html) If so - how does
>>> the parser differentiate when you specify BOTH OrgUnit and Period? Where
>>> does one assign codes to the OrgUnits?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *   SMSCommand is associated with a Parser and parser is attached to
>>> certain Programs (with/without registration).1. Create SMSCommand
>>>2. Edit SMSCommand3. Set response messages to be sent to the
>>> originating user.4. Set codes for data elements ( for example age,
>>> height, orgunit etc ) *
>>>
>>>
>>> - What happens when a message is longer than one SMS message?
>>>
>>> *  When text is longer then one SMS(160 characters) then it will be
>>> sent as multiple SMSes each having <= 160 characters. *
>>>
>>>
>>> It'd be great to see these answers in the documentation itself.
>>>
>>> Thanks,
>>>
>>> - Jasper
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> 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
>>>
>>> --
>>> Zubair Asghar
>>> Software Developer, DHIS2
>>> University of Oslowww.dhis2.org
>>>
>>> --
> Zubair Asghar
> Software Developer, DHIS2
> University of Oslowww.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


[Dhis2-devs] Accessing a file resource

2016-09-01 Thread WILLIAMS , Ryan O'Neil
Dear all,
 
How does one access a file resource (data element: value type = file) when the 
data set is locked eg. Dataset has been approved? 
When I click on the file from the data entry screen, I receive a dataset locked 
error message. When I unapproved the dataset, I can access/download it.
I am using DHIS2 version 2.22
 
Thanks,
Ryan


___
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] Upgrading DHIS2 from 2.21 to 2.24 and using new exporter/importer

2016-09-01 Thread Vanya Seth
Hi Morten

Thanks for the response.

We ran into another issue while trying to do a full export and import.

As per the previous conversations we took care of all data migrations (as
per the new constraints on the DB- pretty much caught by the Importer
during the validation phase itself).

Having done that we run into this issue:
The 'categoryoptiongroup' import is failing with constraint violation for
the UID. We checked the data and there is no repeating UID in the  database.

The error text is attached for your reference, as well the payload used for
the import.

Thanks for all the help in advance.

Regards
Vanya



On Thu, Sep 1, 2016 at 11:10 AM, Morten Olav Hansen 
wrote:

> Thanks Aamer, I'm looking at a similar bug right now.. seems some objects
> don't get their deps properly attached..
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Sep 1, 2016 at 12:36 PM, Aamer Mohammed 
> wrote:
>
>> Hi Morten,
>>
>> Please find the payload for below request
>> *curl -H "Content-Type: application/json" -X GET -u username:password
>> "http://localhost:/api/24/metadata?filter=created:gt:2016-07
>> " >
>> metadata.224.newapi.created.json*
>>
>> Import the payload in a fresh instance for import using
>>
>> *curl -H "Content-Type: application/json" -X POST --data
>> @metadata.224.newapi.created.json -u admin:district
>> “http://localhost:8080/api/24/metadata?atomicMode=NONE
>> ” >
>> output_created_besteffort.txt*
>>
>> If the same payload is run with atomicMode=ALL, I am getting 'Invalid
>> references' errors which is acceptable. But if it is run with
>> atomicMode=NONE, it is throwing the error for which the complete stack
>> trace is attached earlier. filename: '
>> *output_created_besteffort_trace.txt'*
>>
>> Let me know if the complete payload or any other details are required
>> from my end.
>>
>>
>> Thanks
>> Aamer.
>>
>>
>>
>> On Thu, Sep 1, 2016 at 8:52 AM, Morten Olav Hansen 
>> wrote:
>>
>>> Hi Aamer
>>>
>>> Could you please share the payload of the object where this happen?
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Fri, Aug 26, 2016 at 9:13 PM, Aamer Mohammed >> > wrote:
>>>
 Hi Morten,

 The Importer was run with atomicMode=ALL. Though the payload is huge,
 only few errors were shown in ImportSummary. As per errors in previous
 ImportSummary, I have done below.
 1) ensured the 'short name' field is unique for each of the 'data
 elements' and 'data element group' as well
 2) UID of admin, Super User, tracked entity was changed in payload to
 be same to where it is getting imported.
 I have manually resolved them and ran the importer again with
 atomicMode=ALL.

 I got exception as attached in trace file 'output_besteffort_trace.txt'
 Would these kind of issues be known only after the import has failed?
 and we need to resolve them one-by-one and as-and-when the importer throws
 them? Is there any note which has the details about the constraints being
 introduced in a new DHIS version?

 Alternatively, If we export a filtered set of metadata using '
 /api/24/metadata?filter=lastUpdated:gt:2016-05' and run the importer
 with atomicMode=NONE

 *curl -H "Content-Type: application/json" -X POST --data
 @metadata.224.newapi.json -u admin:district
 “http://localhost:8080/api/24/metadata?atomicMode=NONE
 ” >
 output_created_besteffort_trace.txt*

 Getting below exception in trace. Complete trace also attached.
 -
 * INFO 2016-08-26 15:58:38,217 (admin) Creating 57 object(s) of type
 ReportTable (DefaultObjectBundleService.java [qtp289378424-12])
 org.hibernate.TransientObjectException: object references an unsaved
 transient instance - save the transient instance before flushing:
 org.hisp.dhis.indicator.Indicator
 --
 Any suggestions please.


 Thanks
 Aamer.


 On Tue, Aug 23, 2016 at 11:19 AM, Morten Olav Hansen 
 wrote:

> Hi Aamer
>
> Probably what is happening is that the new database has some
> constraints that the old one doesn't. We have had some issues with
> hibernate in the past, and for certain databases that means that many of
> the constraints was not applied..
>
> If you look at the messages, you will see that e.g `shortName` must be
> unique for data elements.. the list of errors is not big though, probably
> you can go through the payload and manually update the objects which has
> issues?
>
> Another issue I see is that you are 

[Dhis2-devs] Issue with Tracker Capture Program Rules not working with sections

2016-09-01 Thread Absolom MURAMIRA
Dear All,

 

I just realized that when you create a program and define sections under
program stages, you are not able to define any program rules. When you click
the Add Source field, nothing happens and same applies to the actions
button. Has anyone else experienced this? Thank you.

 

Absolom

___
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] Event Capture - option set not working

2016-09-01 Thread Erling Fjelstad
Hello Simon & Laura,
You can try out the new Event Capture. Note that it is still in beta and
doesn't have all the functionality as the old one yet. You can find it
here:
https://github.com/dhis2/dhis2-android-eventcapture/releases/download/0.5.1/event-capture-0.5.1.apk

Regards,
Erling - DHIS2 Android Team

On Mon, Aug 29, 2016 at 6:57 PM, Laura E. Lincks <
laura.lin...@icap.columbia.edu> wrote:

> Yes, we're experiencing the same problem.
>
> *Laura E. Lincks*
> Database Manager/Developer
> ICAP - Columbia University
> Mailman School of Public Health
> 60 Haven Ave, Floor B1
> New York, NY 10032
> Tel: 212 304 7132
>
> On Mon, Aug 29, 2016 at 9:32 AM, Simon Muyambo 
> wrote:
>
>> I am using the latest event capture from google play and Version:2.24
>> Build revision: 23585
>>
>> Option Set on the event capture showing as text even on programs that
>> used to work on 2.22.
>>
>>
>>
>> Has anyone come across this?
>>
>>
>>
>> Regards
>>
>> Simon Muyambo
>>
>>
>>
>> ___
>> 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
>>
>>
>
> ___
> 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
>
>
___
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] Dashboard Error

2016-09-01 Thread gerald thomas
Dear All,
On my version 2.5, whenever i click "Dashboard" i am receiving an
error. Please find the attached error.

Kindly note that i am accessing all possibilities for a smooth upgrade
of war file version.

-- 
Regards,

Gerald
Title: DHIS 2




An exception occurred

Sorry! The system failed to execute the operation. Usually, no data 
is lost and you can continue working by going back to the previous page.
 If you wish to report the incident, please save this page by choosing 
"File -> Save (page as)" in your browser and include the saved page 
in the report. The problem details are listed below.


  
  [-]
Exception (org.hibernate.exception.SQLGrammarException):
  could not execute query
  
  

  org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
org.hibernate.loader.Loader.doList(Loader.java:2536)
org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2319)
org.hibernate.loader.Loader.list(Loader.java:2268)
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
org.hisp.dhis.hibernate.HibernateGenericStore.getAll(HibernateGenericStore.java:259)
org.hisp.dhis.chart.impl.DefaultChartService.getAllCharts(DefaultChartService.java:1053)
sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
com.sun.proxy.$Proxy61.getAllCharts(Unknown source)
org.hisp.dhis.dashboard.action.ProvideContentAction.execute(ProvideContentAction.java:132)
sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
org.hisp.dhis.webportal.interceptor.XWorkPortalUserInterceptor.intercept(XWorkPortalUserInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.intercept(XWorkPortalModuleInterceptor.java:90)

Re: [Dhis2-devs] [Dhis2-users] Issue with Tracker Capture Program Rules not working with sections

2016-09-01 Thread Bridget Magoba
Dear Absolom,
I have a program with sections in version 2.23, program rules work fine.
 
From: Dhis2-users
[mailto:dhis2-users-bounces+bridgetmagoba=mifumi@lists.launchpad.net] On
Behalf Of Absolom MURAMIRA
Sent: Thursday, September 1, 2016 12:54 PM
To: dhis2-devs@lists.launchpad.net
Cc: dhis2-users
Subject: [Dhis2-users] Issue with Tracker Capture Program Rules not working
with sections
 
Dear All,
 
I just realized that when you create a program and define sections under
program stages, you are not able to define any program rules. When you click
the Add Source field, nothing happens and same applies to the actions
button. Has anyone else experienced this? Thank you.
 
Absolom


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
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] core source code now on github

2016-09-01 Thread Lars Helge Øverland
Hi there,

we have migrated our core source code to Github. You can find the new
repository here:

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


This means that the Launchpad branches are now read-only, and will be kept
only for historical purposes.

External contributions can be made through forking the Github repo and
creating pull requests
.

The stable release branches have been moved into the dhis2-core repo as
separate branches.

The jenkins environment  has been updated to pull
from Github.

While we are still figuring out the exact development workflow, for those
interested we have started to write up the process
.



regards,

Lars



-- 
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-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Metadata importer: buggy behavior when importing unordered orgunits

2016-09-01 Thread Morten Olav Hansen
HI

Yeah, I see there is something strange going on, will look into it.

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Thu, Sep 1, 2016 at 1:30 PM, Victor Garcia  wrote:

> Version 2.24r23585.
> New importer endpoint: /api/24/metadata
>
> On 1 September 2016 at 03:01, Morten Olav Hansen  wrote:
>
>> What version if DHIS and which endpoint are you using?
>>
>>
>> On Wednesday, 31 August 2016, Victor Garcia  wrote:
>>
>>> Hi all,
>>>
>>> we have found a strange behavior in the new metadata importer.
>>>
>>> Let's create two related orgunits, "Project" (parent) and "Health Site"
>>> (child), and export them using the new exporter which defaults to order by
>>> 'name'. The payload will contain "Project" first and "Health Site" later.
>>>
>>> Then, if we import the file in another instance using the new importer,
>>> it gives us the following:
>>> 1. Project orgunit is correctly imported.
>>> 2. Health Site orgunit is imported, but the "parent" field is left
>>> empty, and also the path is wrong. In fact, it is created as another *root
>>> orgunit!*
>>>
>>> I don't know if the new importer expects ordered elements, but this
>>> behavior is quite dangerous... We test the same file with old importer, and
>>> it works fine.
>>>
>>> You can find attached a payload that can be used with demo server (it
>>> hangs from Sierra Leone orgunit).
>>>
>>> Regards,
>>>
>>> Víctor
>>>
>>
>>
>> --
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.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] Metadata importer: buggy behavior when importing unordered orgunits

2016-09-01 Thread Victor Garcia
Version 2.24r23585.
New importer endpoint: /api/24/metadata

On 1 September 2016 at 03:01, Morten Olav Hansen  wrote:

> What version if DHIS and which endpoint are you using?
>
>
> On Wednesday, 31 August 2016, Victor Garcia  wrote:
>
>> Hi all,
>>
>> we have found a strange behavior in the new metadata importer.
>>
>> Let's create two related orgunits, "Project" (parent) and "Health Site"
>> (child), and export them using the new exporter which defaults to order by
>> 'name'. The payload will contain "Project" first and "Health Site" later.
>>
>> Then, if we import the file in another instance using the new importer,
>> it gives us the following:
>> 1. Project orgunit is correctly imported.
>> 2. Health Site orgunit is imported, but the "parent" field is left empty,
>> and also the path is wrong. In fact, it is created as another *root
>> orgunit!*
>>
>> I don't know if the new importer expects ordered elements, but this
>> behavior is quite dangerous... We test the same file with old importer, and
>> it works fine.
>>
>> You can find attached a payload that can be used with demo server (it
>> hangs from Sierra Leone orgunit).
>>
>> Regards,
>>
>> Víctor
>>
>
>
> --
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.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