[Dhis2-devs] [Bug 1638551] Re: Category option group set should be optional for approval level

2016-11-06 Thread Morten Olav Hansen
Should be fixed in 2.25 and master. This was happening due to non-
standard property mapping for dataApprovalLevel (which our schema
introspector didn't understand). So it was overriden with annotation
(@Property), it might have been a bit strict. Relaxed it down to not
required now.

** Changed in: dhis2
   Status: New => Incomplete

** Changed in: dhis2
   Status: Incomplete => Fix Committed

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1638551

Title:
  Category option group set should be optional for approval level

Status in DHIS:
  Fix Committed

Bug description:
  When creating a data approval level under Settings -> Approval in 2.25
  and trunk, a category option group set must be specified. This should
  be optional, as it was in 2.24 and earlier.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1638551/+subscriptions

___
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] [Bug 1638551] Re: Category option group set should be optional for approval level

2016-11-06 Thread Jim Grace
Great, thanks!


On Sun, Nov 6, 2016 at 1:52 AM, Morten Olav Hansen <
1638...@bugs.launchpad.net> wrote:

> Should be fixed in 2.25 and master. This was happening due to non-
> standard property mapping for dataApprovalLevel (which our schema
> introspector didn't understand). So it was overriden with annotation
> (@Property), it might have been a bit strict. Relaxed it down to not
> required now.
>
> ** Changed in: dhis2
>Status: New => Incomplete
>
> ** Changed in: dhis2
>Status: Incomplete => Fix Committed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1638551
>
> Title:
>   Category option group set should be optional for approval level
>
> Status in DHIS:
>   Fix Committed
>
> Bug description:
>   When creating a data approval level under Settings -> Approval in 2.25
>   and trunk, a category option group set must be specified. This should
>   be optional, as it was in 2.24 and earlier.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1638551/+subscriptions
>


-- 
Jim Grace
Core developer, DHIS 2
HISP US Inc.
http://www.dhis2.org 

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1638551

Title:
  Category option group set should be optional for approval level

Status in DHIS:
  Fix Committed

Bug description:
  When creating a data approval level under Settings -> Approval in 2.25
  and trunk, a category option group set must be specified. This should
  be optional, as it was in 2.24 and earlier.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1638551/+subscriptions

___
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] [Bug 1638551] Re: Category option group set should be optional for approval level

2016-11-06 Thread Morten Olav Hansen
Yes. the annotation was something new in 225.

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1638551

Title:
  Category option group set should be optional for approval level

Status in DHIS:
  Fix Committed

Bug description:
  When creating a data approval level under Settings -> Approval in 2.25
  and trunk, a category option group set must be specified. This should
  be optional, as it was in 2.24 and earlier.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1638551/+subscriptions

___
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] [Bug 1638551] Re: Category option group set should be optional for approval level

2016-11-06 Thread Lars Helge Øverland
Great. Can we back-port to 2.24 as well?


On Sun, Nov 6, 2016 at 6:52 AM, Morten Olav Hansen <
1638...@bugs.launchpad.net> wrote:

> Should be fixed in 2.25 and master. This was happening due to non-
> standard property mapping for dataApprovalLevel (which our schema
> introspector didn't understand). So it was overriden with annotation
> (@Property), it might have been a bit strict. Relaxed it down to not
> required now.
>
> ** Changed in: dhis2
>Status: New => Incomplete
>
> ** Changed in: dhis2
>Status: Incomplete => Fix Committed
>
> --
> You received this bug notification because you are a member of DHIS 2
> developers, which is subscribed to DHIS.
> https://bugs.launchpad.net/bugs/1638551
>
> Title:
>   Category option group set should be optional for approval level
>
> Status in DHIS:
>   Fix Committed
>
> Bug description:
>   When creating a data approval level under Settings -> Approval in 2.25
>   and trunk, a category option group set must be specified. This should
>   be optional, as it was in 2.24 and earlier.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1638551/+subscriptions
>
> ___
> 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
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
l...@dhis2.org
http://www.dhis2.org 

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1638551

Title:
  Category option group set should be optional for approval level

Status in DHIS:
  Fix Committed

Bug description:
  When creating a data approval level under Settings -> Approval in 2.25
  and trunk, a category option group set must be specified. This should
  be optional, as it was in 2.24 and earlier.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1638551/+subscriptions

___
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] Legend Set - Issue with start and end values

2016-11-06 Thread Archana Chillala
Okay. Thanks for the information, Lars.

Archana Chillala
Application Developer
Email archa...@thoughtworks.com
Telephone +91 9100960533 <+91+9100960533>
[image: ThoughtWorks]


On Fri, Nov 4, 2016 at 7:36 PM, Lars Helge Øverland  wrote:

>
> Hi again,
>
> if you are referring to the "start value" and "end value" fields above the
> "create legend items" button - those are used only to generate the legends,
> which are shown in the table below. They are not part of the legend set
> itself, rather used to generate legends. So this is expected.
>
> regards,
>
> Lars
>
>
> On Fri, Nov 4, 2016 at 2:51 PM, Lars Helge Øverland 
> wrote:
>
>> Hi Archana,
>>
>> I was testing this on the demo instance and it seems to work well there.
>> Are you able to reproduce this on the demo?
>>
>> regards,
>>
>> Lars
>>
>> On Fri, Nov 4, 2016 at 1:40 PM, Archana Chillala <
>> archa...@thoughtworks.com> wrote:
>>
>>> Hi,
>>>
>>> We are using DHIS 2.25. We have created a legend set and created 5
>>> legends automatically by specifying the start and end values as 20 and 120
>>> respectively. And then saved it. But when we open it again, we see that the
>>> start and end values show 0 and 100 respectively. They are always reset to
>>> 0 and 100. Is this a bug?
>>>
>>> Please see the screenshot attached with the mail.
>>>
>>>
>>>
>>> *Cheers,*
>>>
>>> Archana Chillala
>>> Application Developer
>>> Email archa...@thoughtworks.com
>>> Telephone +91 9100960533 <+91+9100960533>
>>> [image: ThoughtWorks]
>>> 
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> l...@dhis2.org
>> http://www.dhis2.org 
>>
>>
>
>
> --
> 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] DHIS2 Metadata Sync error

2016-11-06 Thread Aamer Mohammed
Hi,

As per the logs, metadata sync is failing in the importer phase when trying
to import metadata.
--
 * ERROR 2016-10-24 11:44:03,758 Exception occurred while trying to import
the metadata. object references an unsaved transient instance - save the
transient instance before flushing: org.hisp.dhis.dataelement.DataElement
--
Morten, any suggestions regarding this.


Thanks
Aamer.


On Fri, Nov 4, 2016 at 8:22 PM, Francesco Palazzini <
francesco.palazz...@ehealthnigeria.org> wrote:

> Hello DHIS team,
> we are trying the metadata sync feature but unfortunately it does not seem
> to work.
>
> Note: on our setup instance2 is going to sync from instance1
>
> What we tried so far:
> Case 1:
> - manually import metdata from a json file to instance1
> - upgrade instance1 running v2.22 to v2.24, everything went fine
> - create a 'metadata version' on instance1
> - configure instance2 to sync from instance1
> - trigger the sync with the 'sync now' button
>
> Case 2:
> - manually import metdata from a json file to instance1
> - upgrade instance1 running v2.22 to v2.24, everything went fine
> - save the dump of instance1's database
> - restore the dump of instance1's to instance2's database
> - create a 'metadata version' on instance1
> - configure instance2 to sync from instance1
> - trigger the sync with the 'sync now' button
>
> We were following this guide:
> https://dhis2.github.io/dhis2-docs/master/en/user/html/dataA
> dmin_metaDataSync.html
>
> On both cases the sync fails, error logs from instance2 attached.
>
> Any hint on how to get the metadata sync working?
>
> Thanks
>
> ___
> 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 Metadata Sync error

2016-11-06 Thread Morten Olav Hansen
Yeah, this is probably related to the same issues we are already
investigating.

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

On Mon, Nov 7, 2016 at 12:32 PM, Aamer Mohammed 
wrote:

> Hi,
>
> As per the logs, metadata sync is failing in the importer phase when
> trying to import metadata.
> --
>  * ERROR 2016-10-24 11:44:03,758 Exception occurred while trying to import
> the metadata. object references an unsaved transient instance - save the
> transient instance before flushing: org.hisp.dhis.dataelement.DataElement
> --
> Morten, any suggestions regarding this.
>
>
> Thanks
> Aamer.
>
>
> On Fri, Nov 4, 2016 at 8:22 PM, Francesco Palazzini  ehealthnigeria.org> wrote:
>
>> Hello DHIS team,
>> we are trying the metadata sync feature but unfortunately it does not
>> seem to work.
>>
>> Note: on our setup instance2 is going to sync from instance1
>>
>> What we tried so far:
>> Case 1:
>> - manually import metdata from a json file to instance1
>> - upgrade instance1 running v2.22 to v2.24, everything went fine
>> - create a 'metadata version' on instance1
>> - configure instance2 to sync from instance1
>> - trigger the sync with the 'sync now' button
>>
>> Case 2:
>> - manually import metdata from a json file to instance1
>> - upgrade instance1 running v2.22 to v2.24, everything went fine
>> - save the dump of instance1's database
>> - restore the dump of instance1's to instance2's database
>> - create a 'metadata version' on instance1
>> - configure instance2 to sync from instance1
>> - trigger the sync with the 'sync now' button
>>
>> We were following this guide:
>> https://dhis2.github.io/dhis2-docs/master/en/user/html/dataA
>> dmin_metaDataSync.html
>>
>> On both cases the sync fails, error logs from instance2 attached.
>>
>> Any hint on how to get the metadata sync working?
>>
>> Thanks
>>
>> ___
>> 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] Sharing on metadata import

2016-11-06 Thread Morten Olav Hansen
Hi Olav

Which endpoint did you use for this? /api/metadata or /api/24/metadata? (or
did you just use the UI)

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

On Fri, Nov 4, 2016 at 3:59 PM, Olav Poppe  wrote:

> Hi devs,
> I’m trying to import a new indicator (v2.24) with public access = none
> ("") and user group access limited to one group. However, the
> indicator gets imported with full public read/write access, and without the
> user group sharing.
>
> I also tried to export an indicator, modify name and sharing attributes,
> and import it again. Update to name was saved, update to sharing was not.
> Metadata example attached for reference.
>
> Is this a bug, or am I missing something?
>
> Regards
> Olav
>
>
> ___
> 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] Translations and Sharing Settings not syncing

2016-11-06 Thread Morten Olav Hansen
>
> *1) Translations* are not getting synced.
> In previous versions, translations used to sync. But, looks like
> that's not the case with 2.25. It affects all metadata objects that are
> translatable.
>

I assume this is the same in 2.24? have you verified that the translations
are actually working, there have been some reports of issues with the
update process

*2)* *Sharing settings* are not getting synced unless some change is made
> to the object’s properties.
> If we have sharing settings configured for a metadata object, while
> creating the object or modifying some property of that object, they get
> synced properly. But, if a change is made only to the sharing settings of
> that object (and nothing else), and try to sync, they do not get synced.
> This issue has been raised with 2.22 as well. Looks like it still exists.
>

I assume you mean if you only update the user group? if you update public
access it still syncs? Are you doing the updates through the maintenance
app?

--
Morten


>
>
> Could you please look into these issues and help fix them.
>
>
> *Cheers,*
>
> Archana Chillala
> Application Developer
> Email archa...@thoughtworks.com
> Telephone +91 9100960533 <+91+9100960533>
> [image: ThoughtWorks]
> 
>
> ___
> 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] Unable to create a favourites on GIS module

2016-11-06 Thread Morten Olav Hansen
Hi Archana

Seems to work fine on the play/demo server, but maybe you have a certain
config that doesn't work.

Can you try and reproduce on [1] and give us the steps back?

[1] https://play.dhis2.org/demo (admin/district)

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

On Fri, Nov 4, 2016 at 7:18 PM, Archana Chillala 
wrote:

> Hi,
>
> We are using the latest version of DHIS 2.25 (build - 5e16867).
> We are trying to create a favourite on GIS module, but it does not get
> created. Following is the exception it throws in the logs.
>
>
> * INFO  2016-11-03 11:43:07,115 'admin' create org.hisp.dhis.mapping.Map,
> name: amsterdam location, uid: c9wq3KMvvuy (AuditLogUtil.java
> [http-bio-8080-exec-2])
> * WARN  2016-11-03 11:43:07,131 SQL Error: 0, SQLState: 23502
> (SqlExceptionHelper.java [http-bio-8080-exec-2])
> * *ERROR 2016-11-03 11:43:07,133 ERROR: null value in column "uid"
> violates not-null constraint*
> *  Detail: Failing row contains (369, null, null, null, null, boundary,
> null, f, f, f, null, null, null, null, null, null, null, null, null, null,
> 5, null, 1, null, null, f, f, 11px, null, normal, null, f, null, 0, null,
> null, null). (SqlExceptionHelper.java [http-bio-8080-exec-2])*
> * ERROR 2016-11-03 11:43:07,134 HHH000346: Error during managed flush
> [could not execute statement] (SessionImpl.java [http-bio-8080-exec-2])
> org.springframework.dao.DataIntegrityViolationException: could not
> execute statement; SQL [n/a]; constraint [uid]; nested exception is
> org.hibernate.exception.ConstraintViolationException: could not execute
> statement
> at org.springframework.orm.hibernate5.SessionFactoryUtils.conve
> rtHibernateAccessException(SessionFactoryUtils.java:164)
> at org.springframework.orm.hibernate5.HibernateTransactionManag
> er.convertHibernateAccessException(HibernateTransactionManager.java:741)
> at org.springframework.orm.hibernate5.HibernateTransactionManag
> er.doCommit(HibernateTransactionManager.java:589)
> at org.springframework.transaction.support.AbstractPlatformTran
> sactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
> at org.springframework.transaction.support.AbstractPlatformTran
> sactionManager.commit(AbstractPlatformTransactionManager.java:730)
> at org.springframework.transaction.interceptor.TransactionAspec
> tSupport.commitTransactionAfterReturning(TransactionAspectSu
> pport.java:485)
> at org.springframework.transaction.interceptor.TransactionAspec
> tSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
> at org.springframework.transaction.interceptor.TransactionInter
> ceptor.invoke(TransactionInterceptor.java:96)
> at org.springframework.aop.framework.ReflectiveMethodInvocation
> .proceed(ReflectiveMethodInvocation.java:179)
> at org.springframework.aop.interceptor.ExposeInvocationIntercep
> tor.invoke(ExposeInvocationInterceptor.java:92)
> at org.springframework.aop.framework.ReflectiveMethodInvocation
> .proceed(ReflectiveMethodInvocation.java:179)
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
> JdkDynamicAopProxy.java:208)
> at com.sun.proxy.$Proxy130.addMap(Unknown Source)
> at org.hisp.dhis.webapi.controller.mapping.MapController.postJs
> onObject(MapController.java:129)
> at sun.reflect.GeneratedMethodAccessor1850.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.springframework.web.method.support.InvocableHandlerMetho
> d.doInvoke(InvocableHandlerMethod.java:221)
> at org.springframework.web.method.support.InvocableHandlerMetho
> d.invokeForRequest(InvocableHandlerMethod.java:136)
> at org.springframework.web.servlet.mvc.method.annotation.Servle
> tInvocableHandlerMethod.invokeAndHandle(ServletInvocableHand
> lerMethod.java:110)
> at org.springframework.web.servlet.mvc.method.annotation.Reques
> tMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHan
> dlerAdapter.java:817)
> at org.springframework.web.servlet.mvc.method.annotation.Reques
> tMappingHandlerAdapter.handleInternal(RequestMappingHandlerA
> dapter.java:731)
> at org.springframework.web.servlet.mvc.method.AbstractHandlerMe
> thodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
>
>
> Could you help fix the issue?
>
>
> *Cheers,*
>
> Archana Chillala
> Application Developer
> Email archa...@thoughtworks.com
> Telephone +91 9100960533 <+91+9100960533>
> [image: ThoughtWorks]
> 
>
> ___
> 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: 

Re: [Dhis2-devs] Approval levels are failing to save

2016-11-06 Thread Morten Olav Hansen
This should be fixed in 2.25/master now.

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

On Fri, Nov 4, 2016 at 11:45 PM, Jim Grace  wrote:

> This has recently been noticed and reported as a new bug at
> https://bugs.launchpad.net/dhis2/+bug/1638551. The problem is that an
> approval level cannot be saved without specifying a Category option group
> set -- which should be optional, not required. One workaround until this is
> fixed is that you can create an approval level with a category option group
> set, and then patch the approval level's categoryoptiongroupsetid field in
> the database to NULL. (Then clear the HIbernate cache or restart Tomcat.)
>
> Also note that the workflow field is missing from edit/create dataset in
> 2.25. This has been reported at https://bugs.launchpad.net/
> dhis2/+bug/1638553. Again, as a workaround you could patch the workflowid
> into the dataset record and then clear the HIbernate cache or restart
> Tomcat.
>
> Cheers,
> Jim
>
>
> On Fri, Nov 4, 2016 at 8:47 AM, Archana Chillala <
> archa...@thoughtworks.com> wrote:
>
>> Hi,
>>
>> We're using DHIS 2.25. In settings app, we have approvals. When we try to
>> create an Approval Level and try to save, he application throws a snack-bar
>> message saying "*Failed to save approval level*". Approval levels used
>> to get saved in earlier DHIS versions. Could you please look into it.
>>
>> Please find the screenshot attached.
>>
>>
>>
>> *Cheers,*
>>
>> Archana Chillala
>> Application Developer
>> Email archa...@thoughtworks.com
>> Telephone +91 9100960533 <+91+9100960533>
>> [image: ThoughtWorks]
>> 
>>
>> ___
>> 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
>>
>>
>
>
> --
> Jim Grace
> Core developer, DHIS 2
> HISP US Inc.
> 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
>
>
___
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] [Issue] Failing to Import Charts and Report Tables

2016-11-06 Thread Morten Olav Hansen
Hi Archana

I'm sorry I've been trying to reproduce this for a while now, but I have
not been able to. Are you importing these into a fresh database? or does it
already contain some metadata?

Are you able to share the database/payload where this is happening?

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

On Fri, Nov 4, 2016 at 6:13 PM, Archana Chillala 
wrote:

> Hi,
>
> We are using the latest version of DHIS 2.25 (build - 5e16867).
>
> We have created charts and report tables on data visualiser and pivot
> table apps respectively. However, metadata import fails for these two
> objects when we try to sync them from one DHIS instance to another. Please
> find the logs below.
>
>
> *Failing to Import Charts*
>
> * INFO  2016-11-03 12:15:46,836 (admin) Creating 1 object(s) of type Chart
> (DefaultObjectBundleService.java [http-bio-8080-exec-9])
> * *ERROR 2016-11-03 12:15:46,858 Exception occurred while trying to
> import the metadata. object references an unsaved transient instance - save
> the transient instance before flushing:
> org.hisp.dhis.dataelement.DataElement (MetadataSyncImportHandler.java
> [http-bio-8080-exec-9])*
> *org.hibernate.TransientObjectException: object references an unsaved
> transient instance - save the transient instance before flushing:
> org.hisp.dhis.dataelement.DataElement*
> at org.hibernate.engine.internal.ForeignKeys.
> getEntityIdentifierIfNotUnsaved(ForeignKeys.java:279)
> at org.hibernate.type.EntityType.getIdentifier(EntityType.java:455)
> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:281)
> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:291)
> at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:296)
> at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(
> AbstractEntityPersister.java:4126)
> at org.hibernate.event.internal.DefaultFlushEntityEventListene
> r.dirtyCheck(DefaultFlushEntityEventListener.java:528)
> at org.hibernate.event.internal.DefaultFlushEntityEventListene
> r.isUpdateNecessary(DefaultFlushEntityEventListener.java:215)
> at org.hibernate.event.internal.DefaultFlushEntityEventListene
> r.onFlushEntity(DefaultFlushEntityEventListener.java:142)
> at org.hibernate.event.internal.AbstractFlushingEventListener.
> flushEntities(AbstractFlushingEventListener.java:216)
> at org.hibernate.event.internal.AbstractFlushingEventListener.
> flushEverythingToExecutions(AbstractFlushingEventListener.java:85)
> at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(
> DefaultFlushEventListener.java:38)
> at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.
> commit(DefaultObjectBundleService.java:160)
> at sun.reflect.GeneratedMethodAccessor865.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:302)
> 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)
>
>
>
> *Failing to import Pivot Tables*
>
> * INFO  2016-11-03 12:18:55,718 (admin) Creating 1 object(s) of type
> ReportTable (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> * *ERROR 2016-11-03 12:18:55,722 Exception occurred while trying to
> import the metadata. object references an unsaved transient instance - save
> the transient instance before flushing:
> org.hisp.dhis.dataelement.DataElement (MetadataSyncImportHandler.java
> [http-bio-8080-exec-10])*
> *org.hibernate.TransientObjectException: object references an unsaved
> transient instance - save the transient instance before flushing:
> org.hisp.dhis.dataelement.DataElement*
> at org.hibernate.engine.internal.ForeignKeys.
> getEntityIdentifierIfNotUnsaved(ForeignKeys.java:279)
> at org.hibernate.type.EntityType.getIdentifier(EntityType.java:455)
> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:281)
> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:291)
> at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:296)
> at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(
> AbstractEntityPersister.java:4126)
> at org.hibernate.event.internal.DefaultFlushEntityEventListene
> 

Re: [Dhis2-devs] [Bug 1638551] Re: Category option group set should be optional for approval level

2016-11-06 Thread Jim Grace
It worked already in 2.24 and earlier. It was just a problem in 2.25 and
trunk.


On Sun, Nov 6, 2016 at 5:19 PM, Lars Helge Øverland  wrote:

> Great. Can we back-port to 2.24 as well?
>
>
> On Sun, Nov 6, 2016 at 6:52 AM, Morten Olav Hansen <
> 1638...@bugs.launchpad.net> wrote:
>
> > Should be fixed in 2.25 and master. This was happening due to non-
> > standard property mapping for dataApprovalLevel (which our schema
> > introspector didn't understand). So it was overriden with annotation
> > (@Property), it might have been a bit strict. Relaxed it down to not
> > required now.
> >
> > ** Changed in: dhis2
> >Status: New => Incomplete
> >
> > ** Changed in: dhis2
> >Status: Incomplete => Fix Committed
> >
> > --
> > You received this bug notification because you are a member of DHIS 2
> > developers, which is subscribed to DHIS.
> > https://bugs.launchpad.net/bugs/1638551
> >
> > Title:
> >   Category option group set should be optional for approval level
> >
> > Status in DHIS:
> >   Fix Committed
> >
> > Bug description:
> >   When creating a data approval level under Settings -> Approval in 2.25
> >   and trunk, a category option group set must be specified. This should
> >   be optional, as it was in 2.24 and earlier.
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/dhis2/+bug/1638551/+subscriptions
> >
> > ___
> > 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
> >
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1638551
>
> Title:
>   Category option group set should be optional for approval level
>
> Status in DHIS:
>   Fix Committed
>
> Bug description:
>   When creating a data approval level under Settings -> Approval in 2.25
>   and trunk, a category option group set must be specified. This should
>   be optional, as it was in 2.24 and earlier.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1638551/+subscriptions
>


-- 
Jim Grace
Core developer, DHIS 2
HISP US Inc.
http://www.dhis2.org 

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1638551

Title:
  Category option group set should be optional for approval level

Status in DHIS:
  Fix Committed

Bug description:
  When creating a data approval level under Settings -> Approval in 2.25
  and trunk, a category option group set must be specified. This should
  be optional, as it was in 2.24 and earlier.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1638551/+subscriptions

___
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 Metadata Sync error

2016-11-06 Thread Morten Olav Hansen
This should have been fixed now, please try it out and report back to us
(give our servers 30+ min to build a new war file)

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

On Mon, Nov 7, 2016 at 12:39 PM, Morten Olav Hansen 
wrote:

> Yeah, this is probably related to the same issues we are already
> investigating.
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Mon, Nov 7, 2016 at 12:32 PM, Aamer Mohammed 
> wrote:
>
>> Hi,
>>
>> As per the logs, metadata sync is failing in the importer phase when
>> trying to import metadata.
>> --
>>  * ERROR 2016-10-24 11:44:03,758 Exception occurred while trying to
>> import the metadata. object references an unsaved transient instance - save
>> the transient instance before flushing: org.hisp.dhis.dataelement.Data
>> Element
>> --
>> Morten, any suggestions regarding this.
>>
>>
>> Thanks
>> Aamer.
>>
>>
>> On Fri, Nov 4, 2016 at 8:22 PM, Francesco Palazzini <
>> francesco.palazz...@ehealthnigeria.org> wrote:
>>
>>> Hello DHIS team,
>>> we are trying the metadata sync feature but unfortunately it does not
>>> seem to work.
>>>
>>> Note: on our setup instance2 is going to sync from instance1
>>>
>>> What we tried so far:
>>> Case 1:
>>> - manually import metdata from a json file to instance1
>>> - upgrade instance1 running v2.22 to v2.24, everything went fine
>>> - create a 'metadata version' on instance1
>>> - configure instance2 to sync from instance1
>>> - trigger the sync with the 'sync now' button
>>>
>>> Case 2:
>>> - manually import metdata from a json file to instance1
>>> - upgrade instance1 running v2.22 to v2.24, everything went fine
>>> - save the dump of instance1's database
>>> - restore the dump of instance1's to instance2's database
>>> - create a 'metadata version' on instance1
>>> - configure instance2 to sync from instance1
>>> - trigger the sync with the 'sync now' button
>>>
>>> We were following this guide:
>>> https://dhis2.github.io/dhis2-docs/master/en/user/html/dataA
>>> dmin_metaDataSync.html
>>>
>>> On both cases the sync fails, error logs from instance2 attached.
>>>
>>> Any hint on how to get the metadata sync working?
>>>
>>> Thanks
>>>
>>> ___
>>> 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] [Dhis2-users] Set data approvals with dhis 2.23

2016-11-06 Thread Kamugunga Adolphe
Thank you Calle and Jim for your quick response,
Let me try it i will be back to you shortly,

Regards,

Adolphe

*Adolphe Kamugunga*
*MIS Technical Advisor*
Mobile: +250 788 740 578
Email:kaa...@gmail.com
Skype: ka.adolphe
 RWANDA


On 4 November 2016 at 18:02, Jim Grace  wrote:

> Hi Adolphe,
>
> Thank you for your report.
>
> *1. Workflows:*
>
> As you saw, when upgrading your database to include workflows, one
> workflow is created for each dataset for which approvals had been enabled.
> If you wish to approve/unapprove multiple datasets always together, you can
> reassign the dataset workflows so they refer to the same workflow. You can
> also change the name of a workflow if you wish.
>
> If this results in any unused workflows that you don't need any more, you
> can delete them after all their datasets have been reassigned, and after
> removing any approvals for them. (This last step can be done through the
> UI, or you may find it more practical to do this through a SQL script if
> there are many approvals for the workflow. If you do this through SQL, be
> sure to clear the Hibernate cache or restart Tomcat afterwards.)
>
> Note that in 2.23, under Reports, the Data Approval Report still asks you
> to select a dataset for approval. But what is actually approved is the
> workflow associated with the dataset for that org unit and period. This
> means that when you select other datasets using the same workflow, they
> will also be approved. Data will be locked for all dataset associated with
> that workflow. We will change the user interface in the future so that the
> workflow will be selected instead of the dataset, to make this clearer.
>
> *2. Levels:*
>
> Before you upgraded, did you have only one approval level defined -- at
> the Province level? If the upgrade left you with Province as the only
> approval level, then this would be my guess.
>
> Do you want approvals at only the Province level? In other words, data may
> be freely entered at any facility until approved at the Province level,
> which locks data entry for all facilities in the Province for that dataset
> and period? Then, if the data is unapproved at the Province level, data
> entry is allowed again for all facilities in that Province for that dataset
> and period? If this is true, then the workflow should be linked to only one
> approval level, at the Province level.
>
> If you have the workflow linked to multiple approval levels, then data
> must first be approved at the lowest of these levels, and it must be
> approved for every org unit at the lower level before it can be approved at
> the higher level. For example, if you have a workflow assigned to Province,
> Sub district and facilities levels, then you must approve every facilities
> in a sub district before you can approve the sub district. Then you must
> approve every sub district in the Province before you can approve the
> Province. If you haven't done all of this, then you will get the message
> "Waiting for lower levels to approve" when looking at the higher level.
> This should have functioned the same way in 2.20 (when approving by
> dataset) as in 2.23 (when approving by workflow.)
>
> *3. Data Locking:*
>
> You say that "after upgrading to 2.23,  the approval couldn't lock data
>  for reporting unit, rather it locks data for  upper levels excluding
> reporting facility. ie the data manager can still change data freely." I am
> so far unable to reproduce this. For example on
> https://play.dhis2.org/demo (running 2.25) I tried approving the dataset
> "Mortality < 5 years" for Serria Leone -> Bo -> Badjia for December 2016.
> (This approved the related workflow "Mortality < 5 years" for Badjia for
> Dec 2016.) I then went to data entry for the facility Ngelehun CHC under
> Badjia, and the data was locked for Mortality < 5 years, Dec 2016 (but not,
> for example for Nov 2016). I then created a data entry user with access to
> Ngelehun CHC only, and that user also could not enter data for Ngelehun
> CHC, Mortality < 5 years, December 2016.
>
> If you are still having trouble with this, please try one of the following:
>
> - See if you can reproduce the same kind of problem on
> https://play.dhis2.org/demo
>
> - Give a more detailed description of the problem and configuration so I
> can try better to reproduce it.
>
> - Give me access to a system where I can see the problem myself, if you
> can.
>
> Cheers,
> Jim
>
>
> On Fri, Nov 4, 2016 at 5:50 AM, Kamugunga Adolphe 
> wrote:
>
>> Hi
>>
>> We had HMIS system with 6 Org levels (National, Province, District, Sub
>> district, Sector,  facilities) running the version 2.20. The approval was
>> working fine, users at province level could  approve/ unapprove data  from
>> facilities of respective provinces. The constraints in this version was
>> that a person couldn't approve for individual reporting unit, it was done
>> once for all facilities under a province, but the it was working 

Re: [Dhis2-devs] Sharing on metadata import

2016-11-06 Thread Olav Poppe
Hi, I tried both with /api/metadata and the UI.

Olav


> 7. nov. 2016 kl. 07.07 skrev Morten Olav Hansen :
> 
> Hi Olav
> 
> Which endpoint did you use for this? /api/metadata or /api/24/metadata? (or 
> did you just use the UI)
> 
> -- 
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org 
> On Fri, Nov 4, 2016 at 3:59 PM, Olav Poppe  > wrote:
> Hi devs,
> I’m trying to import a new indicator (v2.24) with public access = none 
> ("") and user group access limited to one group. However, the 
> indicator gets imported with full public read/write access, and without the 
> user group sharing.
> 
> I also tried to export an indicator, modify name and sharing attributes, and 
> import it again. Update to name was saved, update to sharing was not. 
> Metadata example attached for reference.
> 
> Is this a bug, or am I missing something?
> 
> Regards
> Olav
> 
> 
> ___
> 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] [Issue] Failing to Import Charts and Report Tables

2016-11-06 Thread Morten Olav Hansen
Hi

I think most of these issues should have been resolved now, please try it
again...

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

On Mon, Nov 7, 2016 at 8:09 AM, Morten Olav Hansen  wrote:

> Hi Archana
>
> I'm sorry I've been trying to reproduce this for a while now, but I have
> not been able to. Are you importing these into a fresh database? or does it
> already contain some metadata?
>
> Are you able to share the database/payload where this is happening?
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Fri, Nov 4, 2016 at 6:13 PM, Archana Chillala <
> archa...@thoughtworks.com> wrote:
>
>> Hi,
>>
>> We are using the latest version of DHIS 2.25 (build - 5e16867).
>>
>> We have created charts and report tables on data visualiser and pivot
>> table apps respectively. However, metadata import fails for these two
>> objects when we try to sync them from one DHIS instance to another. Please
>> find the logs below.
>>
>>
>> *Failing to Import Charts*
>>
>> * INFO  2016-11-03 12:15:46,836 (admin) Creating 1 object(s) of type
>> Chart (DefaultObjectBundleService.java [http-bio-8080-exec-9])
>> * *ERROR 2016-11-03 12:15:46,858 Exception occurred while trying to
>> import the metadata. object references an unsaved transient instance - save
>> the transient instance before flushing:
>> org.hisp.dhis.dataelement.DataElement (MetadataSyncImportHandler.java
>> [http-bio-8080-exec-9])*
>> *org.hibernate.TransientObjectException: object references an unsaved
>> transient instance - save the transient instance before flushing:
>> org.hisp.dhis.dataelement.DataElement*
>> at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifie
>> rIfNotUnsaved(ForeignKeys.java:279)
>> at org.hibernate.type.EntityType.getIdentifier(EntityType.java:455)
>> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:281)
>> at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:291)
>> at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:296)
>> at org.hibernate.persister.entity.AbstractEntityPersister.findD
>> irty(AbstractEntityPersister.java:4126)
>> at org.hibernate.event.internal.DefaultFlushEntityEventListener
>> .dirtyCheck(DefaultFlushEntityEventListener.java:528)
>> at org.hibernate.event.internal.DefaultFlushEntityEventListener
>> .isUpdateNecessary(DefaultFlushEntityEventListener.java:215)
>> at org.hibernate.event.internal.DefaultFlushEntityEventListener
>> .onFlushEntity(DefaultFlushEntityEventListener.java:142)
>> at org.hibernate.event.internal.AbstractFlushingEventListener.f
>> lushEntities(AbstractFlushingEventListener.java:216)
>> at org.hibernate.event.internal.AbstractFlushingEventListener.f
>> lushEverythingToExecutions(AbstractFlushingEventListener.java:85)
>> at org.hibernate.event.internal.DefaultFlushEventListener.onFlu
>> sh(DefaultFlushEventListener.java:38)
>> at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
>> at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundle
>> Service.commit(DefaultObjectBundleService.java:160)
>> at sun.reflect.GeneratedMethodAccessor865.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:498)
>> at org.springframework.aop.support.AopUtils.invokeJoinpointUsin
>> gReflection(AopUtils.java:302)
>> 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.TransactionInter
>> ceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>> at org.springframework.transaction.interceptor.TransactionAspec
>> tSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
>> at org.springframework.transaction.interceptor.TransactionInter
>> ceptor.invoke(TransactionInterceptor.java:96)
>>
>>
>>
>> *Failing to import Pivot Tables*
>>
>> * INFO  2016-11-03 12:18:55,718 (admin) Creating 1 object(s) of type
>> ReportTable (DefaultObjectBundleService.java [http-bio-8080-exec-10])
>> * *ERROR 2016-11-03 12:18:55,722 Exception occurred while trying to
>> import the metadata. object references an unsaved transient instance - save
>> the transient instance before flushing:
>> org.hisp.dhis.dataelement.DataElement (MetadataSyncImportHandler.java
>> [http-bio-8080-exec-10])*
>> *org.hibernate.TransientObjectException: object references an unsaved
>> transient instance - save the transient instance before flushing:
>> org.hisp.dhis.dataelement.DataElement*
>> at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifie
>> rIfNotUnsaved(ForeignKeys.java:279)
>> at org.hibernate.type.EntityType.getIdentifier(EntityType.java:455)
>> at