[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13859: minor refactor in hibernate eventlistener
revno: 13859 committer: Morten Olav Hansen morte...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 15:02:13 +0700 message: minor refactor in hibernate eventlistener modified: dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java' --- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java 2014-01-27 05:23:09 + +++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java 2014-01-27 08:02:13 + @@ -32,6 +32,8 @@ import org.hibernate.SessionFactory; import org.hibernate.event.service.spi.EventListenerRegistry; import org.hibernate.event.spi.EventType; +import org.hibernate.event.spi.PostDeleteEvent; +import org.hibernate.event.spi.PostDeleteEventListener; import org.hibernate.event.spi.PostInsertEvent; import org.hibernate.event.spi.PostInsertEventListener; import org.hibernate.event.spi.PostUpdateEvent; @@ -65,92 +67,105 @@ private SetIdentifiableObject identifiableObjects = new HashSetIdentifiableObject(); @PostConstruct -@SuppressWarnings( unchecked ) public void registerListeners() { EventListenerRegistry registry = ((SessionFactoryImpl) sessionFactory).getServiceRegistry() .getService( EventListenerRegistry.class ); -registry.getEventListenerGroup( EventType.PRE_COLLECTION_UPDATE ).appendListener( new PreCollectionUpdateEventListener() -{ -@Override -public void onPreUpdateCollection( PreCollectionUpdateEvent event ) -{ -if ( event.getAffectedOwnerOrNull() != null ) -{ -if ( event.getAffectedOwnerOrNull() instanceof IdentifiableObject ) -{ -identifiableObjects.add( (IdentifiableObject) event.getAffectedOwnerOrNull() ); -} -} - -Object newValue = event.getCollection().getValue(); -Serializable oldValue = event.getCollection().getStoredSnapshot(); - -Collection newCol = new ArrayList(); -Collection oldCol = new ArrayList(); - -if ( Collection.class.isInstance( newValue ) ) -{ -newCol = new ArrayList( (Collection) newValue ); - -if ( !newCol.isEmpty() ) -{ -Object next = newCol.iterator().next(); - -if ( !(next instanceof IdentifiableObject) ) -{ -newCol = new ArrayList(); -} -} -} - -Map map = (Map) oldValue; - -for ( Object o : map.keySet() ) -{ -if ( o instanceof IdentifiableObject ) -{ -oldCol.add( o ); -} -} - -Collection removed = CollectionUtils.subtract( oldCol, newCol ); -Collection added = CollectionUtils.subtract( newCol, oldCol ); - -identifiableObjects.addAll( removed ); -identifiableObjects.addAll( added ); -} -} ); - -registry.getEventListenerGroup( EventType.POST_COMMIT_UPDATE ).appendListener( new PostUpdateEventListener() -{ -@Override -public void onPostUpdate( PostUpdateEvent event ) -{ -if ( identifiableObjects.isEmpty() ) -{ -return; -} - -// objectManager.update( new ArrayListIdentifiableObject( identifiableObjects ) ); -identifiableObjects.clear(); -} -} ); - -registry.getEventListenerGroup( EventType.POST_COMMIT_INSERT ).appendListener( new PostInsertEventListener() -{ -@Override -public void onPostInsert( PostInsertEvent event ) -{ -if ( identifiableObjects.isEmpty() ) -{ -return; -} - -// objectManager.update( new ArrayListIdentifiableObject( identifiableObjects ) ); -identifiableObjects.clear(); -} -} ); +registry.getEventListenerGroup( EventType.PRE_COLLECTION_UPDATE ).appendListener( preCollectionUpdateEventListener ); +
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13860: csd: minor NPE checks
revno: 13860 committer: Morten Olav Hansen morte...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 16:39:28 +0700 message: csd: minor NPE checks modified: dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java' --- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-27 07:48:42 + +++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-27 09:39:28 + @@ -287,12 +287,23 @@ for ( OrganisationUnitGroup organisationUnitGroup : organisationUnit.getGroups() ) { -if ( organisationUnitGroup.getGroupSet().getName().equals( FACILITY_STATUS_DISCRIMINATOR ) ) +if ( organisationUnitGroup == null ) +{ +continue; +} + +if ( organisationUnitGroup.getGroupSet() != null +organisationUnitGroup.getGroupSet().getName().equals( FACILITY_STATUS_DISCRIMINATOR ) ) { facilityStatus = organisationUnitGroup.getCode(); continue; } +if ( organisationUnitGroup.getCode() == null ) +{ +continue; +} + CodedType codedType = new CodedType(); codedType.setCode( organisationUnitGroup.getCode() ); ___ 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13861: csd: minor fix
revno: 13861 committer: Morten Olav Hansen morte...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 16:46:20 +0700 message: csd: minor fix modified: dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java' --- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-27 09:39:28 + +++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-27 09:46:20 + @@ -293,7 +293,7 @@ } if ( organisationUnitGroup.getGroupSet() != null -organisationUnitGroup.getGroupSet().getName().equals( FACILITY_STATUS_DISCRIMINATOR ) ) +FACILITY_STATUS_DISCRIMINATOR.equals( organisationUnitGroup.getGroupSet().getName() ) ) { facilityStatus = organisationUnitGroup.getCode(); continue; ___ 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13862: csd: don't set geocode if there are no valid coordinates
revno: 13862 committer: Morten Olav Hansen morte...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 16:53:53 +0700 message: csd: don't set geocode if there are no valid coordinates modified: dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java' --- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-27 09:46:20 + +++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-27 09:53:53 + @@ -363,12 +363,12 @@ geocode.setLongitude( coordinates.lng ); geocode.setLatitude( coordinates.lat ); + +facility.setGeocode( geocode ); } catch ( NumberFormatException ignored ) { } - -facility.setGeocode( geocode ); } Record record = new Record(); ___ 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13863: csd: Minor refactor names of strings
revno: 13863 committer: Bob Jolliffe bobjolli...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 10:01:17 + message: csd: Minor refactor names of strings modified: dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java' --- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-27 09:53:53 + +++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-27 10:01:17 + @@ -78,6 +78,7 @@ import java.util.Date; import java.util.List; import java.util.Map; +import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet; /** * @author Morten Olav Hansen morte...@gmail.com @@ -88,10 +89,14 @@ { private static final String SOAP_CONTENT_TYPE = application/soap+xml; -// Name of group -private static final String FACILITY_DISCRIMINATOR = Health Facility; - -private static final String FACILITY_STATUS_DISCRIMINATOR = Status; +// Name of group all facilities belong to +private static final String FACILITY_DISCRIMINATOR_GROUP = Health Facility; + +// groupset for status codelist - open, closed, etc +private static final String FACILITY_STATUS_GROUPSET = Status; + +// groupset for facility type codelist +private static final String FACILITY_TYPE_GROUPSET = Type; // - // Dependencies @@ -235,7 +240,7 @@ for ( OrganisationUnitGroup group : organisationUnit.getGroups() ) { -if ( group.getName().equals( FACILITY_DISCRIMINATOR ) ) +if ( group.getName().equals( FACILITY_DISCRIMINATOR_GROUP ) ) { isFacility = true; break; @@ -293,7 +298,7 @@ } if ( organisationUnitGroup.getGroupSet() != null -FACILITY_STATUS_DISCRIMINATOR.equals( organisationUnitGroup.getGroupSet().getName() ) ) +FACILITY_STATUS_GROUPSET.equals( organisationUnitGroup.getGroupSet().getName() ) ) { facilityStatus = organisationUnitGroup.getCode(); continue; ___ 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13864: minor bugfix in eventservice, properly handle new and completed event
revno: 13864 committer: Morten Olav Hansen morte...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 17:17:18 +0700 message: minor bugfix in eventservice, properly handle new and completed event modified: dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2014-01-24 08:41:50 + +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2014-01-27 10:17:18 + @@ -29,14 +29,8 @@ */ -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; import org.hisp.dhis.dxf2.events.person.Person; @@ -69,8 +63,13 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Set; /** * @author Morten Olav Hansen morte...@gmail.com @@ -719,7 +718,6 @@ ProgramStageInstance programStageInstance = new ProgramStageInstance(); updateProgramStageInstance( programStage, programInstance, organisationUnit, date, completed, coordinate, storedBy, programStageInstance ); -programStageInstanceService.addProgramStageInstance( programStageInstance ); return programStageInstance; } @@ -745,6 +743,11 @@ programStageInstance.setCompleted( completed ); +if ( programStageInstance.getId() == 0 ) +{ +programStageInstanceService.addProgramStageInstance( programStageInstance ); +} + if ( programStageInstance.isCompleted() ) { programStageInstance.setStatus( ProgramStageInstance.COMPLETED_STATUS ); ___ 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13865: minor fix
revno: 13865 committer: Morten Olav Hansen morte...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 17:31:33 +0700 message: minor fix modified: dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2014-01-27 10:17:18 + +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2014-01-27 10:31:33 + @@ -783,12 +783,12 @@ if ( programStageInstance == null ) { programStageInstance = createProgramStageInstance( programStage, programInstance, organisationUnit, -eventDate, EventStatus.COMPLETED.equals( event.getStatus() ), event.getCoordinate(), storedBy ); +eventDate, EventStatus.COMPLETED == event.getStatus(), event.getCoordinate(), storedBy ); } else { updateProgramStageInstance( programStage, programInstance, organisationUnit, eventDate, -EventStatus.COMPLETED.equals( event.getStatus() ), event.getCoordinate(), storedBy, +EventStatus.COMPLETED == event.getStatus(), event.getCoordinate(), storedBy, programStageInstance ); } ___ 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13866: csd: get codedType from the 'Type' orgunitgroupset
revno: 13866 committer: Bob Jolliffe bobjolli...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 10:46:25 + message: csd: get codedType from the 'Type' orgunitgroupset modified: dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java' --- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-27 10:01:17 + +++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-27 10:46:25 + @@ -304,28 +304,33 @@ continue; } -if ( organisationUnitGroup.getCode() == null ) -{ -continue; -} - -CodedType codedType = new CodedType(); -codedType.setCode( organisationUnitGroup.getCode() ); - -codedType.setCodingSchema( Unknown ); - -for ( AttributeValue attributeValue : organisationUnitGroup.getAttributeValues() ) -{ -if ( attributeValue.getAttribute().getName().equals( code_system ) ) -{ -codedType.setCodingSchema( attributeValue.getValue() ); -break; -} -} - -codedType.setValue( organisationUnitGroup.getDisplayName() ); - -facility.getCodedTypes().add( codedType ); + +if ( organisationUnitGroup.getGroupSet() != null +FACILITY_TYPE_GROUPSET.equals( organisationUnitGroup.getGroupSet().getName() ) ) +{ +if ( organisationUnitGroup.getCode() == null ) +{ +continue; +} + +CodedType codedType = new CodedType(); +codedType.setCode( organisationUnitGroup.getCode() ); + +codedType.setCodingSchema( Unknown ); + +for ( AttributeValue attributeValue : organisationUnitGroup.getAttributeValues() ) +{ +if ( attributeValue.getAttribute().getName().equals( code_system ) ) +{ +codedType.setCodingSchema( attributeValue.getValue() ); +break; +} +} + +codedType.setValue( organisationUnitGroup.getDisplayName() ); + +facility.getCodedTypes().add( codedType ); +} } Organization organization = new Organization( No oid, please provide organisation_oid attribute value. ); ___ 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13867: Minor
revno: 13867 committer: Lars Helge Øverland larshe...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 13:37:07 +0200 message: Minor modified: dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserGrid.vm -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserGrid.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserGrid.vm 2014-01-25 14:05:26 + +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserGrid.vm 2014-01-27 11:37:07 + @@ -12,21 +12,21 @@ .menuDropDownBox li { - cursor:pointer + cursor:pointer } .menuDropDownBox li:hover { - text-decoration: none; - background-color: #4A89BA; + text-decoration: none; + background-color: #4A89BA; } /style script type=text/javascript jQuery( document ).ready( function() { - setTableStyles(); - loadListeners(); + setTableStyles(); + loadListeners(); } ); /script @@ -61,8 +61,8 @@ #foreach( $item in $list ) td style=min-width:80px;text-align:right title=$title -#if ( $!item == 0 )span style=color:red;font-weight:bold;$!item/span -#elsespan style=color:blue;font-weight:bold;$!item/span#end +#if ( $!item == 0 )span class=bold style=color:red$!item/span +#elsespan class=bold style=color:blue;$!item/span#end /td #end /tr ___ 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13869: HibernateEventListenerWiring, parameterizing collections
revno: 13869 committer: Lars Helge Øverland larshe...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 13:46:11 +0200 message: HibernateEventListenerWiring, parameterizing collections modified: dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java' --- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java 2014-01-27 08:02:13 + +++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java 2014-01-27 11:46:11 + @@ -95,12 +95,12 @@ Object newValue = event.getCollection().getValue(); Serializable oldValue = event.getCollection().getStoredSnapshot(); -Collection newCol = new ArrayList(); -Collection oldCol = new ArrayList(); +CollectionObject newCol = new ArrayListObject(); +CollectionObject oldCol = new ArrayListObject(); if ( Collection.class.isInstance( newValue ) ) { -newCol = new ArrayList( (Collection) newValue ); +newCol = new ArrayListObject( (CollectionObject) newValue ); if ( !newCol.isEmpty() ) { @@ -108,12 +108,12 @@ if ( !(next instanceof IdentifiableObject) ) { -newCol = new ArrayList(); +newCol = new ArrayListObject(); } } } -Map map = (Map) oldValue; +Map?,? map = (Map?,?) oldValue; for ( Object o : map.keySet() ) { @@ -123,8 +123,8 @@ } } -Collection removed = CollectionUtils.subtract( oldCol, newCol ); -Collection added = CollectionUtils.subtract( newCol, oldCol ); +Collection? extends IdentifiableObject removed = CollectionUtils.subtract( oldCol, newCol ); +Collection? extends IdentifiableObject added = CollectionUtils.subtract( newCol, oldCol ); identifiableObjects.addAll( removed ); identifiableObjects.addAll( added ); ___ 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13868: Commented out hibernateEntityInterceptorWiring. It can't be located in dhis-support-hibernate sin...
revno: 13868 committer: Lars Helge Øverland larshe...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 13:38:08 +0200 message: Commented out hibernateEntityInterceptorWiring. It can't be located in dhis-support-hibernate since it depends on IdentifiableObjectManager which is located in dhis-service-core. modified: dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml 2014-01-27 04:59:20 + +++ dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml 2014-01-27 11:38:08 + @@ -42,8 +42,10 @@ property name=hibernateConfigurationProvider ref=hibernateConfigurationProvider / /bean + !-- bean id=hibernateEntityInterceptorWiring class=org.hisp.dhis.hibernate.HibernateEventListenerWiring / - + -- + bean id=sessionFactory class=org.springframework.orm.hibernate4.LocalSessionFactoryBean property name=dataSource ref=dataSource / property name=hibernateProperties ref=hibernateProperties / ___ 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] Send notification once dataset is complete
Hi Prosper, these are two separate, individual settings, the way it works: Complete notification recipients: Sends message to the specified user group Send notification to completing user: Sends message to the user which completes the form I just double-checked on the demo and it works well there. Now I remember that you have reported that messages get sent to unexpected recipients earlier on the Uganda database, so there might be something weird with that db. Can you double check that the user group you have defined as recipients contains only a limited set of users ? regards, Lars On Mon, Jan 27, 2014 at 7:52 AM, Prosper BT ptb3...@gmail.com wrote: Dear Dev team, Thanks for the great work, just wanted to get some clarification on this functionality. When you create a group and turn on Receive notification - Complete notification recipients; after dataset completion in edit dataset, as if the notification is also sent to the person completing the dataset. Is this right and if so is there an option to turn it off for the user completing the dataset if they dont wish to receive the notification?, Otherwise it seem to be sending so many messages to the entrants and they end up missing important DHIS2 messages. Regards -- Prosper Behumbiize, MPH Phone:+256 414 320076 Cell: +256 772 139037 +256 752 751776 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13871: Improve performance on org unit selection during login
revno: 13871 committer: Lars Helge Øverland larshe...@gmail.com branch nick: dhis2 timestamp: Mon 2014-01-27 19:21:37 +0200 message: Improve performance on org unit selection during login modified: dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java 2013-09-09 08:02:21 + +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java 2014-01-27 17:21:37 + @@ -300,6 +300,7 @@ if ( rootUnits.contains( selectedUnit ) ) { unitsInTree.add( selectedUnit ); +continue; } OrganisationUnit parent = selectedUnit.getParent(); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java 2013-08-23 16:05:01 + +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java 2014-01-27 17:21:37 + @@ -133,8 +133,7 @@ } // - -// Reload the units to ensure it is loaded within the current -// transaction +// Reload the units to ensure it is loaded within the current session // - CollectionOrganisationUnit reloadedSelectedUnits = reloadOrganisationUnits( selectedUnits ); @@ -259,6 +258,7 @@ if ( rootUnits.contains( selectedUnit ) ) { unitsInTree.add( selectedUnit ); +continue; } OrganisationUnit parent = selectedUnit.getParent(); ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Upgrading from 2.6
I just upgraded from 2.13 to 2.14 and got this. Anything to be worried about? Regards, jason * INFO 2014-01-27 19:41:42,637 Hibernate configuration loaded, using dialect: org.hibernate.dialect.PostgreSQLDialect (DefaultHibernateConfigurationProvider.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,475 HHH000388: Unsuccessful: alter table datavalue add column attributeoptioncomboid int4 not null (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,476 ERROR: column attributeoptioncomboid contains null values (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,676 HHH000388: Unsuccessful: alter table datavalue add constraint fk_datavalue_attributeoptioncomboid foreign key (attributeoptioncomboid) references categoryoptioncombo (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,677 ERROR: column attributeoptioncomboid referenced in foreign key constraint does not exist (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,681 HHH000388: Unsuccessful: alter table datavalue_audit add constraint fk_datavalueaudit_datavalue foreign key (dataelementid, periodid, sourceid, categoryoptioncomboid, attributeoptioncomboid) references datavalue (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,688 ERROR: constraint fk_datavalueaudit_datavalue for relation datavalue_audit already exists (SchemaUpdate.java [pool-2-thread-1]) * INFO 2014-01-27 19:42:19,583 Found the following message senders: [org.hisp.dhis.message.EmailMessageSender@142499c, org.hisp.dhis.sms.SmsMessageSender@eed8ce] (DefaultMessageService.java [pool-2-thread-1]) On Mon, Jan 20, 2014 at 10:23 PM, Lars Helge Øverland larshe...@gmail.comwrote: Hi Jason, had a quick look. It seems the issue is that we have multiple startup routines, in this case first one DataElementDefaultDimensionPopulator that populates the default dimensional categories, then the TableAlteror which adds the new columns for dataelementcategory called datadimensions. Now the problem is that the TableAlteror depends on the DataElementDefaultDimensionPopulator to have run earlier, and in this case, the DataElementDefaultDimensionPopulator depends on the TableAlteror to have run earlier. So fixing it would require us to start splitting up the TableAlteror. This problem will not surfeace unless upgrading from very old versions, or from deleting the default categories. We could look into it later. Your queries will fix the problem. I would have thrown in a check to avoid overwriting existing rows to be on the safe side: UPDATE dataelementcategory set datadimension=FALSE where datadimension IS NULL; cheers Lars On Mon, Jan 20, 2014 at 3:57 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Looks like there maybe something missing in the startup scripts. After this.. UPDATE dataelementcategory set datadimension=FALSE; UPDATE dataelementcategory set dimensiontype='disaggregation'; UPDATE categorycombo set skiptotal = FALSE; Things seemed to work. Regards, Jason On Mon, Jan 20, 2014 at 4:36 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Hi there. Attempting to upgrade a rather old version of DHIS2 (versoin 2.6) and running into some issues, not surprisingly. I guess maybe upgrading to 2.14 might be too much to ask in one go, so maybe some advice there would be useful. Anyway, here is what I am getting from the latest 2.14. Any help appreciated. Regards, Jason Jan 20, 2014 2:32:06 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /home/dhis/tomcat/webapps/dhis.war * INFO 2014-01-20 14:32:16,689 System property dhis2.home not set (DefaultLocationManager.java [pool-2-thread-1]) * INFO 2014-01-20 14:32:16,694 Environment variable DHIS2_HOME points to /home/dhis/dhis_home (DefaultLocationManager.java [pool-2-thread-1]) * INFO 2014-01-20 14:32:19,018 Hibernate configuration loaded, using dialect: org.hibernate.dialect.PostgreSQLDialect (DefaultHibernateConfigurationProvider.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,492 HHH000388: Unsuccessful: alter table datavalue_audit add constraint fk_datavalueaudit_datavalue foreign key (dataelementid, periodid, sourceid, categoryoptioncomboid, attributeoptioncomboid) references datavalue (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,494 ERROR: constraint fk_datavalueaudit_datavalue for relation datavalue_audit already exists (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,499 HHH000388: Unsuccessful: alter table mapview add constraint fk_mapview_maplegendsetid foreign key (legendsetid) references maplegendset (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,500 ERROR: constraint fk_mapview_maplegendsetid for relation mapview already exists (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,504 HHH000388: Unsuccessful: alter table validationrulegroupmembers add
Re: [Dhis2-devs] Upgrading from 2.6
Can you try to stop and restart again and see if it goes away? Lars On Mon, Jan 27, 2014 at 7:44 PM, Jason Pickering jason.p.picker...@gmail.com wrote: I just upgraded from 2.13 to 2.14 and got this. Anything to be worried about? Regards, jason * INFO 2014-01-27 19:41:42,637 Hibernate configuration loaded, using dialect: org.hibernate.dialect.PostgreSQLDialect (DefaultHibernateConfigurationProvider.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,475 HHH000388: Unsuccessful: alter table datavalue add column attributeoptioncomboid int4 not null (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,476 ERROR: column attributeoptioncomboid contains null values (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,676 HHH000388: Unsuccessful: alter table datavalue add constraint fk_datavalue_attributeoptioncomboid foreign key (attributeoptioncomboid) references categoryoptioncombo (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,677 ERROR: column attributeoptioncomboid referenced in foreign key constraint does not exist (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,681 HHH000388: Unsuccessful: alter table datavalue_audit add constraint fk_datavalueaudit_datavalue foreign key (dataelementid, periodid, sourceid, categoryoptioncomboid, attributeoptioncomboid) references datavalue (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,688 ERROR: constraint fk_datavalueaudit_datavalue for relation datavalue_audit already exists (SchemaUpdate.java [pool-2-thread-1]) * INFO 2014-01-27 19:42:19,583 Found the following message senders: [org.hisp.dhis.message.EmailMessageSender@142499c, org.hisp.dhis.sms.SmsMessageSender@eed8ce] (DefaultMessageService.java [pool-2-thread-1]) On Mon, Jan 20, 2014 at 10:23 PM, Lars Helge Øverland larshe...@gmail.com wrote: Hi Jason, had a quick look. It seems the issue is that we have multiple startup routines, in this case first one DataElementDefaultDimensionPopulator that populates the default dimensional categories, then the TableAlteror which adds the new columns for dataelementcategory called datadimensions. Now the problem is that the TableAlteror depends on the DataElementDefaultDimensionPopulator to have run earlier, and in this case, the DataElementDefaultDimensionPopulator depends on the TableAlteror to have run earlier. So fixing it would require us to start splitting up the TableAlteror. This problem will not surfeace unless upgrading from very old versions, or from deleting the default categories. We could look into it later. Your queries will fix the problem. I would have thrown in a check to avoid overwriting existing rows to be on the safe side: UPDATE dataelementcategory set datadimension=FALSE where datadimension IS NULL; cheers Lars On Mon, Jan 20, 2014 at 3:57 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Looks like there maybe something missing in the startup scripts. After this.. UPDATE dataelementcategory set datadimension=FALSE; UPDATE dataelementcategory set dimensiontype='disaggregation'; UPDATE categorycombo set skiptotal = FALSE; Things seemed to work. Regards, Jason On Mon, Jan 20, 2014 at 4:36 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Hi there. Attempting to upgrade a rather old version of DHIS2 (versoin 2.6) and running into some issues, not surprisingly. I guess maybe upgrading to 2.14 might be too much to ask in one go, so maybe some advice there would be useful. Anyway, here is what I am getting from the latest 2.14. Any help appreciated. Regards, Jason Jan 20, 2014 2:32:06 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /home/dhis/tomcat/webapps/dhis.war * INFO 2014-01-20 14:32:16,689 System property dhis2.home not set (DefaultLocationManager.java [pool-2-thread-1]) * INFO 2014-01-20 14:32:16,694 Environment variable DHIS2_HOME points to /home/dhis/dhis_home (DefaultLocationManager.java [pool-2-thread-1]) * INFO 2014-01-20 14:32:19,018 Hibernate configuration loaded, using dialect: org.hibernate.dialect.PostgreSQLDialect (DefaultHibernateConfigurationProvider.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,492 HHH000388: Unsuccessful: alter table datavalue_audit add constraint fk_datavalueaudit_datavalue foreign key (dataelementid, periodid, sourceid, categoryoptioncomboid, attributeoptioncomboid) references datavalue (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,494 ERROR: constraint fk_datavalueaudit_datavalue for relation datavalue_audit already exists (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,499 HHH000388: Unsuccessful: alter table mapview add constraint fk_mapview_maplegendsetid foreign key (legendsetid) references maplegendset (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,500 ERROR: constraint
[Dhis2-devs] [Bug 1273379] [NEW] war file download from stable link not updated
Public bug reported: Just downloaded a war file from the stable.dhis2.org link. It is not pointing to the most current version. It's important to check this out because I think the fix for analytics tables was implemented after this build. Thanks Version: 2.14 Build revision: 13726 Build date: 2014-01-20 21:20 ** Affects: dhis2 Importance: Undecided Status: New -- You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. https://bugs.launchpad.net/bugs/1273379 Title: war file download from stable link not updated Status in DHIS 2: New Bug description: Just downloaded a war file from the stable.dhis2.org link. It is not pointing to the most current version. It's important to check this out because I think the fix for analytics tables was implemented after this build. Thanks Version: 2.14 Build revision: 13726 Build date: 2014-01-20 21:20 To manage notifications about this bug go to: https://bugs.launchpad.net/dhis2/+bug/1273379/+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] Upgrading from 2.6
Yup. Seems to go away after kill/restart. On Mon, Jan 27, 2014 at 8:00 PM, Lars Helge Øverland larshe...@gmail.comwrote: Can you try to stop and restart again and see if it goes away? Lars On Mon, Jan 27, 2014 at 7:44 PM, Jason Pickering jason.p.picker...@gmail.com wrote: I just upgraded from 2.13 to 2.14 and got this. Anything to be worried about? Regards, jason * INFO 2014-01-27 19:41:42,637 Hibernate configuration loaded, using dialect: org.hibernate.dialect.PostgreSQLDialect (DefaultHibernateConfigurationProvider.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,475 HHH000388: Unsuccessful: alter table datavalue add column attributeoptioncomboid int4 not null (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,476 ERROR: column attributeoptioncomboid contains null values (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,676 HHH000388: Unsuccessful: alter table datavalue add constraint fk_datavalue_attributeoptioncomboid foreign key (attributeoptioncomboid) references categoryoptioncombo (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,677 ERROR: column attributeoptioncomboid referenced in foreign key constraint does not exist (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,681 HHH000388: Unsuccessful: alter table datavalue_audit add constraint fk_datavalueaudit_datavalue foreign key (dataelementid, periodid, sourceid, categoryoptioncomboid, attributeoptioncomboid) references datavalue (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,688 ERROR: constraint fk_datavalueaudit_datavalue for relation datavalue_audit already exists (SchemaUpdate.java [pool-2-thread-1]) * INFO 2014-01-27 19:42:19,583 Found the following message senders: [org.hisp.dhis.message.EmailMessageSender@142499c, org.hisp.dhis.sms.SmsMessageSender@eed8ce] (DefaultMessageService.java [pool-2-thread-1]) On Mon, Jan 20, 2014 at 10:23 PM, Lars Helge Øverland larshe...@gmail.com wrote: Hi Jason, had a quick look. It seems the issue is that we have multiple startup routines, in this case first one DataElementDefaultDimensionPopulator that populates the default dimensional categories, then the TableAlteror which adds the new columns for dataelementcategory called datadimensions. Now the problem is that the TableAlteror depends on the DataElementDefaultDimensionPopulator to have run earlier, and in this case, the DataElementDefaultDimensionPopulator depends on the TableAlteror to have run earlier. So fixing it would require us to start splitting up the TableAlteror. This problem will not surfeace unless upgrading from very old versions, or from deleting the default categories. We could look into it later. Your queries will fix the problem. I would have thrown in a check to avoid overwriting existing rows to be on the safe side: UPDATE dataelementcategory set datadimension=FALSE where datadimension IS NULL; cheers Lars On Mon, Jan 20, 2014 at 3:57 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Looks like there maybe something missing in the startup scripts. After this.. UPDATE dataelementcategory set datadimension=FALSE; UPDATE dataelementcategory set dimensiontype='disaggregation'; UPDATE categorycombo set skiptotal = FALSE; Things seemed to work. Regards, Jason On Mon, Jan 20, 2014 at 4:36 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Hi there. Attempting to upgrade a rather old version of DHIS2 (versoin 2.6) and running into some issues, not surprisingly. I guess maybe upgrading to 2.14 might be too much to ask in one go, so maybe some advice there would be useful. Anyway, here is what I am getting from the latest 2.14. Any help appreciated. Regards, Jason Jan 20, 2014 2:32:06 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /home/dhis/tomcat/webapps/dhis.war * INFO 2014-01-20 14:32:16,689 System property dhis2.home not set (DefaultLocationManager.java [pool-2-thread-1]) * INFO 2014-01-20 14:32:16,694 Environment variable DHIS2_HOME points to /home/dhis/dhis_home (DefaultLocationManager.java [pool-2-thread-1]) * INFO 2014-01-20 14:32:19,018 Hibernate configuration loaded, using dialect: org.hibernate.dialect.PostgreSQLDialect (DefaultHibernateConfigurationProvider.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,492 HHH000388: Unsuccessful: alter table datavalue_audit add constraint fk_datavalueaudit_datavalue foreign key (dataelementid, periodid, sourceid, categoryoptioncomboid, attributeoptioncomboid) references datavalue (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,494 ERROR: constraint fk_datavalueaudit_datavalue for relation datavalue_audit already exists (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,499 HHH000388: Unsuccessful: alter table mapview add constraint fk_mapview_maplegendsetid foreign key
Re: [Dhis2-devs] Upgrading from 2.6
Good. Problem is that 2.14 changes the primary on datavalue which will fail with nulls in a not-null column, and hibernate tries to perform the schema change before the dhis startup scripts get a chance to run. So next time you start the update has been taken care of. On Mon, Jan 27, 2014 at 9:12 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Yup. Seems to go away after kill/restart. On Mon, Jan 27, 2014 at 8:00 PM, Lars Helge Øverland larshe...@gmail.comwrote: Can you try to stop and restart again and see if it goes away? Lars On Mon, Jan 27, 2014 at 7:44 PM, Jason Pickering jason.p.picker...@gmail.com wrote: I just upgraded from 2.13 to 2.14 and got this. Anything to be worried about? Regards, jason * INFO 2014-01-27 19:41:42,637 Hibernate configuration loaded, using dialect: org.hibernate.dialect.PostgreSQLDialect (DefaultHibernateConfigurationProvider.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,475 HHH000388: Unsuccessful: alter table datavalue add column attributeoptioncomboid int4 not null (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,476 ERROR: column attributeoptioncomboid contains null values (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,676 HHH000388: Unsuccessful: alter table datavalue add constraint fk_datavalue_attributeoptioncomboid foreign key (attributeoptioncomboid) references categoryoptioncombo (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,677 ERROR: column attributeoptioncomboid referenced in foreign key constraint does not exist (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,681 HHH000388: Unsuccessful: alter table datavalue_audit add constraint fk_datavalueaudit_datavalue foreign key (dataelementid, periodid, sourceid, categoryoptioncomboid, attributeoptioncomboid) references datavalue (SchemaUpdate.java [pool-2-thread-1]) * ERROR 2014-01-27 19:42:01,688 ERROR: constraint fk_datavalueaudit_datavalue for relation datavalue_audit already exists (SchemaUpdate.java [pool-2-thread-1]) * INFO 2014-01-27 19:42:19,583 Found the following message senders: [org.hisp.dhis.message.EmailMessageSender@142499c, org.hisp.dhis.sms.SmsMessageSender@eed8ce] (DefaultMessageService.java [pool-2-thread-1]) On Mon, Jan 20, 2014 at 10:23 PM, Lars Helge Øverland larshe...@gmail.com wrote: Hi Jason, had a quick look. It seems the issue is that we have multiple startup routines, in this case first one DataElementDefaultDimensionPopulator that populates the default dimensional categories, then the TableAlteror which adds the new columns for dataelementcategory called datadimensions. Now the problem is that the TableAlteror depends on the DataElementDefaultDimensionPopulator to have run earlier, and in this case, the DataElementDefaultDimensionPopulator depends on the TableAlteror to have run earlier. So fixing it would require us to start splitting up the TableAlteror. This problem will not surfeace unless upgrading from very old versions, or from deleting the default categories. We could look into it later. Your queries will fix the problem. I would have thrown in a check to avoid overwriting existing rows to be on the safe side: UPDATE dataelementcategory set datadimension=FALSE where datadimension IS NULL; cheers Lars On Mon, Jan 20, 2014 at 3:57 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Looks like there maybe something missing in the startup scripts. After this.. UPDATE dataelementcategory set datadimension=FALSE; UPDATE dataelementcategory set dimensiontype='disaggregation'; UPDATE categorycombo set skiptotal = FALSE; Things seemed to work. Regards, Jason On Mon, Jan 20, 2014 at 4:36 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Hi there. Attempting to upgrade a rather old version of DHIS2 (versoin 2.6) and running into some issues, not surprisingly. I guess maybe upgrading to 2.14 might be too much to ask in one go, so maybe some advice there would be useful. Anyway, here is what I am getting from the latest 2.14. Any help appreciated. Regards, Jason Jan 20, 2014 2:32:06 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /home/dhis/tomcat/webapps/dhis.war * INFO 2014-01-20 14:32:16,689 System property dhis2.home not set (DefaultLocationManager.java [pool-2-thread-1]) * INFO 2014-01-20 14:32:16,694 Environment variable DHIS2_HOME points to /home/dhis/dhis_home (DefaultLocationManager.java [pool-2-thread-1]) * INFO 2014-01-20 14:32:19,018 Hibernate configuration loaded, using dialect: org.hibernate.dialect.PostgreSQLDialect (DefaultHibernateConfigurationProvider.java [pool-2-thread-1]) * ERROR 2014-01-20 14:32:39,492 HHH000388: Unsuccessful: alter table datavalue_audit add constraint fk_datavalueaudit_datavalue foreign key (dataelementid, periodid, sourceid, categoryoptioncomboid, attributeoptioncomboid)
Re: [Dhis2-devs] OpenMRS to DHIS2
Hi Edwin, I dont know about a tool to automate. but there is a dhis connector module in hisp india which enables data transfer through a report generation regards awanthika On Mon, Jan 27, 2014 at 11:57 AM, Edwin Mulwa eddi...@gmail.com wrote: Hi All, Is there a tool/module that automates data transfer from OpenMRS to DHIS2? I need such a tool for some work that I am doing. Thanks. Edwin ___ 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 -- *---* *AWANTHIKA SENARATH* *Undergraduate* *Department of Electronics and Telecommunication Engineering* *University of Moratuwa* ___ 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13872: move HibernateEventListenerWiring to service-core
revno: 13872 committer: Morten Olav Hansen morte...@gmail.com branch nick: dhis2 timestamp: Tue 2014-01-28 11:23:09 +0700 message: move HibernateEventListenerWiring to service-core removed: dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java added: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java modified: dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === added file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java 1970-01-01 00:00:00 + +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java 2014-01-28 04:23:09 + @@ -0,0 +1,171 @@ +package org.hisp.dhis.hibernate; + +/* + * Copyright (c) 2004-2013, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import org.apache.commons.collections.CollectionUtils; +import org.hibernate.SessionFactory; +import org.hibernate.event.service.spi.EventListenerRegistry; +import org.hibernate.event.spi.EventType; +import org.hibernate.event.spi.PostDeleteEvent; +import org.hibernate.event.spi.PostDeleteEventListener; +import org.hibernate.event.spi.PostInsertEvent; +import org.hibernate.event.spi.PostInsertEventListener; +import org.hibernate.event.spi.PostUpdateEvent; +import org.hibernate.event.spi.PostUpdateEventListener; +import org.hibernate.event.spi.PreCollectionUpdateEvent; +import org.hibernate.event.spi.PreCollectionUpdateEventListener; +import org.hibernate.internal.SessionFactoryImpl; +import org.hisp.dhis.common.IdentifiableObject; +import org.hisp.dhis.common.IdentifiableObjectManager; +import org.springframework.beans.factory.annotation.Autowired; + +import javax.annotation.PostConstruct; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +/** + * @author Morten Olav Hansen morte...@gmail.com + */ +public class HibernateEventListenerWiring +{ +@Autowired +private SessionFactory sessionFactory; + +@Autowired +private IdentifiableObjectManager objectManager; + +private SetIdentifiableObject identifiableObjects = new HashSetIdentifiableObject(); + +@PostConstruct +public void registerListeners() +{ +EventListenerRegistry registry = ((SessionFactoryImpl) sessionFactory).getServiceRegistry() +.getService( EventListenerRegistry.class ); + +registry.getEventListenerGroup( EventType.PRE_COLLECTION_UPDATE ).appendListener( preCollectionUpdateEventListener ); +registry.getEventListenerGroup( EventType.POST_COMMIT_UPDATE ).appendListener( postUpdateEventListener ); +registry.getEventListenerGroup( EventType.POST_COMMIT_INSERT ).appendListener( postInsertEventListener ); +registry.getEventListenerGroup(
Re: [Dhis2-devs] OpenMRS to DHIS2
Thanks Awanthika, Any idea how this module works? I ideally would like a tool that has the flexibility to allow a user to choose a custom report from OpenMRS, be able to select some or all fields from the report and map it to data elements from DHIS and then transfer the selected report data to DHIS. Edwin On Tue, Jan 28, 2014 at 7:11 AM, awanth sen wnthksn...@gmail.com wrote: Hi Edwin, I dont know about a tool to automate. but there is a dhis connector module in hisp india which enables data transfer through a report generation regards awanthika On Mon, Jan 27, 2014 at 11:57 AM, Edwin Mulwa eddi...@gmail.com wrote: Hi All, Is there a tool/module that automates data transfer from OpenMRS to DHIS2? I need such a tool for some work that I am doing. Thanks. Edwin ___ 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 -- *---* *AWANTHIKA SENARATH* *Undergraduate* *Department of Electronics and Telecommunication Engineering* *University of Moratuwa* ___ 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] OpenMRS to DHIS2
Hi Thai, I would like to transfer different types of data from time to time based on user's needs, without having to always write a custom script every time a user's report needs changes. So, in the ideal scenario, the user would create the reporting structure in DHIS based on an existing report in OpenMRS and then using this tool, would map fields from the OpenMRS report to the reporting data elements in DHIS and then execute a data transfer. Should there be a need to add/remove fields in the future, the user should be able to use this tool to just add or remove the necessary mapping for the data transfer. Edwin On Tue, Jan 28, 2014 at 7:57 AM, Thái Chương thaichuong...@gmail.comwrote: Hi Edwin, Which data are you going to transfer? I think you can make a automatic script to use DHIS2 webapi. It's strong! You can also reference the module as awanthika said. 2014-01-28 awanth sen wnthksn...@gmail.com Hi Edwin, I dont know about a tool to automate. but there is a dhis connector module in hisp india which enables data transfer through a report generation regards awanthika On Mon, Jan 27, 2014 at 11:57 AM, Edwin Mulwa eddi...@gmail.com wrote: Hi All, Is there a tool/module that automates data transfer from OpenMRS to DHIS2? I need such a tool for some work that I am doing. Thanks. Edwin ___ 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 -- *---* *AWANTHIKA SENARATH* *Undergraduate* *Department of Electronics and Telecommunication Engineering* *University of Moratuwa* ___ 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 -- Thai Chuong HCMUT - Computer science and engineering Faculty Website: http://thuytruc.net YM/Skype : thaichuong159 Email: thaichuong...@gmail.com Phone: (+84) 918776134 ___ 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] OpenMRS to DHIS2
Currently I don't think that we have a tool for mapping between openMRS report and DHIS2 report. But the module which awanth and Mohammad Ullah said can collect data from openMRS (by sql queries) and transfer to a dataset in DHIS2. And It's not automatic. It should give you some ideas 2014-01-28 Mohammad Ullah munnab...@gmail.com Hi Edwin, Follow the document attached here which describes how to transfer data from openmrs to dhis2 using the DHIS2 reporting module. This is an example from Community Health Information Tracking System (CHITS). Christine ceblano is an expert on this topics as she has done this for Philippine. On Mon, Jan 27, 2014 at 12:27 PM, Edwin Mulwa eddi...@gmail.com wrote: Hi All, Is there a tool/module that automates data transfer from OpenMRS to DHIS2? I need such a tool for some work that I am doing. Thanks. Edwin ___ 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 -- *Mohammad Ullah* *Technical Advisor - HIS* Priority Area - Health Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh *Office location:* Room # 304, Shahid Dr. Milan Bhavan, Management Information System (MIS) Directorate General of Health Services of MoHFW, Mohakhali, Dhaka-1212, Bangladesh T. +880 (0) 8816459, 8816412 Ext:118 M. +88 0196 3156 988 Web. http://lnkd.in/gQrxXz E mohammad.ul...@giz.dehttps://owa.giz.de/owa/redir.aspx?C=661025cce79c464e8b9012e928442ab5URL=mailto%3amohammad.ullah%40giz.de, munnab...@gmail.com *Skype : mohammad_ullah_giz* -- Thai Chuong HCMUT - Computer science and engineering Faculty Website: http://thuytruc.net YM/Skype : thaichuong159 Email: thaichuong...@gmail.com Phone: (+84) 918776134 ___ 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