Re: [Dhis2-users] Coordinates data element not working in android apps?

2018-03-12 Thread Ignacio Foche
Hi Natalie,

Depends on the Android App. Coordinates are supported in Event Capture and
Tracker Capture for Data Elements, but not supported in Data Capture.
Please have a look at the documentation here: https://goo.gl/wkueXY. If
you're trying with EC or TC and it still doesn't work, please don't
hesitate to submit a bug report on jira.

Best regards

Le lun. 12 mars 2018 à 17:10, Natalie Tibbels  a écrit :

> Hi all,
>
> Have others been able to get coordinates to work as a data element in the
> android app? I created a data element to capture coordinates, but it says
> “value type not supported” when I try to enter in the app.
>
> Gratefully,
>
> Natalie
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
-- 
Ignacio Foche Pérez
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] [Dhis2-devs] URGENT: Data capture and Maintenance org units Access

2018-03-12 Thread Ocaya Stephen
Hi Georgi, The other workable option where U dont have direct access to
database is use the DHIS2 WebAPI

Georgi, Since the account is a superuser, you could use the WebAPI to
create a new Superuser and allocate to the Main parent orgunit using the
payloads below:-


For this to work properly (currently) you need to generate an ID
(/api/system/id) and then modify the payload like this:

{
  "id": "generated-id",
  "firstName": "John",
  "surname": "Doe",
  "email": "john...@mail.com",
  "userCredentials": {
"userInfo": { "id": "generated-id" },
"username": "johndoe",
"password": "your-password-123",
"userRoles": [ {
  "id": "Euq3XfEIEbx"
} ]
  },
  "organisationUnits": [ {
"id": "ImspTQPwCqd"
  } ],
  "userGroups": [ {
"id": "vAvEltyXGbD"
  } ]
}

generated-id should be generated using /api/system/id (WebAPI)

Then, Use Curl to Create the user. Once done, Login and Update your account
as usual using users App

curl -X POST -u user:pass -d @u.json -H "Content-Type:
application/json" http://server/api/24/users





On Mon, Mar 12, 2018 at 8:47 PM, Knut Staring  wrote:

> Ok...and you cannot just revert to the dump? Or the dump has the same
> problem?
>
> In any case, since you have a dump which you can experiment with (pls note
> that I have not tested this procedure thoroughly, and you might get more
> than one answer if you have more than one root or more than one superuser):
>
> In any case, you should be able to do this in three steps - first finding
> the root OU and then your user:
>
> 1) SELECT organisationunitid, name FROM organisationunit where parentid is
> null; LET'S SAY THE ANSWER IS 18
> 2) SELECT userid from userrole where name='Superuser'; LET'S SAY THE
> ANSWER IS 32
>
> Given those values, you should be able to do this:
>
> 3) UPDATE usermembership SET organisationunitid = 18 WHERE userinfoid = 32;
>
> On Mon, Mar 12, 2018 at 6:21 PM, Georgi Chakarov <
> geo...@logicaloutcomes.net> wrote:
>
>> We got a database dump.
>>
>>
>>
>> *From:* Knut Staring [mailto:knu...@gmail.com]
>> *Sent:* Monday, March 12, 2018 7:07 PM
>> *To:* Georgi Chakarov 
>> *Cc:* DHIS 2 developers ; DHIS 2 Users
>> list 
>> *Subject:* Re: [Dhis2-devs] URGENT: Data capture and Maintenance org
>> units Access
>>
>>
>>
>> Do you have direct access to the database?
>>
>>
>>
>> On Mon, Mar 12, 2018, 17:47 Georgi Chakarov 
>> wrote:
>>
>> Hello all,
>>
>>
>>
>> For some testing purpose, I gave my superuser access to ONE org unit at
>> the lowest level. Now, I and (*all other users*) see only this org unit
>> for all data entry and maintenance apps, which is a bit strange.
>>
>> Does anyone know how do I regain access to the entire org unit tree again?
>>
>>
>>
>>
>>
>>
>>
>>
>> Georgi Chakarov, CIA | geo...@logicaloutcomes.net | +1-647-478-5634 x 104
>> <(647)%20478-5634> | LogicalOutcomes c/o Centre for Social Innovation, 720
>> Bathurst Street, Toronto Canada M5S 2R4
>> 
>> | *You may unsubscribe from receiving commercial electronic messages
>> from LogicalOutcomes by emailing **i...@logicaloutcomes.net*
>> 
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-d...@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> 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 <+41%2022%20791%2036%2083> Mob1: +33 6 4434 2931
> <+33%206%2044%2034%2029%2031> Mob2: +47 9188 0522
> Skype: knutstar
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-d...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
--
*Stephen Ocaya*
Tel: +256 393 217 892 | Mob: +256774558980
www.stephocay.com
SkypeID: stephocay
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] scheduler error on 2.8: ERROR: update or delete on table "fileresource" violates foreign key constraint "fk_document_fileresourceid" on table "document"

