Re: [Dhis2-devs] [Dhis2-users] Unable to retrieve events via API or import/export apps for programs with Custom Combinations of Categories

2018-02-16 Thread JM Alcantara
Hi Stephen 
We are aiming to have a solution for 2.30
This is more a design decision than a bug.
JM


> El 15/02/2018, a las 22:17, Ocaya Stephen  escribió:
> 
> Hi JM,
> 
> Looks like the issues has never been resolved right? I have confirmed this in 
> Version 2.27, 2.28, and I assume it is the same case with lower version. 
> 
> Is this supposed to be so or it is yet in plan for implementation in a future 
> version?
> 
> Regards
> 
> On Thu, Feb 15, 2018 at 10:43 PM, JM Alcantara  <mailto:jmalcanta...@gmail.com>> wrote:
> Hello Stephen
> Please take a look at Jira issue https://jira.dhis2.org/browse/DHIS2-2048 
> <https://jira.dhis2.org/browse/DHIS2-2048>
> JM
> 
>> El 15/02/2018, a las 20:29, Ocaya Stephen > <mailto:stepho...@gmail.com>> escribió:
>> 
>> 
>> HI, I Posted a bug in DHIS2 on JIRA HERE 
>> <https://jira.dhis2.org/browse/DHIS2-2903> but seems not response to it.
>> 
>> Kindly review the details below:
>> 
>> The problem happens when a custom category combination is applied to a 
>> program. When done, it is impossible to get data from import/export (Export 
>> Events app) as it return no record. Also, access the events api is 
>> impossible as it also returns no record despite having records
>> Check the API for one Program with custom CC.
>> https://play.dhis2.org/2.28/api/events.json?program=kla3mAPgvCH 
>> <https://play.dhis2.org/2.28/api/events.json?program=kla3mAPgvCH>
>> If however the program uses the default Combination of Category, Everything 
>> seems to work as expected.
>> 
>> 
>> Anyone who can help, will be grateful!!
>> 
>> regards
>> -- 
>> 
>> You can do anything, but not everything.
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users 
>> <https://launchpad.net/~dhis2-users>
>> Post to : dhis2-us...@lists.launchpad.net 
>> <mailto:dhis2-us...@lists.launchpad.net>
>> Unsubscribe : https://launchpad.net/~dhis2-users 
>> <https://launchpad.net/~dhis2-users>
>> More help   : https://help.launchpad.net/ListHelp 
>> <https://help.launchpad.net/ListHelp>
> 
> 
> 
> 
> -- 
> 
> You can do anything, but not everything.

___
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] Unable to retrieve events via API or import/export apps for programs with Custom Combinations of Categories

2018-02-15 Thread JM Alcantara
Hello Stephen
Please take a look at Jira issue https://jira.dhis2.org/browse/DHIS2-2048 

JM

> El 15/02/2018, a las 20:29, Ocaya Stephen  escribió:
> 
> 
> HI, I Posted a bug in DHIS2 on JIRA HERE 
>  but seems not response to it.
> 
> Kindly review the details below:
> 
> The problem happens when a custom category combination is applied to a 
> program. When done, it is impossible to get data from import/export (Export 
> Events app) as it return no record. Also, access the events api is impossible 
> as it also returns no record despite having records
> Check the API for one Program with custom CC.
> https://play.dhis2.org/2.28/api/events.json?program=kla3mAPgvCH 
> 
> If however the program uses the default Combination of Category, Everything 
> seems to work as expected.
> 
> 
> Anyone who can help, will be grateful!!
> 
> regards
> -- 
> 
> You can do anything, but not everything.
> ___
> 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

___
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] how to set the default gis app map 's center?

2017-11-21 Thread JM Alcantara
Perhaps a user setting too? I suppose other options could be useful, for 
example the current location of the computer.
JM


> El 21/11/2017, a las 12:48, Knut Staring  escribió:
> 
> I suppose a JIRA request could be filed to include this as a (global?) 
> setting.
> 
> Knut
> 
> On Tue, Nov 21, 2017 at 12:41 PM, Jan Henrik Øverland  > wrote:
> Hi, there's currently no way to set a default map center.
> 
> Jan
> 
> On 21 November 2017 at 03:56, 林晓东 mailto:lin...@126.com>> 
> wrote:
> Hi,all,
> 
>  I want to know  how to set the default map center of gis app.
> 
>   Thanks.
> 
> 
> 
> 
> --
> 此致
> 
> easy
> 
> 莫愁前路无知己,天下谁人不识君。
> 
> 
>  
> 
> ___
> 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 
> 
> 
> 
> 
> 
> -- 
> Jan Henrik Øverland
> Software developer, DHIS 2
> University of Oslo
> http://www.dhis2.org 
> ___
> 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
> 
> Department of Information, Evidence and Research
> World Health Organization, Geneva, Switzerland
> Office: +41 22 791 3683
> Mobile 1: +33 6 4434 2931
> Mobile 2: +47 9188 0522 
> Skype: knutstar
> ___
> 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

___
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] DHIS 2 to support PostgreSQL only?

2017-09-08 Thread JM Alcantara
Hello Lars
I hope you are well.
I fully agree with your assessment and the benefits are clear.
Best regards,
JM

> El 08/09/2017, a las 10:26, Lars Helge Øverland  escribió:
> 
> Hi all,
> 
> I want to bring up the idea of solely support PostgreSQL for DHIS 2 for 
> production use to get feedback from the community.
> 
> The DHIS 2 team is seeing clear benefits of moving to PostgreSQL-only. The 
> main ones are:
> 
> 1. Supporting and testing for more than one database platform is 
> time-consuming. The majority of DHIS 2 implementations is using PostgreSQL 
> already.
> 
> 2. PostgreSQL supports advanced geospatial features through PostGIS. We are 
> already depending on these for the GIS module to work optimally (i.e. for 
> event clustering in GIS). There are no direct equivalent in e.g. MySQL. We 
> are also considering using PostGIS data types in main data model.
> 
> 3. PostgreSQL will provide some impressive features which will become very 
> useful for us in version 10 
>  and 11. E.g. native 
> partitioning, parallel queries, logical replication, foreign tables and 
> improved query performance will be useful and allow us to develop the next 
> DHIS 2 analytics solution.
> 
> 
> We are aware this will be inconvenient for users of other databases such as 
> MySQL, but there is the option of migrating your database through the DHIS 2 
> metadata and data value import-export feature.
> 
> On a technical note, we will keep the Hibernate development framework and 
> keep supporting the H2 database for unit testing purposes.
> 
> Please let us know your thoughts on this.
> 
> 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-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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


Re: [Dhis2-devs] Error when updating data set expiry days

2017-07-03 Thread JM Alcantara
It seems this also affects the setup of grey fields in sections.

Regards,
JM

> El 03/07/2017, a las 16:16, Jason Pickering  
> escribió:
> 
> Hi JM,
> 
> Thanks for confirming that others have seen this. This is a really crippling 
> problem for this instance and I can confirm that there is a favorite attached 
> to this data dimension. 
> 
> 
> I do have a work around to PATCH the expiry days with the API, which works, 
> but that is a less than ideal solution. 
> 
> Regards,
> Jason
> 
> 
> On Sun, Jul 2, 2017 at 8:29 AM, JM Alcantara  <mailto:jmalcanta...@gmail.com>> wrote:
> Hi Jason
> I've seen this before when there is a favorite using details with a data 
> element included in the data set.
> JM
> 
> On 2 Jul 2017 13:33, "Jason Pickering"  <mailto:jason.p.picker...@gmail.com>> wrote:
> 
> Hi Devs,
> 
> 
> When updating expiry days in a data set, I am seeing this error. Any idea how 
> to correct it? I am not able to reproduce on the demo site, so seems 
> something specific to this database. 
> 
> Regards,
> Jason
> 
> 
> 
> Version:2.26
> Build revision:80d7658
> Build date:2017-06-15 06:43
> 
> * INFO  2017-07-02 12:18:25,811 (admin) Import:Start 
> (DefaultMetadataImportService.java [http-bio-0.0.0.0-8080-exec-23])
> * INFO  2017-07-02 12:18:26,716 (admin) Import:Preheat[REFERENCE] took 0.90 
> seconds (DefaultPreheatService.java [http-bio-0.0.0.0-8080-exec-23])
> * INFO  2017-07-02 12:18:26,721 (admin) Import:Validation took 0.00 seconds 
> (DefaultObjectBundleValidationService.java [http-bio-0.0.0.0-8080-exec-23])
> * INFO  2017-07-02 12:18:26,722 (admin) Updating 1 object(s) of type DataSet 
> (DefaultObjectBundleService.java [http-bio-0.0.0.0-8080-exec-23])
> * WARN  2017-07-02 12:18:26,870 SQL Error: 0, SQLState: 23503 
> (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])
> * ERROR 2017-07-02 12:18:26,871 ERROR: update or delete on table 
> "dataelementoperand" violates foreign key constraint 
> "fk_datadimensionitem_dataelementoperandid" on table "datadimensionitem"
>   Detail: Key (dataelementoperandid)=(788048) is still referenced from table 
> "datadimensionitem". (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])
> org.hibernate.exception.ConstraintViolationException: could not execute 
> statement
>   at 
> org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
>   at 
> org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
>   at 
> org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
>   at 
> org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
>   at 
> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
>   at 
> org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)
>   at 
> org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3259)
>   at 
> org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3496)
>   at 
> org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:98)
>   at 
> org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:582)
>   at 
> org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:456)
> 
> 
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com <mailto:jason.p.picker...@gmail.com>
> tel:+46764147049 
> ___
> Mailing list: https://launchpad.net/~dhis2-devs 
> <https://launchpad.net/~dhis2-devs>
> Post to : dhis2-devs@lists.launchpad.net 
> <mailto:dhis2-devs@lists.launchpad.net>
> Unsubscribe : https://launchpad.net/~dhis2-devs 
> <https://launchpad.net/~dhis2-devs>
> More help   : https://help.launchpad.net/ListHelp 
> <https://help.launchpad.net/ListHelp>
> 
> 
> 
> 
> -- 
> Jason P. Pickering
> email: jason.p.picker...@gmail.com <mailto: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


Re: [Dhis2-devs] Error when updating data set expiry days

2017-07-02 Thread JM Alcantara
Hi Jason
I've seen this before when there is a favorite using details with a data
element included in the data set.
JM

On 2 Jul 2017 13:33, "Jason Pickering"  wrote:

>
> Hi Devs,
>
>
> When updating expiry days in a data set, I am seeing this error. Any idea
> how to correct it? I am not able to reproduce on the demo site, so seems
> something specific to this database.
>
> Regards,
> Jason
>
>
>
> Version:2.26
> Build revision:80d7658
> Build date:2017-06-15 06:43
>
> * INFO  2017-07-02 12:18:25,811 (admin) Import:Start
> (DefaultMetadataImportService.java [http-bio-0.0.0.0-8080-exec-23])
> * INFO  2017-07-02 12:18:26,716 (admin) Import:Preheat[REFERENCE] took
> 0.90 seconds (DefaultPreheatService.java [http-bio-0.0.0.0-8080-exec-23])
> * INFO  2017-07-02 12:18:26,721 (admin) Import:Validation took 0.00
> seconds (DefaultObjectBundleValidationService.java
> [http-bio-0.0.0.0-8080-exec-23])
> * INFO  2017-07-02 12:18:26,722 (admin) Updating 1 object(s) of type
> DataSet (DefaultObjectBundleService.java [http-bio-0.0.0.0-8080-exec-23])
> * WARN  2017-07-02 12:18:26,870 SQL Error: 0, SQLState: 23503
> (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])
> * ERROR 2017-07-02 12:18:26,871 ERROR: update or delete on table
> "dataelementoperand" violates foreign key constraint 
> "fk_datadimensionitem_dataelementoperandid"
> on table "datadimensionitem"
>   Detail: Key (dataelementoperandid)=(788048) is still referenced from
> table "datadimensionitem". (SqlExceptionHelper.java
> [http-bio-0.0.0.0-8080-exec-23])
> org.hibernate.exception.ConstraintViolationException: could not execute
> statement
> at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(
> SQLStateConversionDelegate.java:112)
> at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(
> StandardSQLExceptionConverter.java:42)
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(
> SqlExceptionHelper.java:111)
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(
> SqlExceptionHelper.java:97)
> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(
> ResultSetReturnImpl.java:207)
> at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(
> NonBatchingBatch.java:45)
> at org.hibernate.persister.entity.AbstractEntityPersister.delete(
> AbstractEntityPersister.java:3259)
> at org.hibernate.persister.entity.AbstractEntityPersister.delete(
> AbstractEntityPersister.java:3496)
> at org.hibernate.action.internal.EntityDeleteAction.execute(
> EntityDeleteAction.java:98)
> at org.hibernate.engine.spi.ActionQueue.executeActions(
> ActionQueue.java:582)
> at org.hibernate.engine.spi.ActionQueue.executeActions(
> ActionQueue.java:456)
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049 <+46%2076%20414%2070%2049>
>
> ___
> 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


