← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13465: Minor

 

------------------------------------------------------------
revno: 13465
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-12-29 18:27:07 +0100
message:
  Minor
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java
  resources/sql/div.sql


--
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	2013-11-29 12:57:35 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2013-12-29 17:27:07 +0000
@@ -128,7 +128,7 @@
         this._format = format;
     }
 
-    I18nFormat getFormat()
+    private I18nFormat getFormat()
     {
         if ( _format != null )
         {

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java	2013-11-04 00:01:39 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java	2013-12-29 17:27:07 +0000
@@ -95,7 +95,7 @@
     {
         Collection<Program> programs = new HashSet<Program>();
 
-        if ( !currentUserService.currentUserIsSuper() )
+        if ( currentUserService.getCurrentUser() != null && !currentUserService.currentUserIsSuper() )
         {
             Set<UserAuthorityGroup> userRoles = userService.getUserCredentials( currentUserService.getCurrentUser() )
                 .getUserAuthorityGroups();
@@ -113,6 +113,7 @@
         {
             programs = getAll();
         }
+        
         return programs;
     }
 
@@ -121,7 +122,7 @@
     {
         Collection<Program> programs = new HashSet<Program>();
 
-        if ( !currentUserService.currentUserIsSuper() )
+        if ( currentUserService.getCurrentUser() != null && !currentUserService.currentUserIsSuper() )
         {
             Set<UserAuthorityGroup> userRoles = userService.getUserCredentials( currentUserService.getCurrentUser() )
                 .getUserAuthorityGroups();
@@ -139,6 +140,7 @@
         {
             programs = getByType( type );
         }
+        
         return programs;
     }
 

=== modified file 'resources/sql/div.sql'
--- resources/sql/div.sql	2013-12-29 16:35:59 +0000
+++ resources/sql/div.sql	2013-12-29 17:27:07 +0000
@@ -200,6 +200,14 @@
 enddate = (enddate + interval '1 year')::date
 where extract(year from startdate) = 2013;
 
+-- (Write) Move programstageinstance to next year
+
+update programstageinstance set 
+duedate = (duedate + interval '1 year'),
+executiondate = (executiondate + interval '1 year'),
+created = (created + interval '1 year'),
+lastupdated = (lastupdated + interval '1 year');
+
 -- (Write) Insert random org unit codes
 
 create function setrandomcode() returns integer AS $$