2018-03-12 Thread 林晓东
hi,all


  I got this on everyday scheduling task:


* ERROR 2018-03-13 02:00:01,349 ERROR: update or delete on table "fileresource" 
violates foreign key constraint "fk_document_fileresourceid" on table 
"document" . ( detail:Key (fileresourceid)=(4168592) is still referenced from 
table "document" SqlExceptionHelper.java [taskScheduler-1])
* ERROR 2018-03-13 02:00:01,474 HHH000346: Error during managed flush 
[org.hibernate.exception.ConstraintViolationException: could not execute 
statement] (ExceptionMapperStandardImpl.java [taskScheduler-1])
* ERROR 2018-03-13 02:00:01,538 Unexpected error occurred in scheduled task. 
(TaskUtils.java [taskScheduler-1])
org.springframework.dao.DataIntegrityViolationException: could not execute 
statement; SQL [n/a]; constraint [fk_document_fileresourceid]; nested exception 
is org.hibernate.exception.ConstraintViolationException: could not execute 
statement
at 
org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:241)
at 
org.springframework.orm.hibernate5.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:755)
at 
org.springframework.orm.hibernate5.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:594)
at 
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
at 
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
at 
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:504)
at 
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:292)
at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy607.deleteFileResource(Unknown Source)
at 
org.hisp.dhis.fileresource.FileResourceCleanUpTask.lambda$run$198(FileResourceCleanUpTask.java:64)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at 
org.hisp.dhis.fileresource.FileResourceCleanUpTask.run(FileResourceCleanUpTask.java:62)
at 
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at 
org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: 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:208)
at 
org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)
at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3315)
at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3552)
at 
org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:99)
at 
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:589)
at 
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)
at 
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
at 
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1435)
at 

Re: [Dhis2-users] [Dhis2-devs] URGENT: Data capture and Maintenance org units Access

2018-03-12 Thread Knut Staring
Ok...and you cannot just revert to the dump? Or the dump has the same
problem?

In any case, since you have a dump which you can experiment with (pls note
that I have not tested this procedure thoroughly, and you might get more
than one answer if you have more than one root or more than one superuser):

In any case, you should be able to do this in three steps - first finding
the root OU and then your user:

1) SELECT organisationunitid, name FROM organisationunit where parentid is
null; LET'S SAY THE ANSWER IS 18
2) SELECT userid from userrole where name='Superuser'; LET'S SAY THE ANSWER
IS 32

Given those values, you should be able to do this:

3) UPDATE usermembership SET organisationunitid = 18 WHERE userinfoid = 32;

On Mon, Mar 12, 2018 at 6:21 PM, Georgi Chakarov  wrote:

> We got a database dump.
>
>
>
> *From:* Knut Staring [mailto:knu...@gmail.com]
> *Sent:* Monday, March 12, 2018 7:07 PM
> *To:* Georgi Chakarov 
> *Cc:* DHIS 2 developers ; DHIS 2 Users
> list 
> *Subject:* Re: [Dhis2-devs] URGENT: Data capture and Maintenance org
> units Access
>
>
>
> Do you have direct access to the database?
>
>
>
> On Mon, Mar 12, 2018, 17:47 Georgi Chakarov 
> wrote:
>
> Hello all,
>
>
>
> For some testing purpose, I gave my superuser access to ONE org unit at
> the lowest level. Now, I and (*all other users*) see only this org unit
> for all data entry and maintenance apps, which is a bit strange.
>
> Does anyone know how do I regain access to the entire org unit tree again?
>
>
>
>
>
>
>
>
> Georgi Chakarov, CIA | geo...@logicaloutcomes.net | +1-647-478-5634 x 104
> <(647)%20478-5634> | LogicalOutcomes c/o Centre for Social Innovation, 720
> Bathurst Street, Toronto Canada M5S 2R4
> 
> | *You may unsubscribe from receiving commercial electronic messages from
> LogicalOutcomes by emailing **i...@logicaloutcomes.net*
> 
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-d...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> 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 <+41%2022%20791%2036%2083> Mob1: +33 6 4434 2931
<+33%206%2044%2034%2029%2031> Mob2: +47 9188 0522
Skype: knutstar
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] [Dhis2-devs] URGENT: Data capture and Maintenance org units Access