Re: [Dhis2-devs] [Dhis2-users] Loop hole in updating data values for completed Data Sets

2017-06-15 Thread JM Alcantara
Hi Dennis
I don’t recall that data sets actually lock data entry when marked completed. 
What you can do is use expiry days or approvals, that will lock the data set 
automatically after X days or lock it by having the user approve the data.
Best regards,
JM

> El 15/06/2017, a las 13:34, Dennis Banga  escribió:
> 
> Thanks David for the prompt response.
> 
> I have checked the issue you have linked to, but this is different to the 
> issue I have reported since its about compulsory data elements not being 
> enforced when completing a data set. My issue is that you can update values 
> once the data set is completed which is not supposed to be the case.
> 
>  I had checked if there was a similar issue reported, the one that closely 
> matched was -DHIS2-1079  but was on 
> the Android app.
> 
> 
> Regards,
> Dennis
> 
> On 15 June 2017 at 21:06, David Muturi  > wrote:
> Hi Dennis,
> This is a know dhis2 bug see  dhis2 JIRA link (DHIS2-1362 
> ).
> rgds
> David
> 
> 2017-06-15 20:50 GMT+03:00 Dennis Banga  >:
> Greetings,
> 
> Here is an issue we have noted, on the data entry form I can update 
> individual data values when the data set is completed without first 
> incompleting , update the values and then complete. When I run the data set 
> report at the same level the I can see the updated values, but on the audit 
> trail I can only see the first value entered.
> 
> I don't know why this works this way or it's a system bug. I would propose 
> once a data set is completed the data entry fields should be disabled in the 
> data entry form and for any updates the user must incomplete, update values 
> and the complete again.
> 
> We have seen users taking advantage of this loop hole, whereby they complete 
> blank data sets and then update the values later. So when running reporting 
> rates summary you'll see those facilities have reported which is not the case.
> 
> Kindly advise on this.
> 
> 
> Thanks,
> 
> 
> Dennis
> 
> 
> 
> 
> ___
> 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-users 
> 
> Post to : dhis2-us...@lists.launchpad.net 
> 
> Unsubscribe : https://launchpad.net/~dhis2-users 
> 
> 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


Re: [Dhis2-devs] Optionset api not returning the name and code v2.26

2017-06-15 Thread JM Alcantara
Hi Morten,
Do you mean the comments dialog in data entry is not doing correctly the call 
to the API? I tested this in 2.25 build c12aa62 and the dropdown is not 
populated with the options form the option set.

JM

> El 15/06/2017, a las 02:39, Morten Olav Hansen  escribió:
> 
> Hi Pooben
> 
> Yes, this was changed some time back. Please have a look at our field filter 
> docs [1]. For collections list this, the default field filter is just the id, 
> but you can easily get more by doing `options[:all]` or by being more 
> specific `options[id,displayName]`.
> 
> [1] 
> https://docs.dhis2.org/master/en/developer/html/webapi_metadata_field_filter.html
>  
> 
> 
> -- 
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org 
> On Thu, Jun 15, 2017 at 2:28 PM, Pooben Dass  > wrote:
> Hi
> 
> We have a dropdown list of comment options linked to the dataelements as 
> option set comments but the drop down populates as undefined.
> 
> Upon checking the api (/api/optionSets/) to confirm what is returned, I see 
> it only returns the id not the other values. 
> 
> this is what is returned in v2.26:
> options: 
> [
> {
> id: "AMrXb7wAiKV"
> },
> {
> id: "yCLGIfdYbQ4"
> },
> 
> 
> this is what is returned in v2.20:
> options: 
> [
> {
> id: "AMrXb7wAiKV",
> name: "#{1} No evidence",
> code: "#{1} No evidence",
> created: "2015-03-09T19:33:15.000+",
> lastUpdated: "2015-03-09T19:33:15.000+",
> href: "url "
> },
> {
> id: "yCLGIfdYbQ4",
> name: "#{2} Evidence not valid/irrelevant",
> code: "#{2} Evidence not valid/irrelevant",
> created: "2015-03-09T19:33:15.000+",
> lastUpdated: "2015-03-09T19:33:15.000+",
> href: "url ."
> },
> 
> Is there a script that was neglected in the upgrade process or some other 
> setting that needs to be changed?
> 
> Regards
> Pooben
> 
> This message and any attachments are subject to a disclaimer published at 
> http://www.hisp.org/policies.html#comms_disclaimer 
> .  Please read the 
> disclaimer before opening any attachment or taking any other action in terms 
> of this electronic transmission.  If you cannot access the disclaimer, kindly 
> send an email to disclai...@hisp.org  and a copy 
> will be provided to you. By replying to this e-mail or opening any attachment 
> you agree to be bound by the provisions of the disclaimer.
> 
> 
> ___
> 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


Re: [Dhis2-devs] Import User in DHIS2

2017-02-15 Thread JM Alcantara
Hello Aanyo
You can use the API to do a bulk import of user accounts, you’ll find some 
information in the developer guide  (1)
Here’s an example for creating multiple accounts:

{"users": [
{
"firstName": "John",
"surname": "Doe",
"email": "john...@mail.com",
"id": "HEDxivzocuw",
"userCredentials": {
"username": "johndoe",
"password": "A-password-123",
"userInfo": {"id": "HEDxivzocuw"},
"userRoles": [{"id": "Euq3XfEIEbx"}]
},
"organisationUnits": [{"id": "ImspTQPwCqd"}],
"userGroups": [{"id": "vAvEltyXGbD"}]
},
{
"firstName": "Jane",
"surname": "Doe",
"email": "jane...@mail.com",
"id": "jU0dqPmdvtO",
"userCredentials": {
"username": "janedoe",
"password": "A-password-123",
"userInfo": {"id": "jU0dqPmdvtO"},
"userRoles": [{"id": "Euq3XfEIEbx"}]
},
"organisationUnits": [{"id": "ImspTQPwCqd"}],
"userGroups": [{"id": "vAvEltyXGbD"}]
}
]}

Note this is a little different from what you’ll find in the guide, first in 
this example I prepared the payload for multiple accounts, also I added the id 
and userInfo.id because in the current version/build the system will not create 
the accounts if that information is missing.

This should be imported using “http://server/api/25/metadata” or 
"http://server/api/metadata”.

Regards,
JM


1 - 
https://docs.dhis2.org/2.25/en/developer/html/dhis2_developer_manual_full.html#d8566e11697
 


> El 15/02/2017, a las 07:53, Aanyo AHIAGNO  escribió:
> 
> Hello,
> 
> Please, what is the best way to import users in dhis2?
> 
> 
> AHIAGNO Aanyo
> HISP West Africa
> 0022890962285

___
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] Block a dataset just same period

2017-02-10 Thread JM Alcantara
Hello Carlos
Can you provide a little more information?
Is this for a data set? Is the period annual? In that case you can the value of 
expiry days and open future periods for data entry to 1.

JM

> El 10/02/2017, a las 08:41, Carlos Nyembwe  escribió:
> 
> Dear all
> 
> Hello, I have a problem in our process for implementing a new system but, a 
> problem is, we need to block the period after 2016 to give just access for 
> 2017
> 
> Is it possible to do that?
> 
> Thanks
> 
> -- 
> Carlos Nyembwe
> I'm just a Computer Scientist
> 
> Skype: carloscnk1
> Cell: (+243)813166381
> Find me in: | Google Plus  | Linkedin 
>  | Facebook 
>  | Twitter 
>  |
> ___
> 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


Re: [Dhis2-devs] Error importing new user accounts

2016-06-06 Thread JM Alcantara
Thanks Morten, we are using v 2.22 b 22056, I'll do a test via API as soon
as I get a chance and will let you know how it goes. Via interface it
doesn't work.
Best regards,
JM

On Mon, 6 Jun 2016, 09:36 Morten Olav Hansen,  wrote:

> Hi Juan
>
> Yes, both XML and JSON should be supported (if you are using a recent
> 2.23). If it's not working, please send me the payload.. and I will create
> a unit test for it (our new importer is fully tested, including many many
> tests for user imports)
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Mon, Jun 6, 2016 at 11:54 AM, JM Alcantara 
> wrote:
>
>> Hi Morten
>> I hope you are well.
>> I'm using the system's interface with an XML I exported from another
>> instance, I give it a try via API and will let you know what I find out.
>> Best regards
>> JM
>>
>> On Mon, 6 Jun 2016, 04:37 Morten Olav Hansen,  wrote:
>>
>>> Hi Juan
>>>
>>> Looks like you are using our old importer, could you try and send your
>>> payload to /api/23/metadata (if you are sending a single user, please wrap
>>> it in "user": [])
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Sat, Jun 4, 2016 at 6:12 PM, Juan Manuel Alcantara Acosta <
>>> jmalcanta...@gmail.com> wrote:
>>>
>>>> Hi Devs
>>>>
>>>> I hope everyone is enjoying a nice weekend.
>>>>
>>>> In v2.22 b 22057 I can’t import new user accounts, I’m including a copy
>>>> of the log. I tested this in play (v 2.23 b 22983) and the import
>>>> doesn’t finish, so I assume the same thing is happening.
>>>>
>>>> Best regards,
>>>> JM
>>>>
>>>> * INFO  2016-06-04 11:00:03,681 Building object-bridge maps took 3.21
>>>> seconds. (DefaultObjectBridge.java [taskScheduler-5])
>>>> * WARN  2016-06-04 11:00:03,682 Can not find getter for
>>>> 'oAuth2Clients'. (DefaultImportService.java [taskScheduler-5])
>>>> * INFO  2016-06-04 11:00:03,682 [Level: INFO, category:
>>>> METADATA_IMPORT, time: Sat Jun 04 11:00:03 UTC 2016, message: Importing 1
>>>> Users] (InMemoryNotifier.java [taskScheduler-5])
>>>> * INFO  2016-06-04 11:00:03,744 'jmalcantara' *create
>>>> org.hisp.dhis.user.User, name: Aleck Dhliwayo, uid: AuQ7f7kpQNN*
>>>> (AuditLogUtil.java [taskScheduler-5])
>>>> * INFO  2016-06-04 11:00:03,869 'jmalcantara' *update
>>>> org.hisp.dhis.user.User, name: Aleck Dhliwayo, uid: AuQ7f7kpQNN*
>>>> (AuditLogUtil.java [taskScheduler-5])
>>>> * ERROR 2016-06-04 11:00:03,885 Unexpected error occurred in scheduled
>>>> task. (TaskUtils.java [taskScheduler-5])
>>>> *org.hibernate.TransientObjectException: object references an unsaved
>>>> transient instance - save the transient instance before flushing:
>>>> org.hisp.dhis.user.User*
>>>> at
>>>> org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:249)
>>>> at org.hibernate.type.EntityType.getIdentifier(EntityType.java:536)
>>>> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:311)
>>>> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:321)
>>>> at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:294)
>>>> at
>>>> org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:4049)
>>>> at
>>>> org.hibernate.event.internal.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:537)
>>>> at
>>>> org.hibernate.event.internal.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:235)
>>>> at
>>>> org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:164)
>>>> at
>>>> org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:230)
>>>> at
>>>> org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:100)
>>>> at
>>>> org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:61)
>>>&

Re: [Dhis2-devs] Error importing new user accounts

2016-06-05 Thread JM Alcantara
Hi Morten
I hope you are well.
I'm using the system's interface with an XML I exported from another
instance, I give it a try via API and will let you know what I find out.
Best regards
JM

On Mon, 6 Jun 2016, 04:37 Morten Olav Hansen,  wrote:

> Hi Juan
>
> Looks like you are using our old importer, could you try and send your
> payload to /api/23/metadata (if you are sending a single user, please wrap
> it in "user": [])
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Sat, Jun 4, 2016 at 6:12 PM, Juan Manuel Alcantara Acosta <
> jmalcanta...@gmail.com> wrote:
>
>> Hi Devs
>>
>> I hope everyone is enjoying a nice weekend.
>>
>> In v2.22 b 22057 I can’t import new user accounts, I’m including a copy
>> of the log. I tested this in play (v 2.23 b 22983) and the import
>> doesn’t finish, so I assume the same thing is happening.
>>
>> Best regards,
>> JM
>>
>> * INFO  2016-06-04 11:00:03,681 Building object-bridge maps took 3.21
>> seconds. (DefaultObjectBridge.java [taskScheduler-5])
>> * WARN  2016-06-04 11:00:03,682 Can not find getter for 'oAuth2Clients'.
>> (DefaultImportService.java [taskScheduler-5])
>> * INFO  2016-06-04 11:00:03,682 [Level: INFO, category: METADATA_IMPORT,
>> time: Sat Jun 04 11:00:03 UTC 2016, message: Importing 1 Users]
>> (InMemoryNotifier.java [taskScheduler-5])
>> * INFO  2016-06-04 11:00:03,744 'jmalcantara' *create
>> org.hisp.dhis.user.User, name: Aleck Dhliwayo, uid: AuQ7f7kpQNN*
>> (AuditLogUtil.java [taskScheduler-5])
>> * INFO  2016-06-04 11:00:03,869 'jmalcantara' *update
>> org.hisp.dhis.user.User, name: Aleck Dhliwayo, uid: AuQ7f7kpQNN*
>> (AuditLogUtil.java [taskScheduler-5])
>> * ERROR 2016-06-04 11:00:03,885 Unexpected error occurred in scheduled
>> task. (TaskUtils.java [taskScheduler-5])
>> *org.hibernate.TransientObjectException: object references an unsaved
>> transient instance - save the transient instance before flushing:
>> org.hisp.dhis.user.User*
>> at
>> org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:249)
>> at org.hibernate.type.EntityType.getIdentifier(EntityType.java:536)
>> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:311)
>> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:321)
>> at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:294)
>> at
>> org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:4049)
>> at
>> org.hibernate.event.internal.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:537)
>> at
>> org.hibernate.event.internal.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:235)
>> at
>> org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:164)
>> at
>> org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:230)
>> at
>> org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:100)
>> at
>> org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:61)
>> at
>> org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1166)
>> at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1223)
>> at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
>> at
>> org.hibernate.internal.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:909)
>> at
>> org.hisp.dhis.user.hibernate.HibernateUserCredentialsStore.getUserCredentialsByUsername(HibernateUserCredentialsStore.java:48)
>> at
>> org.hisp.dhis.user.DefaultUserService.getUserCredentialsByUsername(DefaultUserService.java:567)
>> at sun.reflect.GeneratedMethodAccessor517.invoke(Unknown Source)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:498)
>> at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>> at
>> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>> at
>> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
>> at
>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>> at
>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
>> at
>> org.springframework.aop.frame

Re: [Dhis2-devs] [Dhis2-users] user roles, access control

2014-03-14 Thread JM Alcantara
Hello Bayo
With the restriction lifted a user would be able to edit or create users
within the org unit (and children) assigned, with the same or lower rights
assigned to the account. Would that work for you?
Best regards,
JM


2014-03-14 11:44 GMT+01:00 Bayo Mohammed Onimode Jnr :

> Dears,
>
> For me, i will YES. This restriction is still very neccessary.
>
> Since they have same or equal level of previledge, the restriction should
> remain.
>
> Thank you.
> _ _ _ _ _ _ _ _
> *Bayo Mohammed, ONIMODE, **mbcs *| Database/IT Specialist
> USAID/Nigeria Monitoring and Evaluation Management Services (MEMS-II)
> #17 Euphrates Crescent, Maitama, Abuja.
> *Telephone:* +234-9-4610670 or 4610671. *Fax:* +234-9-4610672. *| Mobile:*
> +234-809-812-3465, +234-803-624-3853
> www.new.nigeriamems.com 
> [image: U.S. Agency for International Development][image: MEMS-II Logo]
>
>
>   On Friday, 14 March 2014, 11:34, Lars Helge Øverland <
> larshe...@gmail.com> wrote:
>  Hi all,
>
> an issue where input is needed from the community:
>
> Currently, one rule for user management says that users cannot see nor
> edit users which have granted the same user roles as themselves.
>
> The rationale for this restriction is e.g. that district officers should
> not be able to create other district officer user accounts.
>
> *Is this restriction still necessary?*
>
> Reason for asking is that some organisations have started designing user
> roles in a way where you a have a larger number of user roles focused on
> topics, and user roles are mixed and matched when creating new users. This
> restriction does not work well in this scenario.
>
> A second rule is that users can only see other users for which they have
> all of their authorities. This restriction will remain.
>
> regards,
>
> Lars
>
>
> ___
> 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
>
>
>
> ___
> 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
>
>
___
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