[Dhis2-devs] [Bug 1407901] [NEW] Data approval role (cannot approve data for lower level)

2015-01-06 Thread Le Hong Em
Public bug reported:

I'm facing an issue on Lao server version 2.17, but not sure if it's bug. I can 
summary as below: 
A district user has 2 roles: Data using, Data apprroval 

The district user can't approve data for lower level (facilities). I
tried to assigned all roles accept "All" to that user, but still can't
approve. The system says: Approval not relevant

User can approve only when I assigned role "All", but this role is for
superuser.

I recognized that there's a spelling here "apprroval" instead of
"approval" on role name, is this a problem?

In addition, tested on www.apps.dhis2.org/demo and get the same problem.

** 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/1407901

Title:
  Data approval role (cannot approve data for lower level)

Status in DHIS 2:
  New

Bug description:
  I'm facing an issue on Lao server version 2.17, but not sure if it's bug. I 
can summary as below: 
  A district user has 2 roles: Data using, Data apprroval 

  The district user can't approve data for lower level (facilities). I
  tried to assigned all roles accept "All" to that user, but still can't
  approve. The system says: Approval not relevant

  User can approve only when I assigned role "All", but this role is for
  superuser.

  I recognized that there's a spelling here "apprroval" instead of
  "approval" on role name, is this a problem?

  In addition, tested on www.apps.dhis2.org/demo and get the same
  problem.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1407901/+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] get blank attribute in individual records

2015-01-06 Thread channara rin
Hi all,
I am so strange happen to me, After i import individual record through web
API, and then i go to find instance in individual record, i saw all the
individual records that i imported. But when i click on one individual
record to fill some attribute and services of data element. and then i
click "complete" button. *After that i back to find instance, then i got
the blank all attributes fields.*

*DHIS2 lastest version

thank you
channara
___
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 in Program Edit

2015-01-06 Thread Calle Hedberg
Hi,

The parameter "Auto-Generate Event" under "Edit Program Stage" do not
change if updated: untick it, click update, then open the Edit Program
Stage again. That field is still ticked.

Regards
Calle

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19274

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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 17890: Remove the Update meta-data detailed exports VM file; Use the same velocity form for Add/Update m...

2015-01-06 Thread noreply

revno: 17890
committer: Tran Chau
branch nick: dhis2
timestamp: Tue 2015-01-06 20:17:25 +0700
message:
  Remove the Update meta-data detailed exports VM file; Use the same velocity 
form for Add/Update meta-data detailed exports form.
removed:
  
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/updateFilterExportForm.vm
modified:
  dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml
  
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/dxf2FilteredMetaDataExport.vm
  
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/filterExportForm.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-importexport/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml	2015-01-04 14:43:37 +
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml	2015-01-06 13:17:25 +
@@ -381,7 +381,7 @@
 
   /main.vm
   /dhis-web-importexport/mainMenu.vm
-  /dhis-web-importexport/updateFilterExportForm.vm
+  /dhis-web-importexport/filterExportForm.vm
   javascript/filteredMetaDataExport.js,javascript/utils.js
   F_METADATA_EXPORT
 

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/dxf2FilteredMetaDataExport.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/dxf2FilteredMetaDataExport.vm	2014-07-27 14:56:46 +
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/dxf2FilteredMetaDataExport.vm	2015-01-06 13:17:25 +
@@ -16,7 +16,7 @@
 
 
 
-
+
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/filterExportForm.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/filterExportForm.vm	2015-01-04 14:43:37 +
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/filterExportForm.vm	2015-01-06 13:17:25 +
@@ -104,6 +104,8 @@
 $i18n.getString( "create_new_filter" )
 #elseif($command == "addAdHoc")
 $i18n.getString( "ad_hoc_export" )
+#elseif( $filter)
+	 $i18n.getString( "edit_filter" )
 #end
 
 
@@ -113,7 +115,10 @@
 
 #end
 
-#if ($command == "addNew")
+#if ($command == "addNew" || $filter )
+		 
+		
+	
 
 
 
@@ -304,6 +309,11 @@
 
 
 
+			 #elseif ($filter)
+ 
+ 
+ 
+ 
 #end
 
 

=== removed file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/updateFilterExportForm.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/updateFilterExportForm.vm	2015-01-04 14:43:37 +
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/updateFilterExportForm.vm	1970-01-01 00:00:00 +
@@ -1,296 +0,0 @@
-
-var i18n_export = '$encoder.jsEscape( $i18n.getString( "export" ), "'" )';
-var i18n_select_all = '$encoder.jsEscape( $i18n.getString( "select_all" ), "'" )';
-
-var i18n_available_attributeTypes = '$encoder.jsEscape( $i18n.getString( "available_attribute_types" ), "'" )';
-var i18n_selected_attributeTypes = '$encoder.jsEscape( $i18n.getString( "selected_attribute_types" ), "'" )';
-
-var i18n_available_categories = '$encoder.jsEscape( $i18n.getString( "available_categories" ), "'" )';
-var i18n_selected_categories = '$encoder.jsEscape( $i18n.getString( "selected_categories" ), "'" )';
-
-var i18n_available_category_combos = '$encoder.jsEscape( $i18n.getString( "available_category_combos" ), "'" )';
-var i18n_selected_category_combos = '$encoder.jsEscape( $i18n.getString( "selected_category_combos" ), "'" )';
-
-var i18n_available_charts = '$encoder.jsEscape( $i18n.getString( "available_charts" ), "'" )';
-var i18n_selected_charts = '$encoder.jsEscape( $i18n.getString( "selected_charts" ), "'" )';
-
-var i18n_available_constants = '$encoder.jsEscape( $i18n.getString( "available_constants" ), "'" )';
-var i18n_selected_constants = '$encoder.jsEscape( $i18n.getString( "selected_constants" ), "'" )';
-
-var i18n_available_dataElementGroupSets = '$encoder.jsEscape( $i18n.getString( "available_dataElementGroupSets" ), "'" )';
-var i18n_selected_dataElementGroupSets = '$encoder.jsEscape( $i18n.getString( "selected_dataElementGroupSets" ), "'" )';
-
-var i18n_available_dataElementGroups = '$encoder.jsEscape( $i18n.getString( "available_dataElementGroups" ), "'" )';
-var

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17891: Minor fix.

2015-01-06 Thread noreply

revno: 17891
committer: Tran Chau
branch nick: dhis2
timestamp: Tue 2015-01-06 20:23:22 +0700
message:
  Minor fix.
modified:
  
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/filterExportForm.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-importexport/src/main/webapp/dhis-web-importexport/filterExportForm.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/filterExportForm.vm	2015-01-06 13:17:25 +
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/filterExportForm.vm	2015-01-06 13:23:22 +
@@ -114,8 +114,8 @@
 #if ($command == "addNew" || $command == "addAdHoc")
 
 #end
-
-#if ($command == "addNew" || $filter )
+	
+#if ($command == "addNew" || ( $command != "addAdHoc" && $filter ) )
 		 
 		
 	

___
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 17892: Hide 'Auto-generate event' property in program stage of an anonymous program.

2015-01-06 Thread noreply

revno: 17892
committer: Tran Chau
branch nick: dhis2
timestamp: Tue 2015-01-06 21:51:29 +0700
message:
  Hide 'Auto-generate event' property in program stage of an anonymous program.
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.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-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm	2014-11-03 13:35:42 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm	2015-01-06 14:51:29 +
@@ -71,10 +71,12 @@
 #end
 			#end
 			
+			#if($programStage.program.type!=3)
 			
 $i18n.getString( "auto_generate_event" )
 
 			
+			#end
 			
 			#if($programStage.program.type!=3)
 #if($openAfterEnrollment!='' ) 

___
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 in Program Edit

2015-01-06 Thread Tran Chau (HISP Vietnam)
Hi Calle,

I just guess the bug happened in *Single event without registration
program.*
For the *Single event without registration program*, I've just removed
the "*Auto-Generate
Event" *in Edit page of program-stage from version* 2.17* (R. 17685) and *trunk
*( R. 17892 ) version because this property doesn't mean in *Single event
without registration program.*

If the program you tested is Single event without registration and run on
version 2.17 or trunk, could you please test it again with new revision ?
If not, please give me which version, and revision you used for testing ?

.

Best regards,
Tran Chau.


On Tue, Jan 6, 2015 at 7:03 PM, Calle Hedberg 
wrote:

> Hi,
>
> The parameter "Auto-Generate Event" under "Edit Program Stage" do not
> change if updated: untick it, click update, then open the Edit Program
> Stage again. That field is still ticked.
>
> Regards
> Calle
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19274
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
>
> ___
> 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] get blank attribute in individual records

2015-01-06 Thread Tran Chau (HISP Vietnam)
Hi Channara,

Can you give me a video or snapshots to describe this bug ?
Also give me the version you use for testing..

.
Best regards,
Tran Chau.

On Tue, Jan 6, 2015 at 6:13 PM, channara rin  wrote:

> Hi all,
> I am so strange happen to me, After i import individual record through web
> API, and then i go to find instance in individual record, i saw all the
> individual records that i imported. But when i click on one individual
> record to fill some attribute and services of data element. and then i
> click "complete" button. *After that i back to find instance, then i got
> the blank all attributes fields.*
>
> *DHIS2 lastest version
>
> thank you
> channara
>
>
> ___
> 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] BUG in Program Edit

2015-01-06 Thread Calle Hedberg
Hi

yes, you are correct - it happened in Single event without registration
Program. So I will check it again next time I'm testing the trunk.

Regards
Calle

On 6 January 2015 at 17:14, Tran Chau (HISP Vietnam) <
tran.hispviet...@gmail.com> wrote:

> Hi Calle,
>
> I just guess the bug happened in *Single event without registration
> program.*
> For the *Single event without registration program*, I've just removed
> the "*Auto-Generate Event" *in Edit page of program-stage from version*
> 2.17* (R. 17685) and *trunk *( R. 17892 ) version because this property
> doesn't mean in *Single event without registration program.*
>
> If the program you tested is Single event without registration and run on
> version 2.17 or trunk, could you please test it again with new revision ?
> If not, please give me which version, and revision you used for testing ?
>
> .
>
> Best regards,
> Tran Chau.
>
>
> On Tue, Jan 6, 2015 at 7:03 PM, Calle Hedberg 
> wrote:
>
>> Hi,
>>
>> The parameter "Auto-Generate Event" under "Edit Program Stage" do not
>> change if updated: untick it, click update, then open the Edit Program
>> Stage again. That field is still ticked.
>>
>> Regards
>> Calle
>>
>> ***
>>
>> Calle Hedberg
>>
>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>
>> Tel/fax (home): +27-21-685-6472
>>
>> Cell: +27-82-853-5352
>>
>> Iridium SatPhone: +8816-315-19274
>>
>> Email: calle.hedb...@gmail.com
>>
>> Skype: calle_hedberg
>>
>> ***
>>
>>
>> ___
>> 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
>>
>>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19274

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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] Storing photos & image files with tracker/event component

2015-01-06 Thread Calle Hedberg
Hi

Is anybody storing photos / image files (scans) as part of a multistage
tracker data set - does that work?

Regards
Calle

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19274

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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 17893: Script

2015-01-06 Thread noreply

revno: 17893
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-01-06 17:04:04 +0100
message:
  Script
modified:
  resources/util/tomcat


--
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 'resources/util/tomcat'
--- resources/util/tomcat	2014-12-16 17:16:43 +
+++ resources/util/tomcat	2015-01-06 16:04:04 +
@@ -3,6 +3,11 @@
 TOMCAT_LOCAL=~/dev/lib/tomcat
 DHIS2_SOURCE_HOME=~/dev/src/dhis2
 
+if [ $# -eq 0 ]
+  then
+echo "Usage: tomcat [option] [version]"
+fi
+
 case $1 in
 start) 
   ${TOMCAT_LOCAL}/bin/startup.sh
@@ -29,6 +34,7 @@
 clear)
   sudo rm -rf ${TOMCAT_LOCAL}/webapps/dhis
   sudo rm ${TOMCAT_LOCAL}/webapps/dhis.war
+  echo Tomcat WAR cleared
   ;;
 update)
   sudo rm -rf ${TOMCAT_LOCAL}/webapps/dhis
@@ -36,6 +42,17 @@
   sudo cp ${DHIS2_SOURCE_HOME}/dhis-2/dhis-web/dhis-web-portal/target/dhis.war ${TOMCAT_LOCAL}/webapps/
   echo Tomcat updated with latest WAR from src code
   ;;
+get)
+  if [ $# -eq 1 ]
+  then
+echo "Usage: tomcat get [version]"
+  fi
+  
+  sudo rm -rf ${TOMCAT_LOCAL}/webapps/dhis
+  sudo rm ${TOMCAT_LOCAL}/webapps/dhis.war
+  wget -O ${TOMCAT_LOCAL}/webapps/dhis.war http://stable.dhis2.org/${2}
+  echo Tomcat updated with WAR version ${2} from stable.dhis2.org
+  ;;
 esac
 exit 0
 

___
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 1407901] Re: Data approval role (cannot approve data for lower level)

2015-01-06 Thread Lars Helge Øverland
** Changed in: dhis2
Milestone: None => 2.17

** Changed in: dhis2
 Assignee: (unassigned) => Jim Grace (jimgrace)

** Changed in: dhis2
   Importance: Undecided => Medium

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

Title:
  Data approval role (cannot approve data for lower level)

Status in DHIS 2:
  New

Bug description:
  I'm facing an issue on Lao server version 2.17, but not sure if it's bug. I 
can summary as below: 
  A district user has 2 roles: Data using, Data apprroval 

  The district user can't approve data for lower level (facilities). I
  tried to assigned all roles accept "All" to that user, but still can't
  approve. The system says: Approval not relevant

  User can approve only when I assigned role "All", but this role is for
  superuser.

  I recognized that there's a spelling here "apprroval" instead of
  "approval" on role name, is this a problem?

  In addition, tested on www.apps.dhis2.org/demo and get the same
  problem.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1407901/+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 1408096] [NEW] Analytics does not drop obsolete partitions

2015-01-06 Thread Lars Helge Øverland
Public bug reported:

The analytics table generation process does not drop obsolete partition
tables.

If a partition has been generated, then the raw data values which backs
the partition are removed, the analytics partition is not dropped on the
subsequent run.

** Affects: dhis2
 Importance: Medium
 Assignee: Lars Helge Øverland (larshelge)
 Status: New

** Changed in: dhis2
 Assignee: (unassigned) => Lars Helge Øverland (larshelge)

** Changed in: dhis2
   Importance: Undecided => Medium

** Changed in: dhis2
Milestone: None => 2.18

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

Title:
  Analytics does not drop obsolete partitions

Status in DHIS 2:
  New

Bug description:
  The analytics table generation process does not drop obsolete
  partition tables.

  If a partition has been generated, then the raw data values which
  backs the partition are removed, the analytics partition is not
  dropped on the subsequent run.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1408096/+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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17894: Analytics. More accurate determination of which analytics partitions must be generated based on t...

2015-01-06 Thread noreply

revno: 17894
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-01-06 22:00:39 +0100
message:
  Analytics. More accurate determination of which analytics partitions must be 
generated based on the source data. Avoids having to generate a huge number of 
partitions when the database contains outlier data from long time ago.
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcOrgUnitTargetTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.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-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTableManager.java	2014-06-04 16:18:39 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTableManager.java	2015-01-06 21:00:39 +
@@ -47,21 +47,12 @@
 public static final String EVENT_ANALYTICS_TABLE_NAME = "analytics_event";
 
 /**
- * Returns analytics tables which yearly partitions. Yearly partitions will
- * be generated starting from the earliest existing data value until the
- * latest existing data value.
- * 
- * @param lastYears the number of last years of data to include, null if all years.
- */
-List getTables( Integer lastYears );
-
-/**
  * Returns analytics tables which yearly partitions.
  * 
  * @param earliest the start date for the first year to generate table partitions.
  * @param latest the end date for the last year to generate table partitions.
  */
-List getTables( Date earliest, Date latest );
+List getTables( Date earliest );
 
 /**
  * Checks if the database content is in valid state for analytics table generation.
@@ -111,22 +102,11 @@
 Future populateTableAsync( ConcurrentLinkedQueue tables );
 
 /**
- * Retrieves the start date of the period of the earliest data value row.
- */
-Date getEarliestData();
-
-/**
- * Retrieves the end date of the period of the latest data value row.
- */
-Date getLatestData();
-
-/**
- * Checks whether the given table has no rows, if so drops the table. Returns
- * true if the table was empty and pruned, if not false.
+ * Returns all years for which it exists data values.
  * 
- * @param table the analytics table.
+ * @param earliest the earliest date to include as data year, null if no restriction.
  */
-boolean pruneTable( AnalyticsTable table );
+List getDataYears( Date earliest );
 
 /**
  * Drops the given table.

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java	2014-11-11 03:58:32 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java	2015-01-06 21:00:39 +
@@ -29,7 +29,7 @@
  */
 
 import java.util.ArrayList;
-import java.util.Calendar;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Set;
@@ -49,13 +49,11 @@
 import org.hisp.dhis.jdbc.StatementBuilder;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.period.Cal;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.timer.SystemTimer;
 import org.hisp.dhis.system.timer.Timer;
 import org.hisp.dhis.system.util.L

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17895: fix for parseObjectFilter, instead of just taking component 3 of split, use evertyhing after the ...

2015-01-06 Thread noreply

revno: 17895
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-01-07 09:04:26 +0700
message:
  fix for parseObjectFilter, instead of just taking component 3 of split, use 
evertyhing after the two first split components, this allows for having : in 
filters
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/parser/DefaultParserService.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/parser/DefaultParserService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/parser/DefaultParserService.java	2014-07-12 12:52:17 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/parser/DefaultParserService.java	2015-01-07 02:04:26 +
@@ -28,13 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.List;
-
+import com.google.common.collect.Lists;
 import org.apache.commons.lang.StringUtils;
 import org.hisp.dhis.dxf2.fieldfilter.FieldMap;
 import org.hisp.dhis.dxf2.objectfilter.Filters;
 
-import com.google.common.collect.Lists;
+import java.util.List;
 
 /**
  * @author Morten Olav Hansen 
@@ -57,7 +56,8 @@
 
 if ( split.length >= 3 )
 {
-parsed.addFilter( split[0], split[1], split[2] );
+int index = split[0].length() + ":".length() + split[1].length() + ":".length();
+parsed.addFilter( split[0], split[1], filter.substring( index ) );
 }
 else
 {

___
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] Problem with smslib download

2015-01-06 Thread Morten Olav Hansen
Hi Knut

Did you fix this? if not, I can send you the file... this repo usually
works, but maybe it had some downtime..
On Sun Jan 04 2015 at 9:04:14 PM Knut Staring  wrote:

> Hello all,
>
> I'm trying to build DHIS2 locally, but maven hangs trying to download
> smslib:
>
> [INFO] Building DHIS API 2.18-SNAPSHOT
> [INFO]
> 
> Downloading:
> http://maven.dhis2.org/amplecode-local/org/smslib/smslib/3.5.3/smsl
> ib-3.5.3.jar
> 24/348 KB
>
> [ERROR] Failed to execute goal on project dhis-api: Could not resolve
> dependenci
> es for project org.hisp.dhis:dhis-api:jar:2.18-SNAPSHOT: Could not
> transfer arti
> fact org.smslib:smslib:jar:3.5.3 from/to amplecode_maven2_repo (
> http://maven.dhi
> s2.org/amplecode-local): GET request of:
> org/smslib/smslib/3.5.3/smslib-3.5.3.ja
> r from amplecode_maven2_repo failed: Premature end of Content-Length
> delimited m
> essage body (expected: 356263; received: 24174 -> [Help 1]
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Liberia: +231 770 496 123 or +231 886 146 381
> Norway: +4791880522
> Skype: knutstar
> http://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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17896: Minor fix, remove usage of Cal

2015-01-06 Thread noreply

revno: 17896
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-01-07 09:53:15 +0700
message:
  Minor fix, remove usage of Cal
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.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-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.java	2015-01-06 21:00:39 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.java	2015-01-07 02:53:15 +
@@ -28,15 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-
 import org.apache.commons.lang.StringUtils;
 import org.hisp.dhis.analytics.Partitions;
+import org.hisp.dhis.calendar.DateTimeUnit;
 import org.hisp.dhis.common.ListMap;
 import org.hisp.dhis.common.NameableObject;
 import org.hisp.dhis.period.Cal;
@@ -46,6 +40,13 @@
 import org.hisp.dhis.system.util.UniqueArrayList;
 import org.joda.time.DateTime;
 
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
 /**
  * @author Lars Helge Overland
  */
@@ -54,26 +55,32 @@
 private static final YearlyPeriodType PERIODTYPE = new YearlyPeriodType();
 
 private static final String SEP = "_";
-
+
 public static Period getPeriod( Integer year )
 {
 DateTime time = new DateTime( year, 1, 1, 0, 0 );
-
+
 return PERIODTYPE.createPeriod( time.toDate() );
 }
 
 public static Date getEarliestDate( Integer lastYears )
 {
 Date earliest = null;
-
+
 if ( lastYears != null )
 {
-earliest = new Cal().now().subtract( Calendar.YEAR, ( lastYears - 1 ) ).set( 1, 1 ).time();
+org.hisp.dhis.calendar.Calendar calendar = PeriodType.getCalendar();
+DateTimeUnit dateTimeUnit = calendar.today();
+dateTimeUnit = calendar.minusYears( dateTimeUnit, lastYears - 1 );
+dateTimeUnit.setMonth( 1 );
+dateTimeUnit.setDay( 1 );
+
+earliest = dateTimeUnit.toJdkDate();
 }
-
+
 return earliest;
 }
-
+
 //TODO optimize by including required filter periods only
 
 public static Partitions getPartitions( Period period, String tablePrefix, String tableSuffix, Set validPartitions )

___
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] Problem with smslib download

2015-01-06 Thread Knut Staring
Thanks, I copied from an older war file. Just wanted to flag it.
On Jan 7, 2015 2:12 AM, "Morten Olav Hansen"  wrote:

> Hi Knut
>
> Did you fix this? if not, I can send you the file... this repo usually
> works, but maybe it had some downtime..
> On Sun Jan 04 2015 at 9:04:14 PM Knut Staring  wrote:
>
>> Hello all,
>>
>> I'm trying to build DHIS2 locally, but maven hangs trying to download
>> smslib:
>>
>> [INFO] Building DHIS API 2.18-SNAPSHOT
>> [INFO]
>> 
>> Downloading:
>> http://maven.dhis2.org/amplecode-local/org/smslib/smslib/3.5.3/smsl
>> ib-3.5.3.jar
>> 24/348 KB
>>
>> [ERROR] Failed to execute goal on project dhis-api: Could not resolve
>> dependenci
>> es for project org.hisp.dhis:dhis-api:jar:2.18-SNAPSHOT: Could not
>> transfer arti
>> fact org.smslib:smslib:jar:3.5.3 from/to amplecode_maven2_repo (
>> http://maven.dhi
>> s2.org/amplecode-local): GET request of:
>> org/smslib/smslib/3.5.3/smslib-3.5.3.ja
>> r from amplecode_maven2_repo failed: Premature end of Content-Length
>> delimited m
>> essage body (expected: 356263; received: 24174 -> [Help 1]
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Liberia: +231 770 496 123 or +231 886 146 381
>> Norway: +4791880522
>> Skype: knutstar
>> http://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] Problem with smslib download

2015-01-06 Thread Morten Olav Hansen
It was probably cut off in the middle.. I have seen this happen before if
you are accessing dhis2.org outside of Norway..

Maybe the mobile team could find a maven repo that is more mainstream to
use for this? the original reason for it, was that this version of smslib
was not available in maven.

A quick google seems to suggest this repo
http://smslib.org/maven2/v3/org/smslib/smslib/

They are using a different repo for smslib 4, not sure if they want to
update or not

--
Morten

(In Vietnam now, its almost impossible to access it at all, but this also
due to an undersea cable in SE asia that was cut... again)

On Sun Jan 04 2015 at 9:04:14 PM Knut Staring  wrote:

> Hello all,
>
> I'm trying to build DHIS2 locally, but maven hangs trying to download
> smslib:
>
> [INFO] Building DHIS API 2.18-SNAPSHOT
> [INFO]
> 
> Downloading:
> http://maven.dhis2.org/amplecode-local/org/smslib/smslib/3.5.3/smsl
> ib-3.5.3.jar
> 24/348 KB
>
> [ERROR] Failed to execute goal on project dhis-api: Could not resolve
> dependenci
> es for project org.hisp.dhis:dhis-api:jar:2.18-SNAPSHOT: Could not
> transfer arti
> fact org.smslib:smslib:jar:3.5.3 from/to amplecode_maven2_repo (
> http://maven.dhi
> s2.org/amplecode-local): GET request of:
> org/smslib/smslib/3.5.3/smslib-3.5.3.ja
> r from amplecode_maven2_repo failed: Premature end of Content-Length
> delimited m
> essage body (expected: 356263; received: 24174 -> [Help 1]
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Liberia: +231 770 496 123 or +231 886 146 381
> Norway: +4791880522
> Skype: knutstar
> http://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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17897: minor bugfix, removed produces in deleteCompleteDataSetRegistration mapping, causes the client to...

2015-01-06 Thread noreply

revno: 17897
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-01-07 11:25:08 +0700
message:
  minor bugfix, removed produces in deleteCompleteDataSetRegistration mapping, 
causes the client to have to set Accept: text/plain for delete to work (and we 
are not returning anything)
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.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-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.java	2015-01-02 13:41:19 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationController.java	2015-01-07 04:25:08 +
@@ -61,6 +61,7 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseStatus;
 import org.springframework.web.client.HttpClientErrorException;
 
 import javax.servlet.http.HttpServletRequest;
@@ -433,7 +434,7 @@
 registrationService.saveCompleteDataSetRegistrations( registrations, true );
 }
 
-@RequestMapping( method = RequestMethod.DELETE, produces = "text/plain" )
+@RequestMapping( method = RequestMethod.DELETE )
 public void deleteCompleteDataSetRegistration(
 @RequestParam Set ds,
 @RequestParam String pe,
@@ -488,8 +489,7 @@
 
 if ( lockedDataSets.size() != 0 )
 {
-ContextUtils
-.conflictResponse( response, "Locked Data set(s) : " + StringUtils.join( lockedDataSets, ", " ) );
+ContextUtils.conflictResponse( response, "Locked Data set(s) : " + StringUtils.join( lockedDataSets, ", " ) );
 return;
 }
 
@@ -499,13 +499,13 @@
 
 Set orgUnits = new HashSet<>();
 orgUnits.add( organisationUnit );
+
 if ( multiOu )
 {
 orgUnits.addAll( organisationUnit.getChildren() );
 }
 
 unRegisterCompleteDataSet( dataSets, period, orgUnits, attributeOptionCombo );
-
 }
 
 // -

___
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] URL mapping for completeDataSetRegistrations

2015-01-06 Thread Morten Olav Hansen
Hi Mahendra

This have now been fixed in 2.17 and trunk. The issue was that it had
"produces = text/plain" on the mapping, which required sending Accept:
text/plain for it to work.

This probably stopped working because of our Spring 4.1 update, they have
been fixing bugs like this for a while now, which means the mappings must
be correct (we had a similar issue with @ResponseStatus(NOT_MODIFIED) a
while back where it stopped sending any kind of body back, which was
correct.. but had always been working before)

--
Morten

On Mon Jan 05 2015 at 5:35:16 PM Morten Olav Hansen 
wrote:

> Hi
>
> Have a look and see if the delete overrides the one in abstract crud
> controller or not
>
> I'm traveling now, can have a look on Wednesday
> On Mon 5 Jan 2015 at 11:09 Mahendra Kariya <
> mahendra.kar...@thoughtworks.com> wrote:
>
>> Hi,
>>
>> We have been observing that DELETE request to 
>> /api/completeDataSetRegistrations
>> has been intermittently going to AbstractCrudController instead of
>> CompleteDataSetRegistionController. We suspect that it is because of
>> some filter mapping configuration, but couldn't nail down the problem.
>>
>> Can anyone help us with where should we look?
>>
>>
>>
>> Thanks,
>> Kiran / Mahendra
>>
>
___
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] Field filters on /api/metadata

2015-01-06 Thread Morten Olav Hansen
Hi Mahendra

I'm hoping to have it support object/field filter in the future, hopefully
as soon as 2.19 (but could be 2.20). It will be done as part of the dxf2
importer refactor / object filter criteria optimisation.

On Mon Jan 05 2015 at 3:08:51 PM Mahendra Kariya <
mahendra.kar...@thoughtworks.com> wrote:

> Thanks for the prompt reply!!
>
> By the way, are you guys planning to make the filtering consistent with
> other /api calls in the near future?
>
> On Mon, Jan 5, 2015 at 1:26 PM, Morten Olav Hansen 
> wrote:
>
>> This is not supported, you can try with ?organisationUnits=false
>>
>> On Mon 5 Jan 2015 at 05:06 Mahendra Kariya <
>> mahendra.kar...@thoughtworks.com> wrote:
>>
>>> Hi,
>>>
>>> We want the entire metadata without organisationUnits. We tried to GET
>>> /api/metadata?fields=:all,!organisationUnits. But the response has all the
>>> org units.
>>>
>>> Is this a bug? Or is this intended?
>>>
>>>
>>>
>>> Thanks,
>>> Mahendra.
>>>
>>
>
___
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