2018-03-12 Thread Georgi Chakarov
We got a database dump.

From: Knut Staring [mailto:knu...@gmail.com]
Sent: Monday, March 12, 2018 7:07 PM
To: Georgi Chakarov 
Cc: DHIS 2 developers ; DHIS 2 Users list 

Subject: Re: [Dhis2-devs] URGENT: Data capture and Maintenance org units Access

Do you have direct access to the database?

On Mon, Mar 12, 2018, 17:47 Georgi Chakarov 
> wrote:
Hello all,

For some testing purpose, I gave my superuser access to ONE org unit at the 
lowest level. Now, I and (all other users) see only this org unit for all data 
entry and maintenance apps, which is a bit strange.
Does anyone know how do I regain access to the entire org unit tree again?


[cid:image003.png@01D3BA32.86CFC1D0]


Georgi Chakarov, CIA | 
geo...@logicaloutcomes.net | +1-647-478-5634 
x 104 | LogicalOutcomes c/o Centre for Social Innovation, 720 Bathurst Street, 
Toronto Canada M5S 2R4 | You may unsubscribe from receiving commercial 
electronic messages from LogicalOutcomes by emailing 
i...@logicaloutcomes.net

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


[Dhis2-users] URGENT: Data capture and Maintenance org units Access

2018-03-12 Thread Georgi Chakarov
Hello all,

For some testing purpose, I gave my superuser access to ONE org unit at the 
lowest level. Now, I and (all other users) see only this org unit for all data 
entry and maintenance apps, which is a bit strange.
Does anyone know how do I regain access to the entire org unit tree again?


[cid:image003.png@01D3BA32.86CFC1D0]


Georgi Chakarov, CIA | 
geo...@logicaloutcomes.net | +1-647-478-5634 
x 104 | LogicalOutcomes c/o Centre for Social Innovation, 720 Bathurst Street, 
Toronto Canada M5S 2R4 | You may unsubscribe from receiving commercial 
electronic messages from LogicalOutcomes by emailing 
i...@logicaloutcomes.net

___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] Coordinates data element not working in android apps?

2018-03-12 Thread Natalie Tibbels
Hi all,
Have others been able to get coordinates to work as a data element in the 
android app? I created a data element to capture coordinates, but it says 
“value type not supported” when I try to enter in the app.
Gratefully,
Natalie
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] Custom colors for pivot and charts

2018-03-12 Thread Prosper BT
Dear Bernard,

This is not supported yet, but planned, check jira issue

   1. DHIS2-147 


Prosper Behumbiize, MPH
DHIS2 Implementation Adviser| HISP Uganda
pros...@hispuganda.org  | pros...@dhis2.org | Skype:
prospertb

On Thu, Mar 1, 2018 at 5:10 PM, Bernard Sadaka (IM Advisor) <
lib@pu-ami.org> wrote:

> Hello All,
>
> Is it possible to customize the color of the pivot table rows as well as
> the charts?
>
> What I would like to achieve is provide pivot table and charts that match
> colors: e.g. the target data in blue and the actual data in green both in
> the pivot rows/columns as well as in the chart.
>
> Advice appreciated.
>
>
>
> All the best,
>
> Bernard
>
>
>
> [image: cid:image002.png@01D36F50.572585A0]
>
> *Bernard Sadaka*
>
> *Information Management Advisor*
>
> Première Urgence - Aide Médicale Internationale
>
> Nehmeh Building, Sanine Street, Chiyah, 3rd Floor
>
> Ain el Remmaneh, Beirut, Lebanon
>
> *E-mail:* lib@pu-ami.org
>
> *Cell:* +961 71 004 881 <+961%2071%20004%20881> (208)
>
> *Skype:* imapuami
>
> *Website:* https://www.pu-ami.org
>
>
>
>
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_4788535999172519507_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@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-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] Hiding an element in an Option-Tracker Capture.

2018-03-12 Thread Prosper BT
Dear Stanley,

This is not supported now, its been a feature requested by many and its on
the to do list.

Check

   1. DHIS2-431  and see if it
   addresses you use-case.
   2.
  1. Regards


Prosper Behumbiize, MPH
DHIS2 Implementation Adviser| HISP Uganda
pros...@hispuganda.org  | pros...@dhis2.org | Skype:
prospertb

On Fri, Mar 2, 2018 at 2:26 PM, Stanley Kalyati  wrote:

> Does anyone know how to hide an element in an Option? I.e If one selects
> Male as gender in an Option,the in another Option, anything option related
> to Females should disappear or hide.
>
> Any ideas?
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@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-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp