[Dhis2-devs] Moving directly from 2.18 to 2.20

2015-09-03 Thread Victor Garcia
Hi all,

we are planning to move from version 2.18 to 2.20 (without installing
2.19) and we have some concerns about the risks. We are only using
aggregated values (but we'll use trackedEntities in the future) and,
looking at the upgrade notes, it seems that there is nothing to be
worried about. Also, we have made the update in a test server and
everything seems to go fine.

Anyway, we would like to know if there is something else we have to
take into account, like any update done in 2.19 that will be skipped
if moving directly to 2.20. Also, is it required (or safer) to run
before the Upgrade SQL scripts?

Thanks,

Víctor

___
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] Moving directly from 2.18 to 2.20

2015-09-03 Thread Lars Helge Øverland
Hi Victor,

it should work well. Make sure you run both upgrade scripts (2.19 and 2.20).

regards,

Lars

On Thu, Sep 3, 2015 at 9:35 AM, Victor Garcia  wrote:

> Hi all,
>
> we are planning to move from version 2.18 to 2.20 (without installing
> 2.19) and we have some concerns about the risks. We are only using
> aggregated values (but we'll use trackedEntities in the future) and,
> looking at the upgrade notes, it seems that there is nothing to be
> worried about. Also, we have made the update in a test server and
> everything seems to go fine.
>
> Anyway, we would like to know if there is something else we have to
> take into account, like any update done in 2.19 that will be skipped
> if moving directly to 2.20. Also, is it required (or safer) to run
> before the Upgrade SQL scripts?
>
> Thanks,
>
> Víctor
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>



-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.dhis2.org 
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Moving directly from 2.18 to 2.20

2015-09-03 Thread Lars Helge Øverland
Hi,


 Also, is it required (or safer) to run
>> before the Upgrade SQL scripts?
>>
>
You should stop the server, run the scripts, upgrade the war file, and then
start the server.

Lars




>
>> Thanks,
>>
>> Víctor
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.dhis2.org 
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Moving directly from 2.18 to 2.20

2015-09-03 Thread Jason Pickering
And, be sure to remove everything in the tomcat/webapps/dhis directory (or
your local equivalent happens to be). You do not want to upgrade the WAR
file without also removing the director prior to starting Tomcat. Making a
backup copy of your database, of course, is smart as well. :)

Regards
Jason


On Thu, Sep 3, 2015 at 9:40 AM, Lars Helge Øverland 
wrote:

>
> Hi,
>
>
>  Also, is it required (or safer) to run
>>> before the Upgrade SQL scripts?
>>>
>>
> You should stop the server, run the scripts, upgrade the war file, and
> then start the server.
>
> Lars
>
>
>
>
>>
>>> Thanks,
>>>
>>> Víctor
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> http://www.dhis2.org 
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+46764147049
___
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 19955: Moved Oath2Client to appropriate folder

2015-09-03 Thread noreply

revno: 19955
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 10:26:45 +0200
message:
  Moved Oath2Client to appropriate folder
removed:
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/oauth2.hibernate/
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/oauth2.hibernate/OAuth2Client.hbm.xml
added:
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/security/
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/security/oauth2/
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/security/oauth2/hibernate/
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/security/oauth2/hibernate/OAuth2Client.hbm.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
=== removed directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/oauth2.hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/oauth2.hibernate/OAuth2Client.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/oauth2.hibernate/OAuth2Client.hbm.xml	2015-07-14 07:21:33 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/oauth2.hibernate/OAuth2Client.hbm.xml	1970-01-01 00:00:00 +
@@ -1,39 +0,0 @@
-
-http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
-  []
-  >
-
-
-  
-
-
-
-
-  
-
-&identifiableProperties;
-
-
-
-
-
-
-
-
-  
-  
-  
-  
-
-
-
-  
-  
-  
-  
-
-
-  
-

=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/security'
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/security/oauth2'
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/security/oauth2/hibernate'
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/security/oauth2/hibernate/OAuth2Client.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/security/oauth2/hibernate/OAuth2Client.hbm.xml	1970-01-01 00:00:00 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/security/oauth2/hibernate/OAuth2Client.hbm.xml	2015-09-03 08:26:45 +
@@ -0,0 +1,39 @@
+
+http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
+  []
+  >
+
+
+  
+
+
+
+
+  
+
+&identifiableProperties;
+
+
+
+
+
+
+
+
+  
+  
+  
+  
+
+
+
+  
+  
+  
+  
+
+
+  
+

___
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] Attribute value "Patient Code" from his "Name" and his "Year of birth" in Individual Records [2.20]

2015-09-03 Thread Harivola RANDRIANJAFY
Dear Alex,



After customizing program form according to your advise below, attached the 
Source code that I write in the « design program entry form ».



Launching the Tracker Capture, the code fields doesn’t capture my fonction. Is 
there something wrong that i miss ?



Regards,



Harivola



De : Alex Tumwesigye [mailto:atumwesi...@gmail.com]
Envoyé : jeudi 20 août 2015 18:36
À : Harivola RANDRIANJAFY 
Cc : DHIS 2 Users list ; dhis2-devs 

Objet : Re: [Dhis2-users] Attribute value "Patient Code" from his "Name" and 
his "Year of birth" in Individual Records [2.20]



Dear Harivola,



You will need a custom form with some JQuery/Javascript that splits the name 
and takes the first 3 letters in the name and the last two letters in year of 
birth and inserts into into the patient code fields.



For that to happen, the name and year of birth should be filled first, and on 
focus in the patient code, you need to call the script/function.



Alex



On Thu, Aug 20, 2015 at 1:55 PM, Harivola RANDRIANJAFY mailto:harivo...@psi.mg> > wrote:

Hi all,



In our program, we want to register the attribute patient code. Does someone 
know how to obtain automatic value in attribute « Patient Code » from his 
attribute « Name » and « Year of birth » instead of writing the value manually ?

Ex :

Name : SARAH

Year of birth : 1980

*  Patient Code : value should be "SAR80"



Thanks,



Harivola



  _


 

L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
www.avast.com 




___
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







--

Alex Tumwesigye



Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET

Kampala

Uganda

IT Consultant - BarefootPower Uganda Ltd, SmartSolar, Kenya

IT Specialist (Servers, Networks and Security, Health Information Systems - 
DHIS2 ) & Solar Consultant

+256 774149 775, + 256 759 800161


"I don't want to be anything other than what I have been - one tree hill "



  _


 

L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
www.avast.com 





---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus
Patient register
http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js";>
  
   
   function code_client(){
var sName = 
$("input[attributeid='YxajNu1UcjP']").val().substr(0,3);
var sFirstName = 
$("input[attributeid='a1uRlZkvPBf']").val().substr(0,2);
var sBirthYear = 
$("input[attributeid='dyvfE1mwpUS']").val().substr(-2);
var sBirthLoc = 
$("input[attributeid='SNDrOhwKPV7']").val().substr(0,2);
var sSex = 
$("input[attributeid='St6mCYb6SQW']").val().substr(0,1);

if (sName == "") { sName = 
"XXX"; }
if (sFirstName == "") { 
sFirstName = "XX"; }
if (sBirthLoc == "") { 
sBirthLoc = "XX"; }

var sCode = sName;
sCode = sCode + sFirstName;
sCode = sCode + sBirthYear;
sCode = sCode + sBirthLoc;
sCode = sCode + sSex;

   
$("input[attributeid='gX08Z7KKeZj']").val(sCode) ;
  
   }
   




Nom



Prenoms



Année de naissance



Lieu de naissance



Sexe



Client ID





 
___
Mailing list: https://launchpad.ne

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19956: introduced optioncombo (only the name) to events

2015-09-03 Thread noreply

revno: 19956
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-09-03 11:03:51 +0200
message:
  introduced optioncombo (only the name) to events
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/EventRow.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-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-03 08:15:09 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-03 09:03:51 +
@@ -727,7 +727,7 @@
 executeSql( "UPDATE dataset SET version=0 WHERE version IS NULL" );
 executeSql( "UPDATE program SET version=0 WHERE version IS NULL" );
 executeSql( "update program set categorycomboid = " + defaultCategoryComboId + " where categorycomboid is null" );
-executeSql( "update programstageinstance set attributeOptionCombo = " + defaultOptionComboId + " where attributeOptionCombo is null" );
+executeSql( "update programstageinstance set attributeoptioncomboid = " + defaultOptionComboId + " where attributeoptioncomboid is null" );
 
 
 executeSql( "ALTER TABLE datavalue ALTER COLUMN lastupdated TYPE timestamp" );

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java	2015-05-05 02:32:33 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java	2015-09-03 09:03:51 +
@@ -81,6 +81,8 @@
 private String created;
 
 private String lastUpdated;
+
+private String attributeCategoryOptions;
 
 public Event()
 {
@@ -303,6 +305,18 @@
 {
 this.lastUpdated = lastUpdated;
 }
+
+@JsonProperty
+@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+public String getAttributeCategoryOptions()
+{
+return attributeCategoryOptions;
+}
+
+public void setAttributeCategoryOptions( String attributeCategoryOptions )
+{
+this.attributeCategoryOptions = attributeCategoryOptions;
+} 
 
 @Override
 public boolean equals( Object o )
@@ -338,6 +352,7 @@
 ", storedBy='" + storedBy + '\'' +
 ", coordinate=" + coordinate +
 ", dataValues=" + dataValues +
+", attributeCategoryOptions=" + attributeCategoryOptions +
 '}';
-}
+}   
 }

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/EventRow.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/EventRow.java	2015-05-18 17:05:23 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/EventRow.java	2015-09-03 09:03:51 +
@@ -76,6 +76,8 @@
 private List dataValues = new ArrayList<>();
 
 private List notes = new ArrayList<>();
+
+private String attributeCategoryOptions;
 
 public EventRow()
 {
@@ -238,6 +240,18 @@
 {
 this.followup = followup;
 }
+
+@JsonProperty
+@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+public String getAttributeCategoryOptions()
+{
+return attributeCategoryOptions;
+}
+
+public void setAttributeCategoryOptions( String attributeCategoryOptions )
+{
+this.attributeCategoryOptions = attributeCategoryOptions;
+} 
 
 @Override
 public boolean equals( Object o )
@@ -303,7 +317,8 @@
 ", registrationOrgUnit='" + orgUnit + '\'' +
 ", trackedEntityInstance='" + trackedEntityInstance + '\'' + 
 ", eventDate='" + eventDate + '\'' + 
-", dueDate='" + dueDate + '\'' +
+", dueDate='" + dueDate + '\'' +
+", attributeCategoryOptions=" + attributeCategoryOptions +
 '}';
 }
 }

___
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 19957: Value type fixes for event analytics

2015-09-03 Thread noreply

revno: 19957
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 11:26:38 +0200
message:
  Value type fixes for event analytics
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/util/ObjectUtils.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-api/src/main/java/org/hisp/dhis/common/QueryItem.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java	2015-09-03 08:15:09 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java	2015-09-03 09:26:38 +
@@ -28,15 +28,14 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
 import org.hisp.dhis.analytics.AggregationType;
 import org.hisp.dhis.legend.LegendSet;
 import org.hisp.dhis.option.OptionSet;
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
-import org.hisp.dhis.util.ObjectUtils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
 
 /**
  * Class which encapsulates a query parameter and value. Operator and filter
@@ -112,12 +111,12 @@
 
 public String getTypeAsString()
 {
-return ObjectUtils.VALUE_TYPE_JAVA_CLASS_MAP.get( valueType ).getName();
+return valueType.getJavaClass().toString();
 }
 
 public boolean isNumeric()
 {
-return Double.class.equals( ObjectUtils.VALUE_TYPE_JAVA_CLASS_MAP.get( valueType ) );
+return valueType.isNumeric();
 }
 
 public boolean hasLegendSet()

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-03 08:15:09 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-03 09:26:38 +
@@ -226,6 +226,7 @@
 return ValueType.TEXT; // Fall back
 }
 
+//TODO remove and replace with ValueType.valueOf
 public static ValueType fromValue( String value )
 {
 for ( ValueType valueType : ValueType.values() )

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/util/ObjectUtils.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/util/ObjectUtils.java	2015-07-08 05:02:25 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/util/ObjectUtils.java	2015-09-03 09:26:38 +
@@ -28,31 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
-import org.joda.time.DateTime;
 
 public class ObjectUtils
 {
-public static final Map> VALUE_TYPE_JAVA_CLASS_MAP = new HashMap>() { {
-put( DataElement.VALUE_TYPE_INT, Double.class );
-put( DataElement.VALUE_TYPE_STRING, String.class );
-put( DataElement.VALUE_TYPE_BOOL, Boolean.class );
-put( DataElement.VALUE_TYPE_TRUE_ONLY, Boolean.class );
-put( DataElement.VALUE_TYPE_DATE, Date.class );
-put( DataElement.VALUE_TYPE_DATETIME, DateTime.class );
-put( DataElement.VALUE_TYPE_UNIT_INTERVAL, Double.class );
-put( DataElement.VALUE_TYPE_PERCENTAGE, Double.class );
-put( TrackedEntityAttribute.TYPE_NUMBER, Double.class );
-put( TrackedEntityAttribute.TYPE_LETTER, String.class );
-put( TrackedEntityAttribute.TYPE_OPTION_SET, String.class );
-put( TrackedEntityAttribute.TYPE_EMAIL, String.class );
-} };
-
 /**
  * Returns the first non-null argument. Returns null if all arguments are null.
  * 

___
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 19958: Removed ValueType fromValue

2015-09-03 Thread noreply

revno: 19958
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 11:36:38 +0200
message:
  Removed ValueType fromValue
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.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-api/src/main/java/org/hisp/dhis/common/ValueType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-03 09:26:38 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-03 09:36:38 +
@@ -225,18 +225,4 @@
 
 return ValueType.TEXT; // Fall back
 }
-
-//TODO remove and replace with ValueType.valueOf
-public static ValueType fromValue( String value )
-{
-for ( ValueType valueType : ValueType.values() )
-{
-if ( valueType.toString().equalsIgnoreCase( value ) )
-{
-return valueType;
-}
-}
-
-return null;
-}
 }

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java	2015-09-03 08:15:09 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java	2015-09-03 09:36:38 +
@@ -241,10 +241,12 @@
 
 if ( rowSet.getString( "pav_value" ) != null && rowSet.getString( "ta_uid" ) != null )
 {
+String valueType = rowSet.getString( "ta_valuetype" );
+
 Attribute attribute = new Attribute();
 attribute.setValue( rowSet.getString( "pav_value" ) );
 attribute.setDisplayName( rowSet.getString( "ta_name" ) );
-attribute.setValueType( ValueType.fromValue( rowSet.getString( "ta_valuetype" ) ) );
+attribute.setValueType( valueType != null ? ValueType.valueOf( valueType.toUpperCase() ) : null );
 attribute.setAttribute( rowSet.getString( "ta_uid" ) );
 
 eventRow.getAttributes().add( attribute );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java	2015-09-03 08:15:09 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java	2015-09-03 09:36:38 +
@@ -115,9 +115,9 @@
 this.description = description;
 }
 
-private String valueType;
+private ValueType valueType;
 
-public void setValueType( String valueType )
+public void setValueType( ValueType valueType )
 {
 this.valueType = valueType;
 }
@@ -206,7 +206,7 @@
 trackedEntityAttribute.setShortName( StringUtils.trimToNull( shortName ) );
 trackedEntityAttribute.setCode( StringUtils.trimToNull( code ) );
 trackedEntityAttribute.setDescription( StringUtils.trimToNull( description ) );
-trackedEntityAttribute.setValueType( ValueType.fromValue( valueType ) );
+trackedEntityAttribute.setValueType( valueType );
 trackedEntityAttribute.setAggregationType( AggregationType.fromValue( aggregationType ) );
 trackedEntityAttribute.setExpression( expression );
 trackedEntityAttribute.setDisplayOnVisitSchedule( false );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java	2015-09

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19959: minor indent fixes

2015-09-03 Thread noreply

revno: 19959
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Thu 2015-09-03 16:45:19 +0700
message:
  minor indent fixes
modified:
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramIndicator.vm
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonTrackedEntityAttribute.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonAttribute.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-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm	2014-10-28 22:36:19 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm	2015-09-03 09:45:19 +
@@ -1,28 +1,28 @@
-{ "dataElement": 
+{ "dataElement":
   {
 "id": "$!{dataElement.id}",
-	"uid": "$!dataElement.uid",
+"uid": "$!dataElement.uid",
 "name": "$!encoder.jsonEncode( ${dataElement.displayName} )",
 "alternativeName": "$!encoder.jsonEncode( ${dataElement.alternativeNamee} )",
 "shortName": "$!encoder.jsonEncode( ${dataElement.displayShortName} )",
 "code": "$!encoder.jsonEncode( ${dataElement.code} )",
 "description": "$!encoder.jsonEncode( ${dataElement.displayDescription} )",
 "type": "$!{dataElement.type}",
-	"valueType": "$!{dataElement.type}",
-	"domainType": "${dataElement.getDomainTypeNullSafe()}",
+"valueType": "$!{dataElement.type}",
+"domainType": "${dataElement.getDomainTypeNullSafe()}",
 "aggregationOperator": "$!{dataElement.aggregationOperator}",
-	"categoryCombo": "$!encoder.xmlEncode( ${dataElement.categoryCombo.name} )",
-	"url": "$!encoder.xmlEncode( ${dataElement.url} )",
-	"lastUpdated": "$!format.formatDate( ${dataElement.lastUpdated} )",
-	"approveData": "$!{dataElement.approveData}",
-	
-	#set( $size = ${dataElement.dataSets.size()} )
-	"dataSets": [
-	#foreach( $ds in ${dataElement.dataSets} )
-	  {
-		"name": "$!encoder.xmlEncode( ${ds.name} )"
-	  }#if( $velocityCount < $size ),#end
-	#end
-	]
-  } 
+"categoryCombo": "$!encoder.xmlEncode( ${dataElement.categoryCombo.name} )",
+"url": "$!encoder.xmlEncode( ${dataElement.url} )",
+"lastUpdated": "$!format.formatDate( ${dataElement.lastUpdated} )",
+"approveData": "$!{dataElement.approveData}",
+
+#set( $size = ${dataElement.dataSets.size()} )
+"dataSets": [
+#foreach( $ds in ${dataElement.dataSets} )
+{
+"name": "$!encoder.xmlEncode( ${ds.name} )"
+}#if( $velocityCount < $size ),#end
+#end
+]
+  }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramIndicator.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramIndicator.vm	2015-07-10 16:14:22 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramIndicator.vm	2015-09-03 09:45:19 +
@@ -1,13 +1,13 @@
-{ "programIndicator": 
+{ "programIndicator":
   {
 "id": $!{programIndicator.id},
 "uid": "$!{programIndicator.uid}",
 "name": "$!encoder.jsonEncode( ${programIndicator.displayName} )",
 "code": "$!encoder.jsonEncode( ${programIndicator.code} )",
-	"description": "$!encoder.xmlEncode( ${programIndicator.displayDescription} )",
+"description": "$!encoder.xmlEncode( ${programIndicator.displayDescription} )",
 "valueType": "$!{programIndicator.valueType}",
-	"rootDate" : "$!format.formatDate( $programIndicator.rootDate )",
-	"expression": "$!encoder.jsonEncode( $!{programIndicator.expression} )",
-	"filter": "$!encoder.jsonEncode( $!{programIndicator.filter} )"
+"rootDate" : "$!format.formatDate( $programIndicator.rootDate )",
+"expression": "$!encoder.jsonEncode( $!{programIndicator.expression} )",
+"filter": "$!encoder.jsonEncode( $!{programIndicator.filter} )"
   }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonTrackedEntityAttribute.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonTrackedEntityAttribute.vm	2014-07-02 12:11:16 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonTrackedEntityAttribute.vm	2015-09-03 09:45:19 +
@@ -1,17 +1,17 @@
 { "attribute":
   {
-"id": "${attribute.id}",
-	"uid": "${attribute.uid}",
-	"name": "$!encoder.jsonEncode( ${attribute.name} )",

[Dhis2-devs] error using curl command

2015-09-03 Thread channara rin
Hi DHIS2 friends,
i tried use curl command to import tracker, but i got error.
can you help me what is problem?
***THIS IS COMMAND RUNNING:
[image: Inline image 1]

***THIS IS CONSOLE in APACHE
[image: Inline image 2]
___
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] error using curl command

2015-09-03 Thread Bob Jolliffe
Hi Channara

The man page for curl indicates that the format of the command is:

curl  

Try moving your url to the end of the line, after the options.  Also you
might want to add "http://localhost...";

On 3 September 2015 at 11:01, channara rin  wrote:

> Hi DHIS2 friends,
> i tried use curl command to import tracker, but i got error.
> can you help me what is problem?
> ***THIS IS COMMAND RUNNING:
> [image: Inline image 1]
>
> ***THIS IS CONSOLE in APACHE
> [image: Inline image 2]
>
> ___
> 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] error using curl command

2015-09-03 Thread Morten Olav Hansen
I have also seen weird issues on window versions of cURL where -u user:pass
is required to be FIRST (mac/linux should be fine)

--
Morten

On Thu, Sep 3, 2015 at 5:07 PM, Bob Jolliffe  wrote:

> Hi Channara
>
> The man page for curl indicates that the format of the command is:
>
> curl  
>
> Try moving your url to the end of the line, after the options.  Also you
> might want to add "http://localhost...";
>
> On 3 September 2015 at 11:01, channara rin  wrote:
>
>> Hi DHIS2 friends,
>> i tried use curl command to import tracker, but i got error.
>> can you help me what is problem?
>> ***THIS IS COMMAND RUNNING:
>> [image: Inline image 1]
>>
>> ***THIS IS CONSOLE in APACHE
>> [image: Inline image 2]
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19960: Unused code

2015-09-03 Thread noreply

revno: 19960
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 12:14:18 +0200
message:
  Unused code
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ShowAddDataElementCategoryOptionAction.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/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java	2015-09-03 03:11:47 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java	2015-09-03 10:14:18 +
@@ -44,7 +44,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramInstanceService;
-import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.trackedentity.TrackedEntity;
 import org.hisp.dhis.trackedentity.TrackedEntityService;
 import org.junit.Ignore;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ShowAddDataElementCategoryOptionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ShowAddDataElementCategoryOptionAction.java	2015-09-03 03:11:47 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ShowAddDataElementCategoryOptionAction.java	2015-09-03 10:14:18 +
@@ -28,15 +28,15 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.opensymphony.xwork2.Action;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.hisp.dhis.attribute.Attribute;
 import org.hisp.dhis.attribute.AttributeService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import java.util.ArrayList;
-import java.util.List;
+import com.opensymphony.xwork2.Action;
 
 /**
  * @author Jim Grace

___
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] error using curl command

2015-09-03 Thread channara rin
not working

On Thu, Sep 3, 2015 at 5:08 PM, Morten Olav Hansen 
wrote:

> I have also seen weird issues on window versions of cURL where -u
> user:pass is required to be FIRST (mac/linux should be fine)
>
> --
> Morten
>
> On Thu, Sep 3, 2015 at 5:07 PM, Bob Jolliffe 
> wrote:
>
>> Hi Channara
>>
>> The man page for curl indicates that the format of the command is:
>>
>> curl  
>>
>> Try moving your url to the end of the line, after the options.  Also you
>> might want to add "http://localhost...";
>>
>> On 3 September 2015 at 11:01, channara rin 
>> wrote:
>>
>>> Hi DHIS2 friends,
>>> i tried use curl command to import tracker, but i got error.
>>> can you help me what is problem?
>>> ***THIS IS COMMAND RUNNING:
>>> [image: Inline image 1]
>>>
>>> ***THIS IS CONSOLE in APACHE
>>> [image: Inline image 2]
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19961: ER, ER, valueType, WIP

2015-09-03 Thread noreply

revno: 19961
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 12:15:10 +0200
message:
  ER, ER, valueType, WIP
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js


--
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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-08-08 10:16:11 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-09-03 10:15:10 +
@@ -4123,7 +4123,7 @@
 var layoutWindow = ns.app.aggregateLayoutWindow;
 
 this.each( function(record) {
-if (Ext.Array.contains(['int', 'number'], (record.data.valueType || record.data.type))) {
+if (Ext.Array.contains(['int', 'number'], record.data.valueType)) {
 layoutWindow.valueStore.add(record.data);
 }
 });
@@ -4472,7 +4472,7 @@
 }
 else {
 Ext.Ajax.request({
-url: ns.core.init.contextPath + '/api/programStages.json?filter=id:eq:' + stageId + '&fields=programStageDataElements[dataElement[id,' + ns.core.init.namePropertyUrl + ',type,optionSet[id,name]]]',
+url: ns.core.init.contextPath + '/api/programStages.json?filter=id:eq:' + stageId + '&fields=programStageDataElements[dataElement[id,' + ns.core.init.namePropertyUrl + ',valueType,optionSet[id,name]]]',
 success: function(r) {
 var objects = Ext.decode(r.responseText).programStages,
 dataElements;
@@ -4688,7 +4688,6 @@
 			var getUxType,
 ux;
 
-element.type = element.type || element.valueType;
 			index = index || dataElementSelected.items.items.length;
 
 			getUxType = function(element) {
@@ -4697,19 +4696,19 @@
 	return 'Ext.ux.panel.OrganisationUnitGroupSetContainer';
 }
 
-if (element.type === 'int' || element.type === 'number') {
+if (element.valueType === 'int' || element.valueType === 'number') {
 	return 'Ext.ux.panel.DataElementIntegerContainer';
 }
 
-if (element.type === 'string') {
+if (element.valueType === 'string') {
 	return 'Ext.ux.panel.DataElementStringContainer';
 }
 
-if (element.type === 'date') {
+if (element.valueType === 'date') {
 	return 'Ext.ux.panel.DataElementDateContainer';
 }
 
-if (element.type === 'bool' || element.type === 'trueOnly') {
+if (element.valueType === 'bool' || element.valueType === 'trueOnly') {
 	return 'Ext.ux.panel.DataElementBooleanContainer';
 }
 
@@ -4788,7 +4787,7 @@
 element = dataElements[i];
 allElements.push(element);
 
-if (element.type === 'int' && element.filter) {
+if (element.valueType === 'int' && element.filter) {
 	a = element.filter.split(':');
 	numberOfElements = a.length / 2;
 
@@ -4810,7 +4809,6 @@
 			// panel, store
 for (var i = 0, element, ux, store; i < allElements.length; i++) {
 element = allElements[i];
-element.type = element.type || element.valueType;
 element.name = element.name || element.displayName;
 recordMap[element.id] = element;
 
@@ -4823,7 +4821,7 @@
 }
 }
 
-store = Ext.Array.contains(includeKeys, element.type) || element.optionSet ? aggWindow.rowStore : aggWindow.fixedFilterStore;
+store = Ext.Array.contains(includeKeys, element.valueType) || element.optionSet ? aggWindow.rowStore : aggWindow.fixedFilterStore;
 
 aggWindow.addDimension(element, store, valueStore);
 queryWindow.colStore.add(element);
@@ -4866,7 +4864,7 @@
 	for (var i = 0, store, record, dim; i < layout.filters.length; i++) {
 dim = layout.filters[i];
 		record = recordMap[dim.dimension];
-		store = Ext.Array.contains(includeKeys, element.type) || element.optionSet ? aggWindow.filterStore : aggWindow.fixedFilterStore;
+		store = Ext.Array.contains(includeKeys, element.valueType) || element.optionSet ? aggWindow.filterStore : aggWindow.fixedFilterStore;
 
 //aggWindow.addDimension(record || extendDim(Ext.clone(dim)), store, null, true);
 store.add(record || extendDim(Ext.clone(dim)));

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js'
--- dhis-2/dhis-

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19962: Removed ValueType getFromAttribute

2015-09-03 Thread noreply

revno: 19962
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 12:21:08 +0200
message:
  Removed ValueType getFromAttribute
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.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-api/src/main/java/org/hisp/dhis/common/ValueType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-03 09:36:38 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-03 10:21:08 +
@@ -28,13 +28,13 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.google.common.collect.Lists;
+import java.util.Date;
+import java.util.List;
+
 import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 
-import java.util.Date;
-import java.util.List;
+import com.google.common.collect.Lists;
 
 /**
  * @author Lars Helge Overland
@@ -195,34 +195,4 @@
 
 return ValueType.TEXT; // Fall back
 }
-
-/**
- * TODO replace string value type on attribute with ValueType and remove
- * this method.
- */
-public static ValueType getFromAttribute( TrackedEntityAttribute attribute )
-{
-if ( TrackedEntityAttribute.TYPE_NUMBER.equals( attribute.getValueType() ) || DataElement.VALUE_TYPE_INT.equals( attribute.getValueType() ) )
-{
-return ValueType.NUMBER;
-}
-else if ( TrackedEntityAttribute.TYPE_BOOL.equals( attribute.getValueType() ) || TrackedEntityAttribute.TYPE_TRUE_ONLY.equals( attribute.getValueType() ) )
-{
-return ValueType.BOOLEAN;
-}
-else if ( TrackedEntityAttribute.TYPE_DATE.equals( attribute.getValueType() ) )
-{
-return ValueType.DATE;
-}
-else if ( TrackedEntityAttribute.TYPE_TRACKER_ASSOCIATE.equals( attribute.getValueType() ) )
-{
-return ValueType.TRACKER_ASSOCIATE;
-}
-else if ( TrackedEntityAttribute.TYPE_USERS.equals( attribute.getValueType() ) )
-{
-return ValueType.USERNAME;
-}
-
-return ValueType.TEXT; // Fall back
-}
 }

=== modified file '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/JdbcEventAnalyticsTableManager.java	2015-09-01 09:22:27 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java	2015-09-03 10:21:08 +
@@ -289,10 +289,9 @@
 
 for ( TrackedEntityAttribute attribute : table.getProgram().getTrackedEntityAttributes() )
 {
-ValueType valueType = ValueType.getFromAttribute( attribute );
-String dataType = getColumnType( valueType );
+String dataType = getColumnType( attribute.getValueType() );
 String dataClause = attribute.isNumericType() ? numericClause : attribute.isDateType() ? dateClause : "";
-String select = getSelectClause( valueType );
+String select = getSelectClause( attribute.getValueType() );
 
 String sql = "(select " + select + " from trackedentityattributevalue where trackedentityinstanceid=pi.trackedentityinstanceid " + 
 "and trackedentityattributeid=" + attribute.getId() + dataClause + ") as " + quote( attribute.getUid() );
@@ -304,7 +303,7 @@
 for ( TrackedEntityAttribute attribute : table.getProgram().getTrackedEntityAttributesWithLegendSet() )
 {
 String column = quote( attribute.getUid() + PartitionUtils.SEP + attribute.getLegendSet().getUid() );
-String select = getSelectClause( ValueType.getFromAttribute( attribute ) );
+String select = getSelectClause( attribute.getValueType() );
 
 String sql = "(select l.uid from maplegend l inner join maplegendsetmaplegend lsl on l.maplegendid=lsl.maplegendid " +
 "inner join trackedentityattributevalue av on l.startvalue <= " + select + " and l.endvalue > " + select + " " +

___
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] error using curl command

2015-09-03 Thread Knut Staring
Channara, are you using GOW?

https://github.com/bmatzelle/gow

On Thu, Sep 3, 2015 at 12:08 PM, Morten Olav Hansen 
wrote:

> I have also seen weird issues on window versions of cURL where -u
> user:pass is required to be FIRST (mac/linux should be fine)
>
> --
> Morten
>
> On Thu, Sep 3, 2015 at 5:07 PM, Bob Jolliffe 
> wrote:
>
>> Hi Channara
>>
>> The man page for curl indicates that the format of the command is:
>>
>> curl  
>>
>> Try moving your url to the end of the line, after the options.  Also you
>> might want to add "http://localhost...";
>>
>> On 3 September 2015 at 11:01, channara rin 
>> wrote:
>>
>>> Hi DHIS2 friends,
>>> i tried use curl command to import tracker, but i got error.
>>> can you help me what is problem?
>>> ***THIS IS COMMAND RUNNING:
>>> [image: Inline image 1]
>>>
>>> ***THIS IS CONSOLE in APACHE
>>> [image: Inline image 2]
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19963: event-capture: type -> valueType - WIP

2015-09-03 Thread noreply

revno: 19963
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-09-03 12:36:07 +0200
message:
  event-capture: type -> valueType - WIP
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html


--
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-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-08-25 14:54:19 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-09-03 10:36:07 +
@@ -168,7 +168,7 @@
 $scope.filterTypes = {};   
 $scope.newDhis2Event = {};
 
-$scope.eventGridColumns.push({name: 'form_id', id: 'uid', type: 'string', compulsory: false, showFilter: false, show: false});
+$scope.eventGridColumns.push({name: 'form_id', id: 'uid', valueType: 'string', compulsory: false, showFilter: false, show: false});
 $scope.filterTypes['uid'] = 'string';
 
 $scope.eventGridColumns.push({name: $scope.selectedProgramStage.reportDateDescription ? $scope.selectedProgramStage.reportDateDescription : 'incident_date', id: 'event_date', type: 'date', compulsory: false, showFilter: false, show: true});
@@ -184,7 +184,7 @@
 //for date type dataelements, filtering is based on start and end dates
 $scope.eventGridColumns.push({name: prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.name, 
   id: prStDe.dataElement.id, 
-  type: prStDe.dataElement.type, 
+  valueType: prStDe.dataElement.valueType, 
   compulsory: prStDe.compulsory, 
   showFilter: false, 
   show: prStDe.displayInReports});

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js	2015-08-26 19:49:09 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js	2015-09-03 10:36:07 +
@@ -32,7 +32,7 @@
 dhis2.ec.store = new dhis2.storage.Store({
 name: 'dhis2ec',
 adapters: [dhis2.storage.IndexedDBAdapter, dhis2.storage.DomSessionStorageAdapter, dhis2.storage.InMemoryAdapter],
-objectStores: ['programs', 'programStages', 'geoJsons', 'optionSets', 'events', 'programValidations', 'programRules', 'programRuleVariables', 'programIndicators', 'ouLevels', 'constants']
+objectStores: ['programs', 'programStages', 'categories', 'categoryOptions', 'geoJsons', 'optionSets', 'events', 'programValidations', 'programRules', 'programRuleVariables', 'programIndicators', 'ouLevels', 'constants']
 });
 
 (function($) {
@@ -151,6 +151,8 @@
 promise = promise.then( getMetaPrograms ); 
 promise = promise.then( getPrograms ); 
 promise = promise.then( getProgramStages );
+promise = promise.then( getCategories );
+promise = promise.then( getCategoryOptions );
 promise = promise.then( getMetaProgramValidations );
 promise = promise.then( getProgramValidations );
 promise = promise.then( getMetaProgramIndicators );
@@ -243,7 +245,7 @@
 $.ajax({
 url: '../api/programs.json',
 type: 'GET',
-data:'filter=programType:eq:WITHOUT_REGISTRATION&paging=false&fields=id,name,version,programStages[id,version,programStageSections[id],programStageDataElements[dataElement[id,optionSet[id,version'
+data:'filter=programType:eq:WITHOUT_REGISTRATION&paging=false&fields=id,name,version,categoryCombo[id,categories[id,categoryOptions[id]]],programStages[id,version,programStageSections[id],programStageDataElements[dataElement[id,optionSet[id,version'
 }).done( function(response) {
 def.resolve( response.programs ? response.programs: [] );
 }).fail(function(){
@@ -350,7 +352,100 @@
 var p = d.promise();
 dhis2.ec.store.get('programStages', program.programStages[0].id).done(function(obj) {
 if(!obj || obj.ver

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19964: ER, upgraded to valueType enum

2015-09-03 Thread noreply

revno: 19964
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 12:58:40 +0200
message:
  ER, upgraded to valueType enum
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js


--
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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-09-03 10:15:10 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-09-03 10:58:40 +
@@ -4123,7 +4123,7 @@
 var layoutWindow = ns.app.aggregateLayoutWindow;
 
 this.each( function(record) {
-if (Ext.Array.contains(['int', 'number'], record.data.valueType)) {
+if (Ext.Array.contains(ns.core.conf.valueType.numericTypes, record.data.valueType)) {
 layoutWindow.valueStore.add(record.data);
 }
 });
@@ -4696,19 +4696,19 @@
 	return 'Ext.ux.panel.OrganisationUnitGroupSetContainer';
 }
 
-if (element.valueType === 'int' || element.valueType === 'number') {
+if (Ext.Array.contains(ns.core.conf.valueType.numericTypes, element.valueType)) {
 	return 'Ext.ux.panel.DataElementIntegerContainer';
 }
 
-if (element.valueType === 'string') {
+if (Ext.Array.contains(ns.core.conf.valueType.textTypes, element.valueType)) {
 	return 'Ext.ux.panel.DataElementStringContainer';
 }
 
-if (element.valueType === 'date') {
+if (Ext.Array.contains(ns.core.conf.valueType.dateTypes, element.valueType)) {
 	return 'Ext.ux.panel.DataElementDateContainer';
 }
 
-if (element.valueType === 'bool' || element.valueType === 'trueOnly') {
+if (Ext.Array.contains(ns.core.conf.valueType.booleanTypes, element.valueType)) {
 	return 'Ext.ux.panel.DataElementBooleanContainer';
 }
 
@@ -4749,7 +4749,7 @@
 allElements = [],
 aggWindow = ns.app.aggregateLayoutWindow,
 queryWindow = ns.app.queryLayoutWindow,
-includeKeys = ['int', 'number', 'bool', 'boolean', 'trueOnly'],
+includeKeys = ns.core.conf.valueType.aggregateTypes,
 ignoreKeys = ['pe', 'ou'],
 recordMap = {
 	'pe': {id: 'pe', name: 'Periods'},
@@ -4787,7 +4787,7 @@
 element = dataElements[i];
 allElements.push(element);
 
-if (element.valueType === 'int' && element.filter) {
+if (Ext.Array.contains(ns.core.conf.valueType.numericTypes, element.valueType) && element.filter) {
 	a = element.filter.split(':');
 	numberOfElements = a.length / 2;
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2015-09-02 18:25:31 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2015-09-03 10:58:40 +
@@ -152,6 +152,14 @@
 ],
 idNameMap: {}
 };
+
+conf.valueType = {
+	numericTypes: ['NUMBER','UNIT_INTERVAL','PERCENTAGE','INTEGER','INTEGER_POSITIVE','INTEGER_NEGATIVE','INTEGER_ZERO_OR_POSITIVE'],
+	textTypes: ['TEXT','LONG_TEXT','LETTER','PHONE_NUMBER','EMAIL'],
+	booleanTypes: ['BOOLEAN','TRUE_ONLY'],
+	dateTypes: ['DATE','DATETIME'],
+	aggregateTypes: ['NUMBER','UNIT_INTERVAL','PERCENTAGE','INTEGER','INTEGER_POSITIVE','INTEGER_NEGATIVE','INTEGER_ZERO_OR_POSITIVE','BOOLEAN','TRUE_ONLY']
+}
 
 for (var i = 0, obj; i < conf.aggregationType.data.length; i++) {
 obj = conf.aggregationType.data[i];

___
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 19965: EV, upgraded to valueType enum

2015-09-03 Thread noreply

revno: 19965
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 13:03:34 +0200
message:
  EV, upgraded to valueType enum
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js


--
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-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2015-09-03 10:15:10 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2015-09-03 11:03:34 +
@@ -3795,7 +3795,7 @@
 var layoutWindow = ns.app.aggregateLayoutWindow;
 
 this.each( function(record) {
-if (Ext.Array.contains(['int', 'number'], record.data.valueType)) {
+if (Ext.Array.contains(ns.core.conf.valueType.numericTypes, record.data.valueType)) {
 layoutWindow.valueStore.add(record.data);
 }
 });
@@ -4364,19 +4364,19 @@
 	return 'Ext.ux.panel.OrganisationUnitGroupSetContainer';
 }
 
-if (element.valueType === 'int' || element.valueType === 'number') {
+if (Ext.Array.contains(ns.core.conf.valueType.numericTypes, element.valueType)) {
 	return 'Ext.ux.panel.DataElementIntegerContainer';
 }
 
-if (element.valueType === 'string') {
+if (Ext.Array.contains(ns.core.conf.valueType.textTypes, element.valueType)) {
 	return 'Ext.ux.panel.DataElementStringContainer';
 }
 
-if (element.valueType === 'date') {
+if (Ext.Array.contains(ns.core.conf.valueType.dateTypes, element.valueType)) {
 	return 'Ext.ux.panel.DataElementDateContainer';
 }
 
-if (element.valueType === 'bool' || element.valueType === 'trueOnly') {
+if (Ext.Array.contains(ns.core.conf.valueType.booleanTypes, element.valueType)) {
 	return 'Ext.ux.panel.DataElementBooleanContainer';
 }
 
@@ -4417,7 +4417,7 @@
 allElements = [],
 aggWindow = ns.app.aggregateLayoutWindow,
 //queryWindow = ns.app.queryLayoutWindow,
-includeKeys = ['int', 'number', 'bool', 'boolean', 'trueOnly'],
+includeKeys = ns.core.conf.valueType.aggregateTypes,
 ignoreKeys = ['pe', 'ou'],
 recordMap = {
 	'pe': {id: 'pe', name: 'Periods'},
@@ -4455,7 +4455,7 @@
 element = dataElements[i];
 allElements.push(element);
 
-if (element.valueType === 'int' && element.filter) {
+if (Ext.Array.contains(ns.core.conf.valueType.numericTypes, element.valueType) && element.filter) {
 	a = element.filter.split(':');
 	numberOfElements = a.length / 2;
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js	2015-09-02 18:25:31 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js	2015-09-03 11:03:34 +
@@ -677,6 +677,14 @@
 idNameMap: {}
 };
 
+conf.valueType = {
+	numericTypes: ['NUMBER','UNIT_INTERVAL','PERCENTAGE','INTEGER','INTEGER_POSITIVE','INTEGER_NEGATIVE','INTEGER_ZERO_OR_POSITIVE'],
+	textTypes: ['TEXT','LONG_TEXT','LETTER','PHONE_NUMBER','EMAIL'],
+	booleanTypes: ['BOOLEAN','TRUE_ONLY'],
+	dateTypes: ['DATE','DATETIME'],
+	aggregateTypes: ['NUMBER','UNIT_INTERVAL','PERCENTAGE','INTEGER','INTEGER_POSITIVE','INTEGER_NEGATIVE','INTEGER_ZERO_OR_POSITIVE','BOOLEAN','TRUE_ONLY']
+}
+
 for (var i = 0, obj; i < conf.aggregationType.data.length; i++) {
 obj = conf.aggregationType.data[i];
 conf.aggregationType.idNameMap[obj.id] = obj.text;

___
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] BAO Sytems Pricing

2015-09-03 Thread Guy Ekani
Hello Everyone,

We are looking for a national implementation for the integration of ten 
program, and we would like to know what's de difference between these two 
hosting option? what's the speed of the CPU? do we have to look for more CPU or 
More RAM? what the capacity of SSD storage ?
 - BAO AT2 ($400/mo) = 30 GB RAM, 4 CPU core, SSD storage, $250 setup fee
 - BAO ST4 ($400/mo) = 16 GB RAM, 8 CPU core, SSD storage, $150 setup fee
Sincerely, = EKANI Guy 
 



___
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] error using curl command

2015-09-03 Thread Morten Olav Hansen
Try to test with something simpler

curl -u user:pass http://server/api/dataElements

And see if it works

--
Morten

On Thu, Sep 3, 2015 at 5:23 PM, Knut Staring  wrote:

> Channara, are you using GOW?
>
> https://github.com/bmatzelle/gow
>
> On Thu, Sep 3, 2015 at 12:08 PM, Morten Olav Hansen 
> wrote:
>
>> I have also seen weird issues on window versions of cURL where -u
>> user:pass is required to be FIRST (mac/linux should be fine)
>>
>> --
>> Morten
>>
>> On Thu, Sep 3, 2015 at 5:07 PM, Bob Jolliffe 
>> wrote:
>>
>>> Hi Channara
>>>
>>> The man page for curl indicates that the format of the command is:
>>>
>>> curl  
>>>
>>> Try moving your url to the end of the line, after the options.  Also you
>>> might want to add "http://localhost...";
>>>
>>> On 3 September 2015 at 11:01, channara rin 
>>> wrote:
>>>
 Hi DHIS2 friends,
 i tried use curl command to import tracker, but i got error.
 can you help me what is problem?
 ***THIS IS COMMAND RUNNING:
 [image: Inline image 1]

 ***THIS IS CONSOLE in APACHE
 [image: Inline image 2]

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


>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> 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


Re: [Dhis2-devs] BAO Sytems Pricing

2015-09-03 Thread Steffen Tengesdal
Hello Guy,

I have responded outside of this thread as a representative of BAO.  

The short answer for others that may be interested is that the AT is our 
Advanced Tier with more security, scalability (no limit on SSD, easy to move 
between tiers, etc), and compliance to various standards.   ST is our standard 
tier with adequate security, but better suited for development or smaller 
deployments of DHIS 2. Many clients combine AT and ST where they use AT for 
production and ST for development/training/etc. Please see my other reply for 
additional details.

Steffen Tengesdal


> On Sep 3, 2015, at 7:15 AM, Guy Ekani  wrote:
> 
> Hello Everyone,
> 
> We are looking for a national implementation for the integration of ten 
> program, and we would like to know what's de difference between these two 
> hosting option? what's the speed of the CPU? do we have to look for more CPU 
> or More RAM? what the capacity of SSD storage ?
>  - BAO AT2 ($400/mo) = 30 GB RAM, 4 CPU core, SSD storage, $250 setup fee
>  - BAO ST4 ($400/mo) = 16 GB RAM, 8 CPU core, SSD storage, $150 setup fee
> 
> Sincerely,
>  
> =
> EKANI Guy 
> 
> 
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp

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


Re: [Dhis2-devs] [Dhis2-users] Amazon EC2 memory configuration

2015-09-03 Thread David Huser
Thanks all for your suggestions. I got an instance from a simpler VPS 
service (DigitalOcean) with 2GB/2CPU and it's running well without any 
complex configurations needed.


Initially I followed the Implementation Guides' minimal requirements 
from 
https://www.dhis2.org/doc/snapshot/en/implementer/html/dhis2_implementation_guide_en_full.html#d3606e413
and suggest adding the mentioned implications to it, may help other 
implementers, too (or should I add it to 
https://github.com/dhis2/dhis2-docs/blob/master/src/docbkx/en/dhis2_implementation_guide_installation.xml#L17 
myself?)


Best
David


On 02.09.2015 23:38, Bob Jolliffe wrote:

Hi David

The log file does seem to indicate that the startup was successful.
It does look like an orderly shutdown rather than any sign of
out-of-memory exceptions.  Which happens about 1 minute after the
successful startup.  Did you shut it down yourself or it just
collapsed without you doing anything?

if you started it then couldn't access it, so you shut it down, it
might well be related to a firewall issue as per Lars's suggestion.

Don't pay the SEVERE memory leak exceptions too much mind.  These are
important if you are starting and stopping individual web applications
in a (continuous) running tomcat.  They don't mean much at all if you
are bringing down the whole tomcat server.

Running in 1G is a challenge and you might be able to get dhis up and
running but barely functional.  There are a few things to try:

1.  Don't try to optimize postgres settings at all.  Let it run in the
bare minimum out-of-the-box default.  If I add up all your java and
postgres allocations you are already over 1G without even considering
kernel memory and the like.

2.  You could (in server.xml) reduce the max size of tomcat threadpool
to maybe 4 or 5.

3.  There are some dhis internal threadpool configs you can also
reduce but its a bit more fiddly (and I don't have the details at
hand)

The sensible thing (depending on what you are trying to achieve) is to
increase your available RAM to 2G or more.  getting it to run in 1G is
an interesting challenge which I've achieved once or twice but really
not all that useful.

Bob

On 2 September 2015 at 17:52, Lars Helge Øverland  wrote:

Hi David,

INFO: Pausing ProtocolHandler ["http-bio-8080"]

you are running on port 8080, this might be related to firewalls on aws. Try
running on port 80 (conf/server.xml).

Alternatively check if firewalls are active and blocks 8080.

regards,

Lars





On Wed, Sep 2, 2015 at 3:47 PM, Dan Cocos  wrote:

At BAO we've found we could only reliably support DHIS 2 with a minimum of
2GB.


Dan Cocos
BAO Systems
www.baosystems.com
T: +1 202-569-8751 | gchat:dco...@baosystems.com

On Sep 2, 2015, at 7:33 AM, Jason Pickering
wrote:


Are you sure that Tomcat actually shut down ?

Be sure Tomcat is dead by invoking ps -ef | grep tomcat and killing any
processes(es) which may be running, and then start it again. If you get that
memory leak error again, then something else is not right.

Having said that, I agree with Knut. 1GB will really be pushing it, but
you might be able to get it to work.

Regards,
Jason




On Wed, Sep 2, 2015 at 12:56 PM, Knut Staring  wrote:

Hi David,

1 GB is probably pushing it a bit, AFAIK. Possible, but not too easy2
GB should be fine.

Knut

On Wed, Sep 2, 2015 at 12:11 PM, David Huser
wrote:

Hi

I registered for a free tier EC2 instance (t2.micro) on Amazon with
Ubuntu 14.04 AMD64http://aws.amazon.com/ec2/instance-types/
I have set it up according to the DHIS2 implementation manual.
I'm aware that this low hardware specifications are not ready for
national use, I'd like to use it as prototyping resource. However, the
server responds to pings but is not accessible through the browser. I
suspect the memory configuration. Please find the relevant configurations /
error messages in red below.

Hardware:
RAM: 1GB memory
CPU: 1 CPU, spike balancing (t2.micro tier from amazon)
Disk: 20GB

Basically, I just divided the RAM specs from the implementation manual
(2x 8GB) for each attribute by 16 (I have 1GB).


$ cat /etc/postgresql/9.3/main/postgresql.conf
shared_buffers = 128MB
work_mem = 1MB
maintenance_work_mem = 32MB
effective_cache_size = 128MB

$ java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6)
(7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)



$ cat /tomcat-dhis/bin/setenv.sh
#!/bin/sh
#

CATALINA_HOME=/usr/share/tomcat7

# The first existing directory is used for JAVA_HOME (if JAVA_HOME is
not
# defined in $DEFAULT)
JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm"

# Look for the right JVM to use
for jdir in $JDK_DIRS; do
 if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
 JAVA_HOME_TMP="$jdir"
 # checks for a real JDK like environment, needed to check if
 # really the java-gcj-compat-dev package i

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19966: Value type fixes

2015-09-03 Thread noreply

revno: 19966
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 14:15:43 +0200
message:
  Value type fixes
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java
  
dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ValidationUtilsTest.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/GetProgramMetaDataAction.java
  
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetHistoryAction.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-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java	2015-09-03 04:17:55 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java	2015-09-03 12:15:43 +
@@ -309,7 +309,7 @@
 return null;
 }
 
-if ( dataElement == null || dataElement.getType() == null || dataElement.getType().isEmpty() )
+if ( dataElement == null || dataElement.getValueType() == null )
 {
 return "data_element_or_type_null_or_empty";
 }
@@ -390,7 +390,7 @@
 {
 String aggOperator = dataElement.getAggregationOperator();
 
-return VALUE_TYPE_INT.equals( dataElement.getType() ) && MathUtils.isZero( value ) && !dataElement.isZeroIsSignificant() &&
+return dataElement.getValueType().isNumeric() && MathUtils.isZero( value ) && !dataElement.isZeroIsSignificant() &&
 !(AGGREGATION_OPERATOR_AVERAGE_SUM.equals( aggOperator ) || AGGREGATION_OPERATOR_AVERAGE.equals( aggOperator ));
 }
 

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ValidationUtilsTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ValidationUtilsTest.java	2015-07-19 15:50:46 +
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ValidationUtilsTest.java	2015-09-03 12:15:43 +
@@ -28,6 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.common.ValueType;
 import org.hisp.dhis.dataelement.DataElement;
 import org.junit.Test;
 
@@ -104,7 +105,7 @@
 public void testDataValueIsZeroAndInsignificant()
 {
 DataElement de = new DataElement( "DEA" );
-de.setType( DataElement.VALUE_TYPE_INT );
+de.setValueType( ValueType.INTEGER );
 de.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM );
 
 assertTrue( dataValueIsZeroAndInsignificant( "0", de ) );
@@ -118,7 +119,7 @@
 public void testDataValueIsValid()
 {
 DataElement de = new DataElement( "DEA" );
-de.setType( DataElement.VALUE_TYPE_INT );
+de.setValueType( ValueType.INTEGER );
 
 assertNull( dataValueIsValid( null, de ) );
 assertNull( dataValueIsValid( "", de ) );
@@ -126,46 +127,46 @@
 assertNull( dataValueIsValid( "34", de ) );
 assertNotNull( dataValueIsValid( "Yes", de ) );
 
-de.setNumberType( DataElement.VALUE_TYPE_NUMBER );
+de.setValueType( ValueType.NUMBER );
 
 assertNull( dataValueIsValid( "3.7", de ) );
 assertNotNull( dataValueIsValid( "No", de ) );
 
-de.setNumberType( DataElement.VALUE_TYPE_POSITIVE_INT );
-
-assertNull( dataValueIsValid( "3", de ) );
-assertNotNull( dataValueIsValid( "-4", de ) );
-
-de.setNumberType( DataElement.VALUE_TYPE_ZERO_OR_POSITIVE_INT );
-
-assertNull( dataValueIsValid( "3", de ) );
-assertNotNull( dataValueIsValid( "-4", de ) );
-
-de.setNumberType( DataElement.VALUE_TYPE_NEGATIVE_INT );
+de.setValueType( ValueType.INTEGER_POSITIVE );
+
+assertNull( dataValueIsValid( "3", de ) );
+assertNotNull( dataValueIsValid( "-4", de ) );
+
+de.setValueType( ValueType.INTEGER_ZERO_OR_POSITIVE );
+
+assertNull( dataValueIsValid( "3", de ) );
+assertNotNull( dataValueIsValid( "-4", de ) );
+
+de.setValueType( ValueType.INTEGER_NEGATIVE );
 
 assertNull( dataValueIsValid( "-3", de ) );
 assertNotNull( dataValueIsValid( "4", de ) );
 
-de.setType( DataElement.VALUE_TYPE_TEXT );
+de.setValueType( ValueType.TEXT );
 
 assertNull( dataValueIsValid( "0", de ) );
 
-de.setType( DataElement.VALUE_TYPE_BOOL );
+de.setValueType( ValueTy

Re: [Dhis2-devs] BAO Sytems Pricing

2015-09-03 Thread Guy Ekani
Thank You very much for your explanation,
We will come back to you soon
Sincerely, = EKANI Guy 
 


  


 Le Jeudi 3 septembre 2015 12h52, Steffen Tengesdal  
a écrit :
   

 Hello Guy,
I have responded outside of this thread as a representative of BAO.  
The short answer for others that may be interested is that the AT is our 
Advanced Tier with more security, scalability (no limit on SSD, easy to move 
between tiers, etc), and compliance to various standards.   ST is our standard 
tier with adequate security, but better suited for development or smaller 
deployments of DHIS 2. Many clients combine AT and ST where they use AT for 
production and ST for development/training/etc. Please see my other reply for 
additional details.
Steffen Tengesdal


On Sep 3, 2015, at 7:15 AM, Guy Ekani  wrote:
Hello Everyone,

We are looking for a national implementation for the integration of ten 
program, and we would like to know what's de difference between these two 
hosting option? what's the speed of the CPU? do we have to look for more CPU or 
More RAM? what the capacity of SSD storage ?
 - BAO AT2 ($400/mo) = 30 GB RAM, 4 CPU core, SSD storage, $250 setup fee
 - BAO ST4 ($400/mo) = 16 GB RAM, 8 CPU core, SSD storage, $150 setup fee
Sincerely, = EKANI Guy 
 



 ___
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 19967: event-capture: some refactoring; type -> valueType - WIP

2015-09-03 Thread noreply

revno: 19967
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-09-03 15:13:08 +0200
message:
  event-capture: some refactoring; type -> valueType - WIP
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js


--
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-apps/src/main/webapp/dhis-web-event-capture/index.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html	2015-06-15 12:08:18 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html	2015-09-03 13:13:08 +
@@ -70,7 +70,7 @@
 
 
 
-
+
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-09-03 10:36:07 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-09-03 13:13:08 +
@@ -16,7 +16,6 @@
 orderByFilter,
 SessionStorageService,
 Paginator,
-OptionSetService,
 MetaDataFactory,
 ProgramFactory,   
 DHIS2EventFactory,
@@ -30,6 +29,7 @@
 CurrentSelection,
 ModalService,
 DialogService,
+CommonUtils,
 AuthorityService,
 TrackerRulesExecutionService,
 TrackerRulesFactory) {
@@ -189,9 +189,14 @@
   showFilter: false, 
   show: prStDe.displayInReports});
 
-$scope.filterTypes[prStDe.dataElement.id] = prStDe.dataElement.type;
+$scope.filterTypes[prStDe.dataElement.id] = prStDe.dataElement.valueType;
 
-if(prStDe.dataElement.type === 'date' || prStDe.dataElement.type === 'int' ){
+if(prStDe.dataElement.type === 'DATE' || 
+prStDe.dataElement.type === 'NUMBER' ||
+prStDe.dataElement.type === 'INTEGER' ||
+prStDe.dataElement.type === 'INTEGER_POSITIVE' || 
+prStDe.dataElement.type === 'INTEGER_NEGATIVE' ||
+prStDe.dataElement.type === 'INTEGER_ZERO_OR_POSITIVE'){
 $scope.filterText[prStDe.dataElement.id]= {};
 }
 });
@@ -260,46 +265,13 @@
 
 //converting event.datavalues[i].datavalue.dataelement = value to
 //event[dataElement] = value for easier grid display.
-if($scope.prStDes[dataValue.dataElement]){
-
-var val = dataValue.value;
-if(angular.isObject($scope.prStDes[dataValue.dataElement].dataElement)){   
-
-//converting int string value to number for proper sorting.
-if($scope.prStDes[dataValue.dataElement].dataElement.type === 'int'){
-if( dhis2.validation.isNumber(val)  ){
-//val = new Number(val);
-val = parseFloat(val, 10);
-}
-}
-if($scope.prStDes[dataValue.dataElement].dataElement.optionSetValue){
-if($scope.prStDes[dataValue.dataElement].dataElement.optionSet &&
-$scope.prStDes[dataValue.dataElement].dataElement.optionSet.id &&
-$scope.optionSets[$scope.prStDes[dataValue.dataElement].dataElement.optionSet.id] &&
-  

[Dhis2-devs] Fiscal quarters crossing calendar years

2015-09-03 Thread Seid Hussein
Hi all,

We have a unique requirement here in Ethiopia. We have 13 months with the
first 12 having 30 days each and the 13th one having 5 or 6 depending on
leap year. Since data about the 13th month is moved to the first month of
the next year (even when collected manually), we did not face any problems
regarding that.

But we are facing a challenge in defining quarters. The fiscal year of
Ethiopia starts in month 11 of the last year, effectively making quarter I
happen in two different years. However, DHIS2 does not handle such quarters.

Have any of you faced these kind of challenges in other implementations in
other countries? If so, how did you handle it?

Your comments and suggestions are appreciated.


Regards,


Seid,
___
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] DHIS2 App: edit custom js and css

2015-09-03 Thread Victor Garcia
Hi all,

we want to share with the community an app that allows to edit the
custom javascript and css files that can be added to the DHIS instance
(I mean these files
https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s48.html).

The app allows to edit the files directly in the browser with an
embedded javascript editor (ACE Editor), so it is not needed to
manually upload the files.

Take care of cache: if the files are modified and you cannot see the
modifications, clean browser cache. If using nginx, the files can be
also cached by nginx.

The app is attached in this email, but if we can upload it to a common
repository please tell us.

Regards!

Víctor
___
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 19968: rules engine is now update for type -> valueType change.

2015-09-03 Thread noreply

revno: 19968
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-09-03 16:22:27 +0200
message:
  rules engine is now update for type -> valueType change.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.validations.js


--
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-apps/src/main/webapp/dhis-web-event-capture/index.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html	2015-09-03 13:13:08 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html	2015-09-03 14:22:27 +
@@ -70,7 +70,7 @@
 
 
 
-
+
 
 
 
@@ -80,12 +80,12 @@
 
 
 
-
 
+
 
 
 
-
+
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js	2015-08-25 14:54:19 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js	2015-09-03 14:22:27 +
@@ -432,7 +432,7 @@
 var programRuleVariablesArray = [];
 //Loop through and add the variables belonging to this program
 angular.forEach(variables, function(variable){
-   if(variable.program.id == programUid) {
+   if(variable.program.id === programUid) {
 programRuleVariablesArray.push(variable);
}
 });

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js	2015-09-03 13:13:08 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js	2015-09-03 14:22:27 +
@@ -359,7 +359,7 @@
 ' ng-disabled="isHidden(prStDes.' + fieldId + '.dataElement.id) || selectedEnrollment.status===\'CANCELLED\' || selectedEnrollment.status===\'COMPLETED\' || currentEvent[uid]==\'uid\' || currentEvent.editingNotAllowed"' +
 ' ng-required="{{prStDes.' + fieldId + '.compulsory}}" ';
 
-if (prStDe && prStDe.dataElement && prStDe.dataElement.type) {
+if (prStDe && prStDe.dataElement && prStDe.dataElement.valueType) {
 //check if dataelement has optionset
 if (prStDe.dataElement.optionSetValue) {
 var optionSetId = prStDe.dataElement.optionSet.id; 
@@ -373,14 +373,18 @@
 }
 else {
 //check data element type and generate corresponding angular input field
-if (prStDe.dataElement.type === "int") {
+if (prStDe.dataElement.valueType === "NUMBER" || 
+		prStDe.dataElement.valueType === "INTEGER" || 
+		prStDe.dataElement.valueType === "INTEGER_POSITIVE" ||
+		prStDe.dataElement.valueType === "INTEGER_NEGATIVE" ||
+		prStDe.dataElement.valueType === "INTEGER_ZERO_OR_POSITIVE") {
 newInputField = '';
 }
-else if (prStDe.dataElement.type === "bool") {
+else if (prStDe.dataElement.valueType === "BOOLEAN") {
 newInputField = '' +
@@ -389,7 +393,7 @@
 '{{\'yes\'| translate}}' +
 ' ';
 }
-else if (prStDe.dataElement.type === "date") {
+  

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19969: Event analytics, query. Added support for program indicators per individual event. Only expressio...

2015-09-03 Thread noreply

revno: 19969
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 16:31:20 +0200
message:
  Event analytics, query. Added support for program indicators per individual 
event. Only expression is evaluated.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventAnalyticsService.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/EventAnalyticsController.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-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java	2015-09-03 03:11:47 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java	2015-09-03 14:31:20 +
@@ -74,6 +74,7 @@
 import org.hisp.dhis.period.RelativePeriods;
 import org.hisp.dhis.period.comparator.AscendingPeriodComparator;
 import org.hisp.dhis.program.Program;
+import org.hisp.dhis.program.ProgramIndicator;
 import org.hisp.dhis.trackedentity.TrackedEntityAttributeDimension;
 import org.hisp.dhis.trackedentity.TrackedEntityDataElementDimension;
 import org.hisp.dhis.user.User;
@@ -157,6 +158,9 @@
 @Scanned
 protected List itemOrganisationUnitGroups = new ArrayList<>();
 
+@Scanned
+protected List itemProgramIndicators = new ArrayList<>();
+
 protected String digitGroupSeparator;
 
 protected int sortOrder;
@@ -219,6 +223,11 @@
 return itemOrganisationUnitGroups != null && !itemOrganisationUnitGroups.isEmpty();
 }
 
+public boolean hasItemProgramIndicators()
+{
+return itemProgramIndicators != null && !itemProgramIndicators.isEmpty();
+}
+
 public boolean hasSortOrder()
 {
 return sortOrder != 0;
@@ -840,6 +849,7 @@
 userOrganisationUnitChildren = false;
 userOrganisationUnitGrandChildren = false;
 itemOrganisationUnitGroups.clear();
+itemProgramIndicators.clear();
 }
 
 @Override
@@ -879,6 +889,7 @@
 userOrganisationUnitChildren = object.isUserOrganisationUnitChildren();
 userOrganisationUnitGrandChildren = object.isUserOrganisationUnitGrandChildren();
 itemOrganisationUnitGroups = object.getItemOrganisationUnitGroups();
+itemProgramIndicators = object.getItemProgramIndicators();
 digitGroupSeparator = object.getDigitGroupSeparator();
 userOrganisationUnit = object.isUserOrganisationUnit();
 sortOrder = object.getSortOrder();
@@ -1114,6 +1125,20 @@
 }
 
 @JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlElementWrapper( localName = "itemProgramIndicators", namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlProperty( localName = "itemProgramIndicator", namespace = DxfNamespaces.DXF_2_0 )
+public List getItemProgramIndicators()
+{
+return itemProgramIndicators;
+}
+
+public void setItemProgramIndicators( List itemProgramIndicators )
+{
+this.itemProgramIndicators = itemProgramIndicators;
+}
+
+@JsonProperty
 @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
 public String getDigitGroupSeparator()

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java	2015-08-02 14:59:59 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java	2015-09-03 14:31:20 +
@@ -29,10 +29,12 @@
  */
 
 import java.util.Date;
+import java.util.List;
 
 import org.hisp.dhis.analytics.EventOutputType;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.program.Program;
+import org.hisp.dhis.program.ProgramIndicator;
 import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 
@@ -60,11 +62,15 @@
 // Base class emulation methods
 // ---

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19970: more conversion of valueTypes

2015-09-03 Thread noreply

revno: 19970
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-09-03 16:55:07 +0200
message:
  more conversion of valueTypes
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.filters.js


--
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-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-09-03 13:13:08 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-09-03 14:55:07 +
@@ -169,10 +169,10 @@
 $scope.newDhis2Event = {};
 
 $scope.eventGridColumns.push({name: 'form_id', id: 'uid', valueType: 'string', compulsory: false, showFilter: false, show: false});
-$scope.filterTypes['uid'] = 'string';
+$scope.filterTypes['uid'] = 'TEXT';
 
 $scope.eventGridColumns.push({name: $scope.selectedProgramStage.reportDateDescription ? $scope.selectedProgramStage.reportDateDescription : 'incident_date', id: 'event_date', type: 'date', compulsory: false, showFilter: false, show: true});
-$scope.filterTypes['event_date'] = 'date';
+$scope.filterTypes['event_date'] = 'DATE';
 $scope.filterText['event_date']= {};
 
 angular.forEach($scope.selectedProgramStage.programStageDataElements, function(prStDe){
@@ -181,11 +181,17 @@
 
 //generate grid headers using program stage data elements
 //create a template for new event
-//for date type dataelements, filtering is based on start and end dates
+//for date type dataelements, filtering is based on start and end dates
 $scope.eventGridColumns.push({name: prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.name, 
   id: prStDe.dataElement.id, 
   valueType: prStDe.dataElement.valueType, 
   compulsory: prStDe.compulsory, 
+  filterWithRange: prStDe.dataElement.valueType === 'DATE' || 
+prStDe.dataElement.valueType === 'NUMBER' || 
+prStDe.dataElement.valueType === 'INTEGER' || 
+prStDe.dataElement.valueType === 'INTEGER_POSITIVE' || 
+prStDe.dataElement.valueType === 'INTEGER_NEGATIVE' || 
+prStDe.dataElement.valueType === 'INTEGER_ZERO_OR_POSITIVE' ? true : false,  
   showFilter: false, 
   show: prStDe.displayInReports});
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html	2015-08-25 14:54:19 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html	2015-09-03 14:55:07 +
@@ -51,10 +51,10 @@
 
 
 
-
+
 
 
-
+
 
 
 
@@ -62,10 +62,26 @@
 
 
   
-
-
-
-
+
+
+   

Re: [Dhis2-devs] Moving directly from 2.18 to 2.20

2015-09-03 Thread Victor Garcia
Thank you both for the comments. They are reassuring ;-)

On 3 September 2015 at 09:46, Jason Pickering
 wrote:
> And, be sure to remove everything in the tomcat/webapps/dhis directory (or
> your local equivalent happens to be). You do not want to upgrade the WAR
> file without also removing the director prior to starting Tomcat. Making a
> backup copy of your database, of course, is smart as well. :)
>
> Regards
> Jason
>
>
> On Thu, Sep 3, 2015 at 9:40 AM, Lars Helge Øverland 
> wrote:
>>
>>
>> Hi,
>>
>>
  Also, is it required (or safer) to run
 before the Upgrade SQL scripts?
>>
>>
>> You should stop the server, run the scripts, upgrade the war file, and
>> then start the server.
>>
>> Lars
>>
>>
>>


 Thanks,

 Víctor

 ___
 Mailing list: https://launchpad.net/~dhis2-devs
 Post to : dhis2-devs@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-devs
 More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> http://www.dhis2.org
>>>
>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> http://www.dhis2.org
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049

___
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 19971: Reverted r 19969

2015-09-03 Thread noreply

revno: 19971
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 17:25:27 +0200
message:
  Reverted r 19969
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventAnalyticsService.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/EventAnalyticsController.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-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java	2015-09-03 14:31:20 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java	2015-09-03 15:25:27 +
@@ -74,7 +74,6 @@
 import org.hisp.dhis.period.RelativePeriods;
 import org.hisp.dhis.period.comparator.AscendingPeriodComparator;
 import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramIndicator;
 import org.hisp.dhis.trackedentity.TrackedEntityAttributeDimension;
 import org.hisp.dhis.trackedentity.TrackedEntityDataElementDimension;
 import org.hisp.dhis.user.User;
@@ -158,9 +157,6 @@
 @Scanned
 protected List itemOrganisationUnitGroups = new ArrayList<>();
 
-@Scanned
-protected List itemProgramIndicators = new ArrayList<>();
-
 protected String digitGroupSeparator;
 
 protected int sortOrder;
@@ -223,11 +219,6 @@
 return itemOrganisationUnitGroups != null && !itemOrganisationUnitGroups.isEmpty();
 }
 
-public boolean hasItemProgramIndicators()
-{
-return itemProgramIndicators != null && !itemProgramIndicators.isEmpty();
-}
-
 public boolean hasSortOrder()
 {
 return sortOrder != 0;
@@ -849,7 +840,6 @@
 userOrganisationUnitChildren = false;
 userOrganisationUnitGrandChildren = false;
 itemOrganisationUnitGroups.clear();
-itemProgramIndicators.clear();
 }
 
 @Override
@@ -889,7 +879,6 @@
 userOrganisationUnitChildren = object.isUserOrganisationUnitChildren();
 userOrganisationUnitGrandChildren = object.isUserOrganisationUnitGrandChildren();
 itemOrganisationUnitGroups = object.getItemOrganisationUnitGroups();
-itemProgramIndicators = object.getItemProgramIndicators();
 digitGroupSeparator = object.getDigitGroupSeparator();
 userOrganisationUnit = object.isUserOrganisationUnit();
 sortOrder = object.getSortOrder();
@@ -1125,20 +1114,6 @@
 }
 
 @JsonProperty
-@JsonView( { DetailedView.class, ExportView.class } )
-@JacksonXmlElementWrapper( localName = "itemProgramIndicators", namespace = DxfNamespaces.DXF_2_0 )
-@JacksonXmlProperty( localName = "itemProgramIndicator", namespace = DxfNamespaces.DXF_2_0 )
-public List getItemProgramIndicators()
-{
-return itemProgramIndicators;
-}
-
-public void setItemProgramIndicators( List itemProgramIndicators )
-{
-this.itemProgramIndicators = itemProgramIndicators;
-}
-
-@JsonProperty
 @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
 public String getDigitGroupSeparator()

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java	2015-09-03 14:31:20 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java	2015-09-03 15:25:27 +
@@ -29,12 +29,10 @@
  */
 
 import java.util.Date;
-import java.util.List;
 
 import org.hisp.dhis.analytics.EventOutputType;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramIndicator;
 import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 
@@ -62,15 +60,11 @@
 // Base class emulation methods
 // -
 
-List getItemProgramIndicators();
- 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19973: event-capture: now complete for type->valueType change.

2015-09-03 Thread noreply

revno: 19973
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-09-03 17:33:49 +0200
message:
  event-capture: now complete for type->valueType change.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html


--
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-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-09-03 14:55:07 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-09-03 15:33:49 +
@@ -168,10 +168,10 @@
 $scope.filterTypes = {};   
 $scope.newDhis2Event = {};
 
-$scope.eventGridColumns.push({name: 'form_id', id: 'uid', valueType: 'string', compulsory: false, showFilter: false, show: false});
+$scope.eventGridColumns.push({name: 'form_id', id: 'uid', valueType: 'TEXT', compulsory: false, filterWithRange: false, showFilter: false, show: false});
 $scope.filterTypes['uid'] = 'TEXT';
 
-$scope.eventGridColumns.push({name: $scope.selectedProgramStage.reportDateDescription ? $scope.selectedProgramStage.reportDateDescription : 'incident_date', id: 'event_date', type: 'date', compulsory: false, showFilter: false, show: true});
+$scope.eventGridColumns.push({name: $scope.selectedProgramStage.reportDateDescription ? $scope.selectedProgramStage.reportDateDescription : 'incident_date', id: 'event_date', valueType: 'DATE', filterWithRange: true, compulsory: false, showFilter: false, show: true});
 $scope.filterTypes['event_date'] = 'DATE';
 $scope.filterText['event_date']= {};
 
@@ -289,11 +289,11 @@
 }
 
 if($scope.noteExists && !GridColumnService.columnExists($scope.eventGridColumns, 'comment')){
-$scope.eventGridColumns.push({name: 'comment', id: 'comment', type: 'string', compulsory: false, showFilter: false, show: true});
+$scope.eventGridColumns.push({name: 'comment', id: 'comment', type: 'TEXT', filterWithRange: false, compulsory: false, showFilter: false, show: true});
 }
 
 if(!$scope.sortHeader.id){
-$scope.sortEventGrid({name: $scope.selectedProgramStage.reportDateDescription ? $scope.selectedProgramStage.reportDateDescription : 'incident_date', id: 'event_date', type: 'date', compulsory: false, showFilter: false, show: true});
+$scope.sortEventGrid({name: $scope.selectedProgramStage.reportDateDescription ? $scope.selectedProgramStage.reportDateDescription : 'incident_date', id: 'event_date', type: 'DATE', compulsory: false, showFilter: false, show: true});
 }
 }
 
@@ -399,8 +399,8 @@
 
 if($scope.formHasUnsavedData()){
 var modalOptions = {
-closeButtonText: 'cancel',
-actionButtonText: 'proceed',
+closeButtonText: 'no',
+actionButtonText: 'yes',
 headerText: 'warning',
 bodyText: 'unsaved_data_exists_proceed'
 };

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html	2015-09-03 14:55:07 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html	2015-09-03 15:33:49 +
@@ -54,15 +54,15 @@
 
 
 
-
+
 
 
 
 
-
+
 
-  
-
+  
+
 
 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19972: Event analytics. Impl support for program indicators for individual event query. Better approach ...

2015-09-03 Thread noreply

revno: 19972
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 17:30:38 +0200
message:
  Event analytics. Impl support for program indicators for individual event 
query. Better approach this time.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttribute.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.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-api/src/main/java/org/hisp/dhis/common/QueryItem.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java	2015-09-03 15:25:27 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java	2015-09-03 15:30:38 +
@@ -111,7 +111,7 @@
 
 public String getTypeAsString()
 {
-return valueType.getJavaClass().toString();
+return valueType.getJavaClass().getName();
 }
 
 public boolean isNumeric()

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-02 16:15:15 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-03 15:30:38 +
@@ -35,10 +35,12 @@
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import com.google.common.collect.Sets;
+
 import org.hisp.dhis.analytics.AggregationType;
 import org.hisp.dhis.attribute.AttributeValue;
 import org.hisp.dhis.common.BaseDimensionalObject;
 import org.hisp.dhis.common.BaseIdentifiableObject;
+import org.hisp.dhis.common.DimensionType;
 import org.hisp.dhis.common.DxfNamespaces;
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.MergeStrategy;
@@ -587,6 +589,16 @@
 }
 
 // -
+// DimensionalObject
+// -
+
+@Override
+public DimensionType getDimensionType()
+{
+return DimensionType.PROGRAM_DATAELEMENT;
+}
+
+// -
 // Helper getters
 // -
 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java	2015-09-03 08:15:09 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java	2015-09-03 15:30:38 +
@@ -28,16 +28,14 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonView;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-import com.google.common.collect.Sets;
+import java.util.Set;
+import java.util.regex.Pattern;
+
 import org.hisp.dhis.analytics.AggregationType;
 import org.hisp.dhis.analytics.EventOutputType;
+import org.hisp.dhis.common.BaseDimensionalObject;
 import org.hisp.dhis.common.BaseIdentifiableObject;
-import org.hisp.dhis.common.BaseNameableObject;
+import org.hisp.dhis.common.DimensionType;
 import org.hisp.dhis.common.DxfNamespaces;
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.MergeStrategy;
@@ -45,15 +43,19 @@
 import org.hisp.dhis.common.view.DetailedView;
 import org.hisp.dhis.common.view.ExportView;
 
-import java.util.Set;
-import java.util.regex.Pattern;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonView;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import com.google.common.collect.Sets;
 
 /**
  * @author Chau Thu Tran
  */
 @JacksonXmlRootElement( localName = "programIndicator", namespace = DxfNamespaces.DXF_2_0 )
 public class ProgramIndicator
-ex

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19974: tracker-capture: type->valueType change - WIP

2015-09-03 Thread noreply

revno: 19974
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-09-03 17:45:33 +0200
message:
  tracker-capture: type->valueType change - WIP
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js


--
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-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js	2015-08-26 10:26:31 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js	2015-09-03 15:45:33 +
@@ -14,7 +14,7 @@
 SessionStorageService,
 TEIService, 
 TEService,
-OptionSetService,
+MetaDataFactory,
 EnrollmentService,
 ProgramFactory,
 DHIS2EventFactory,
@@ -169,8 +169,8 @@
 if($scope.selectedTeiId){
 
 //get option sets
-$scope.optionSets = [];
-OptionSetService.getAll().then(function(optionSets){
+$scope.optionSets = []; 
+MetaDataFactory.getAll('optionSets').then(function(optionSets){
 angular.forEach(optionSets, function(optionSet){
 $scope.optionSets[optionSet.id] = optionSet;
 });

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html	2015-08-27 19:05:47 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html	2015-09-03 15:45:33 +
@@ -21,7 +21,7 @@
 
 
 
-
+
 
 
-
+
 
 
-
+
 {{'yes'| translate}}
 
 
-
+
 
 
-
+
 
 
+ 
+   
+/>
+
 
 ___
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 19975: tracker-capture: type->valueType - WIP

2015-09-03 Thread noreply

revno: 19975
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-09-03 18:09:29 +0200
message:
  tracker-capture: type->valueType - WIP
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js


--
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-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-08-24 10:22:35 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-09-03 16:09:29 +
@@ -66,10 +66,58 @@
 
  
 
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
- 
-
-
-
+
+
+
+
+
+
+
+
 {{'yes'| translate}}
 
 
-
+
 
 
-
+
 
 
 
  
 
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 {{'yes'| translate}}
 
 
-
+
 
 
-
+
 
 
- 
-
-
+
-
-
-
-
+
+
+  
-  
+ 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19976: Event analytics, program indicator, abstraction

2015-09-03 Thread noreply

revno: 19976
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 18:16:57 +0200
message:
  Event analytics, program indicator, abstraction
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.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-api/src/main/java/org/hisp/dhis/common/QueryItem.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java	2015-09-03 15:30:38 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java	2015-09-03 16:16:57 +
@@ -144,6 +144,11 @@
 return filters != null && !filters.isEmpty();
 }
 
+public boolean isProgramIndicator()
+{
+return DimensionType.PROGRAM_INDICATOR.equals( item.getDimensionType() );
+}
+
 public static List getQueryItems( Collection attributes )
 {
 List queryItems = new ArrayList<>();

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java	2015-09-03 15:30:38 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java	2015-09-03 16:16:57 +
@@ -397,7 +397,7 @@
 
 for ( QueryItem queryItem : params.getItems() )
 {
-if ( DimensionType.PROGRAM_INDICATOR.equals( queryItem.getItem().getDimensionType() ) )
+if ( queryItem.isProgramIndicator() )
 {
 ProgramIndicator in = (ProgramIndicator) queryItem.getItem();
 

___
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] error using curl command

2015-09-03 Thread channara rin
yes, it work too.


On Thu, Sep 3, 2015 at 6:45 PM, Morten Olav Hansen 
wrote:

> Try to test with something simpler
>
> curl -u user:pass http://server/api/dataElements
>
> And see if it works
>
> --
> Morten
>
> On Thu, Sep 3, 2015 at 5:23 PM, Knut Staring  wrote:
>
>> Channara, are you using GOW?
>>
>> https://github.com/bmatzelle/gow
>>
>> On Thu, Sep 3, 2015 at 12:08 PM, Morten Olav Hansen 
>> wrote:
>>
>>> I have also seen weird issues on window versions of cURL where -u
>>> user:pass is required to be FIRST (mac/linux should be fine)
>>>
>>> --
>>> Morten
>>>
>>> On Thu, Sep 3, 2015 at 5:07 PM, Bob Jolliffe 
>>> wrote:
>>>
 Hi Channara

 The man page for curl indicates that the format of the command is:

 curl  

 Try moving your url to the end of the line, after the options.  Also
 you might want to add "http://localhost...";

 On 3 September 2015 at 11:01, channara rin 
 wrote:

> Hi DHIS2 friends,
> i tried use curl command to import tracker, but i got error.
> can you help me what is problem?
> ***THIS IS COMMAND RUNNING:
> [image: Inline image 1]
>
> ***THIS IS CONSOLE in APACHE
> [image: Inline image 2]
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

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


>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> 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 19977: Event analytics, removing program indicators as items for aggregate

2015-09-03 Thread noreply

revno: 19977
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 18:53:01 +0200
message:
  Event analytics, removing program indicators as items for aggregate
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.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/event/EventQueryParams.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java	2015-09-03 08:15:09 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java	2015-09-03 16:53:01 +
@@ -28,6 +28,15 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.common.DimensionalObject.DATA_X_DIM_ID;
+import static org.hisp.dhis.common.DimensionalObject.PERIOD_DIM_ID;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
 import org.hisp.dhis.analytics.AggregationType;
 import org.hisp.dhis.analytics.DataQueryParams;
 import org.hisp.dhis.analytics.EventOutputType;
@@ -38,6 +47,8 @@
 import org.hisp.dhis.common.NameableObjectUtils;
 import org.hisp.dhis.common.QueryItem;
 import org.hisp.dhis.commons.collection.ListUtils;
+import org.hisp.dhis.commons.filter.Filter;
+import org.hisp.dhis.commons.filter.FilterUtils;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.legend.Legend;
 import org.hisp.dhis.option.OptionSet;
@@ -46,15 +57,6 @@
 import org.hisp.dhis.program.ProgramIndicator;
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import static org.hisp.dhis.common.DimensionalObject.DATA_X_DIM_ID;
-import static org.hisp.dhis.common.DimensionalObject.PERIOD_DIM_ID;
-
 /**
  * @author Lars Helge Overland
  */
@@ -147,7 +149,6 @@
 
 public static EventQueryParams fromDataQueryParams( DataQueryParams dataQueryParams )
 {
-//TODO indicator filter
 EventQueryParams params = new EventQueryParams();
 
 dataQueryParams.copyTo( params );
@@ -296,6 +297,22 @@
 }
 
 /**
+ * Removes items and item filters of type program indicators.
+ */
+public EventQueryParams removeProgramIndicatorItems()
+{
+FilterUtils.filter( items, new Filter()
+{
+public boolean retain( QueryItem object )
+{
+return !object.isProgramIndicator();
+}
+} );
+
+return this;
+}
+
+/**
  * Returns the aggregation type for this query, first by looking at the
  * aggregation type of the query, second by looking at the aggregation type
  * of the value dimension, third by returning AVERAGE;

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java	2015-09-03 15:30:38 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java	2015-09-03 16:53:01 +
@@ -176,6 +176,8 @@
 
 queryPlanner.validate( params );
 
+params.removeProgramIndicatorItems(); // Not supported as items for aggregate
+
 Grid grid = new ListGrid();
 
 int maxLimit = queryPlanner.getMaxLimit();

___
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 19978: Event query params, predicates to filter

2015-09-03 Thread noreply

revno: 19978
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 19:06:56 +0200
message:
  Event query params, predicates to filter
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.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/event/EventQueryParams.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java	2015-09-03 16:53:01 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java	2015-09-03 17:06:56 +
@@ -36,6 +36,7 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.stream.Collectors;
 
 import org.hisp.dhis.analytics.AggregationType;
 import org.hisp.dhis.analytics.DataQueryParams;
@@ -47,8 +48,6 @@
 import org.hisp.dhis.common.NameableObjectUtils;
 import org.hisp.dhis.common.QueryItem;
 import org.hisp.dhis.commons.collection.ListUtils;
-import org.hisp.dhis.commons.filter.Filter;
-import org.hisp.dhis.commons.filter.FilterUtils;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.legend.Legend;
 import org.hisp.dhis.option.OptionSet;
@@ -301,14 +300,8 @@
  */
 public EventQueryParams removeProgramIndicatorItems()
 {
-FilterUtils.filter( items, new Filter()
-{
-public boolean retain( QueryItem object )
-{
-return !object.isProgramIndicator();
-}
-} );
-
+items = items.stream().filter( item -> !item.isProgramIndicator() ).collect( Collectors.toList() );
+itemFilters = itemFilters.stream().filter( item -> !item.isProgramIndicator() ).collect( Collectors.toList() );
 return this;
 }
 

___
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 19979: Event analytics, supporting html+css representation

2015-09-03 Thread noreply

revno: 19979
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 19:21:28 +0200
message:
  Event analytics, supporting html+css representation
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/EventAnalyticsController.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/EventAnalyticsController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/EventAnalyticsController.java	2015-09-03 15:25:27 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/EventAnalyticsController.java	2015-09-03 17:21:28 +
@@ -242,6 +242,39 @@
 GridUtils.toHtml( substituteMetaData( grid ), response.getWriter() );
 }
 
+@RequestMapping( value = RESOURCE_PATH + "/aggregate/{program}.html+css", method = RequestMethod.GET )
+public void getAggregateHtmlCss(
+@PathVariable String program,
+@RequestParam( required = false ) String stage,
+@RequestParam( required = false ) String startDate,
+@RequestParam( required = false ) String endDate,
+@RequestParam Set dimension,
+@RequestParam( required = false ) Set filter,
+@RequestParam( required = false ) String value,
+@RequestParam( required = false ) AggregationType aggregationType,
+@RequestParam( required = false ) boolean skipMeta,
+@RequestParam( required = false ) boolean skipData,
+@RequestParam( required = false ) boolean skipRounding,
+@RequestParam( required = false ) boolean hierarchyMeta,
+@RequestParam( required = false ) boolean showHierarchy,
+@RequestParam( required = false ) SortOrder sortOrder,
+@RequestParam( required = false ) Integer limit,
+@RequestParam( required = false ) EventOutputType outputType,
+@RequestParam( required = false ) boolean collapseDataDimensions,
+@RequestParam( required = false ) boolean aggregateData,
+@RequestParam( required = false ) DisplayProperty displayProperty,
+Model model,
+HttpServletResponse response ) throws Exception
+{
+EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
+value, aggregationType, skipMeta, skipData, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
+collapseDataDimensions, aggregateData, displayProperty, i18nManager.getI18nFormat() );
+
+contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_HTML, CacheStrategy.RESPECT_SYSTEM_SETTING, "events.html", false );
+Grid grid = analyticsService.getAggregatedEventData( params );
+GridUtils.toHtmlCss( substituteMetaData( grid ), response.getWriter() );
+}
+
 // -
 // Query
 // -
@@ -393,6 +426,35 @@
 GridUtils.toHtml( substituteMetaData( grid ), response.getWriter() );
 }
 
+@RequestMapping( value = RESOURCE_PATH + "/query/{program}.html+css", method = RequestMethod.GET )
+public void getQueryHtmlCss(
+@PathVariable String program,
+@RequestParam( required = false ) String stage,
+@RequestParam( required = false ) String startDate,
+@RequestParam( required = false ) String endDate,
+@RequestParam Set dimension,
+@RequestParam( required = false ) Set filter,
+@RequestParam( required = false ) String ouMode,
+@RequestParam( required = false ) Set asc,
+@RequestParam( required = false ) Set desc,
+@RequestParam( required = false ) boolean skipMeta,
+@RequestParam( required = false ) boolean skipData,
+@RequestParam( required = false ) boolean hierarchyMeta,
+@RequestParam( required = false ) boolean coordinatesOnly,
+@RequestParam( required = false ) Integer page,
+@RequestParam( required = false ) Integer pageSize,
+@RequestParam( required = false ) DisplayProperty displayProperty,
+Model model,
+HttpServletResponse response ) throws Exception
+{
+EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
+ouMode, asc, desc, skipMeta, skipData, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
+
+contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_HTML, CacheStrategy.RESPECT_SYSTEM_SETTING, "events.html", 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19980: ER, EV, using html+css for html download

2015-09-03 Thread noreply

revno: 19980
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 19:30:24 +0200
message:
  ER, EV, using html+css for html download
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js


--
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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-09-03 10:58:40 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-09-03 17:30:24 +
@@ -7727,7 +7727,7 @@
 		iconCls: 'ns-menu-item-datasource',
 		handler: function() {
 			if (ns.core.init.contextPath && ns.app.paramString) {
-window.open(ns.core.init.contextPath + ns.core.web.analytics.getParamString(ns.app.layout, 'html', true), '_blank');
+window.open(ns.core.init.contextPath + ns.core.web.analytics.getParamString(ns.app.layout, 'html+css', true), '_blank');
 			}
 		}
 	},

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2015-09-03 11:03:34 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2015-09-03 17:30:24 +
@@ -7438,7 +7438,7 @@
 		iconCls: 'ns-menu-item-datasource',
 		handler: function() {
 			if (ns.core.init.contextPath && ns.app.paramString) {
-window.open(ns.core.init.contextPath + ns.core.web.analytics.getParamString(ns.app.layout, 'html'), '_blank');
+window.open(ns.core.init.contextPath + ns.core.web.analytics.getParamString(ns.app.layout, 'html+css'), '_blank');
 			}
 		}
 	},

___
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 19981: Unused strings

2015-09-03 Thread noreply

revno: 19981
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2015-09-03 19:49:15 +0200
message:
  Unused strings
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstance.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-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-03 15:30:38 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-03 17:49:15 +
@@ -216,7 +216,6 @@
 
 public DataElement()
 {
-
 }
 
 public DataElement( String name )

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstance.java	2015-08-25 21:48:10 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstance.java	2015-09-03 17:49:15 +
@@ -52,12 +52,7 @@
 public class TrackedEntityInstance
 extends BaseIdentifiableObject
 {
-public static String SEARCH_SAPERATE = "_";
 public static String PREFIX_TRACKED_ENTITY_ATTRIBUTE = "attr";
-public static String PREFIX_PROGRAM = "prg";
-public static String PREFIX_PROGRAM_INSTANCE = "pi";
-public static String PREFIX_PROGRAM_EVENT_BY_STATUS = "stat";
-public static String PREFIX_PROGRAM_STAGE = "prgst";
 
 private Set attributeValues = new HashSet<>();
 

___
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] Fiscal quarters crossing calendar years

2015-09-03 Thread Calle Hedberg
Seid,

The DHIS2 analytics engine only caters for a limited set of relatively
common data periods, as you know - including the more common financial
quarters (same as standard quarters, but different names) and financial
years (again combinations of standard quarters).

What you need is, as u say, a unique requirement - and the logical way of
handling such unique requirements is to set them up as relative
user-defined periods.

The problem with that up to now is that DHIS2 has not had what I usually
call the "anchor" period concept - i.e. the ability to specify a certain
"anchor date period point" that in turn will determine a range of other
relative user-defined periods.

There are at least to usage scenarios for such anchor dates:
either you can use them simply as an offset to cater for the timelag
between the end of a data capture reporting period and when the data is
available for analysis. We have that scenario in many/most countries: if
you are running a report for the relative period "last six months" on
September 3rd, you do not want a report for April-May-June-July-Aug-Sep
because you don't yet have data for e.g. July and Aug and Sep - so in that
case you specify an anchor date of e.g. 30th June - which will result in
the "last 6 months" report giving you data for Jan-June (where you have
data for all months).

OR you can use them to specify a "fixed" anchor date that conforms to your
financial year/quarters, and then define a range of relative periods based
on that ("current fin quarter", "previous fin quarter" etc).

Lars is working on an "anchor date" construct for 2.21 - I have no other
details, but I suspect you might be able to somehow panel-beat that
construct into something that would work.

That said - a more generic solution for all kinds of "financial" periods,
where the financial year in theory can start at any month, would be that
you use generic names for such financial years/quarters for processing BUT
where the start of the financial year is a relative period offset specified
for each database (for Ethiopia +11 or -2) and the fin period names are
user-defined (displayName). Not sure if that's ever been considered.

Regards
Calle



On 3 September 2015 at 16:19, Seid Hussein  wrote:

> Hi all,
>
> We have a unique requirement here in Ethiopia. We have 13 months with the
> first 12 having 30 days each and the 13th one having 5 or 6 depending on
> leap year. Since data about the 13th month is moved to the first month of
> the next year (even when collected manually), we did not face any problems
> regarding that.
>
> But we are facing a challenge in defining quarters. The fiscal year of
> Ethiopia starts in month 11 of the last year, effectively making quarter I
> happen in two different years. However, DHIS2 does not handle such quarters.
>
> Have any of you faced these kind of challenges in other implementations in
> other countries? If so, how did you handle it?
>
> Your comments and suggestions are appreciated.
>
>
> Regards,
>
>
> Seid,
>
> ___
> 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-19119

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


Re: [Dhis2-devs] Fiscal quarters crossing calendar years

2015-09-03 Thread Steven Uggowitzer
There are Java based libraries out there that deal with atypical calendars
Buddhist, Coptic, Ethiopic, Gregorian etc,  See:
http://www.joda.org/joda-time/   which is super-interesting if you're
fascinated by date systems.  But this would probably a significant feature
request for developers.

S


--
Steven Uggowitzer
eSHIfT Partner Network,  Entuura Ventures Ltd
Tel: +41 22 366 1920
Mob: +41 79 719 4180
Skype: fendant123
LinkedIn: http://ch.linkedin.com/in/stevenuggowitzer

On Thu, Sep 3, 2015 at 3:19 PM, Seid Hussein  wrote:

> Hi all,
>
> We have a unique requirement here in Ethiopia. We have 13 months with the
> first 12 having 30 days each and the 13th one having 5 or 6 depending on
> leap year. Since data about the 13th month is moved to the first month of
> the next year (even when collected manually), we did not face any problems
> regarding that.
>
> But we are facing a challenge in defining quarters. The fiscal year of
> Ethiopia starts in month 11 of the last year, effectively making quarter I
> happen in two different years. However, DHIS2 does not handle such quarters.
>
> Have any of you faced these kind of challenges in other implementations in
> other countries? If so, how did you handle it?
>
> Your comments and suggestions are appreciated.
>
>
> Regards,
>
>
> Seid,
>
> ___
> 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 19982: some enhancements to tracker table data entry

2015-09-03 Thread noreply

revno: 19982
committer: Markus Bekken 
branch nick: dhis2
timestamp: Thu 2015-09-03 22:50:06 +0200
message:
  some enhancements to tracker table data entry
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css


--
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-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-08-31 12:49:17 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-09-03 20:50:06 +
@@ -38,6 +38,7 @@
 $scope.hiddenFields = {};
 $scope.errorMessages = {};
 $scope.warningMessages = {};
+$scope.tableMaxNumberOfDataElements = 10;
 
 
 var userProfile = SessionStorageService.get('USER_PROFILE');
@@ -202,8 +203,8 @@
 $scope.stagesById[stage.id] = stage;
 $scope.eventsByStage[stage.id] = [];
 
-//If one of the stages has less than 7 data elements, allow sorting as table:
-if (stage.programStageDataElements.length < 7) {
+//If one of the stages has less than $scope.tableMaxNumberOfDataElements data elements, allow sorting as table:
+if (stage.programStageDataElements.length < $scope.tableMaxNumberOfDataElements) {
 $scope.stagesCanBeShownAsTable = true;
 }
 });
@@ -275,7 +276,7 @@
 };
 
 $scope.stageCanBeShownAsTable = function (stage) {
-if (stage.programStageDataElements && stage.programStageDataElements.length < 7) {
+if (stage.programStageDataElements && stage.programStageDataElements.length < $scope.tableMaxNumberOfDataElements) {
 return true;
 }
 return false;
@@ -284,7 +285,7 @@
 $scope.toggleEventsTableDisplay = function () {
 $scope.showEventsAsTables = !$scope.showEventsAsTables;
 angular.forEach($scope.programStages, function (stage) {
-if (stage.programStageDataElements.length < 7) {
+if (stage.programStageDataElements.length < $scope.tableMaxNumberOfDataElements) {
 stage.displayEventsInTable = $scope.showEventsAsTables;
 if ($scope.currentStage === stage) {
 $scope.getDataEntryForm();
@@ -416,6 +417,12 @@
 }
 }
 };
+
+$scope.switchToEventRow = function (event) {
+if($scope.currentEvent !== event) {
+$scope.showDataEntry(event,false);
+}
+};
 
 $scope.switchDataEntryForm = function () {
 $scope.displayCustomForm = !$scope.displayCustomForm;

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-09-03 16:09:29 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-09-03 20:50:06 +
@@ -197,14 +197,14 @@
 
 
  
-
-×
-{{warningMessages[prStDe.dataElement.id]}}
-
-
-×
-{{errorMessages[prStDe.dataElement.id]}}
-
+
+×
+{{warningMessages[prStDe.dataElement.id]}}
+
+
+×
+{{errorMessages[prStDe.dataElement.id]}}
+
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html	2015-06-14 09:28:40 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-

[Dhis2-devs] Recieving DHIS2 Messages In email client of choice

2015-09-03 Thread Farai Mutero
Hi All

I'm working on sending and receiving DHIS2 messages via the Web API based
on the documentation here:
https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s20.html and I
would like the message recipients to be able to view received messages in
an email client of their choice e.g Microsoft Outlook.

The following has already been done:
- Email Settings have already been setup on the DHIS2 instance in question
and is working correctly.
- All DHIS2 Users have a valid email address associated with them,

How do I go about doing this as the documentation does not specify?

Thanks

-- 
Farai Mutero
___
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] Recieving DHIS2 Messages In email client of choice

2015-09-03 Thread Dapo Adejumo
Hi Farai,
For users to receive Dhis2 messages via mail or SMS, individual profiles have 
to be enabled for messaging. That can be done under profile settings.

.Sent from a mobile phone

-Original Message-
From: "Farai Mutero" 
Sent: ‎9/‎4/‎2015 5:40
To: "DHIS 2 developers" 
Subject: [Dhis2-devs] Recieving DHIS2 Messages In email client of choice

Hi All


I'm working on sending and receiving DHIS2 messages via the Web API based on 
the documentation here: 
https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s20.html and I would 
like the message recipients to be able to view received messages in an email 
client of their choice e.g Microsoft Outlook.


The following has already been done:
- Email Settings have already been setup on the DHIS2 instance in question and 
is working correctly.
- All DHIS2 Users have a valid email address associated with them,


How do I go about doing this as the documentation does not specify?


Thanks



-- 

Farai Mutero___
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] Can tracker aggregation function aggregate the tracked data on specified period

2015-09-03 Thread Thái Chương
Hi all,
I have an issue on implementing DHIS2 with legacy tracked entities data.
My data tracked the entity on Aug 2nd 2014, means over a year.

I'm going to build an aggregation rule to aggregate the tracked data for
other level of data use. But could not see the option to specify the time
period which match to my events data imported.

Is there any way to work in my case?

Thank you very much and best regards,

-- 
THAI Chuong
YM/Skype : thaichuong159
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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19983: minor addition to ValueType

2015-09-03 Thread noreply

revno: 19983
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Fri 2015-09-04 12:24:21 +0700
message:
  minor addition to ValueType
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.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-api/src/main/java/org/hisp/dhis/common/ValueType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-03 10:21:08 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-04 05:24:21 +
@@ -28,14 +28,13 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.trackedentity.TrackedEntityInstance;
+
 import java.util.Date;
 import java.util.List;
 
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.trackedentity.TrackedEntityInstance;
-
-import com.google.common.collect.Lists;
-
 /**
  * @author Lars Helge Overland
  */
@@ -128,6 +127,111 @@
 return getFromDataElementTypes( dataElement.getType(), dataElement.getNumberType(), dataElement.getTextType() );
 }
 
+public static void setDataElementTypes( DataElement dataElement, ValueType valueType )
+{
+switch ( valueType )
+{
+case INTEGER:
+{
+dataElement.setType( DataElement.VALUE_TYPE_INT );
+dataElement.setNumberType( DataElement.VALUE_TYPE_INT );
+dataElement.setTextType( null );
+break;
+}
+case INTEGER_POSITIVE:
+{
+dataElement.setType( DataElement.VALUE_TYPE_INT );
+dataElement.setNumberType( DataElement.VALUE_TYPE_POSITIVE_INT );
+dataElement.setTextType( null );
+break;
+}
+case INTEGER_NEGATIVE:
+{
+dataElement.setType( DataElement.VALUE_TYPE_INT );
+dataElement.setNumberType( DataElement.VALUE_TYPE_NEGATIVE_INT );
+dataElement.setTextType( null );
+break;
+}
+case INTEGER_ZERO_OR_POSITIVE:
+{
+dataElement.setType( DataElement.VALUE_TYPE_INT );
+dataElement.setNumberType( DataElement.VALUE_TYPE_ZERO_OR_POSITIVE_INT );
+dataElement.setTextType( null );
+break;
+}
+case NUMBER:
+{
+dataElement.setType( DataElement.VALUE_TYPE_INT );
+dataElement.setNumberType( DataElement.VALUE_TYPE_NUMBER );
+dataElement.setTextType( null );
+break;
+}
+case UNIT_INTERVAL:
+{
+dataElement.setType( DataElement.VALUE_TYPE_INT );
+dataElement.setNumberType( DataElement.VALUE_TYPE_UNIT_INTERVAL );
+dataElement.setTextType( null );
+break;
+}
+case PERCENTAGE:
+{
+dataElement.setType( DataElement.VALUE_TYPE_INT );
+dataElement.setNumberType( DataElement.VALUE_TYPE_PERCENTAGE );
+dataElement.setTextType( null );
+break;
+}
+case TEXT:
+{
+dataElement.setType( DataElement.VALUE_TYPE_STRING );
+dataElement.setTextType( DataElement.VALUE_TYPE_TEXT );
+dataElement.setNumberType( null );
+break;
+}
+case LONG_TEXT:
+{
+dataElement.setType( DataElement.VALUE_TYPE_STRING );
+dataElement.setTextType( DataElement.VALUE_TYPE_LONG_TEXT );
+dataElement.setNumberType( null );
+break;
+}
+case BOOLEAN:
+{
+dataElement.setType( DataElement.VALUE_TYPE_BOOL );
+dataElement.setNumberType( null );
+dataElement.setTextType( null );
+break;
+}
+case TRUE_ONLY:
+{
+dataElement.setType( DataElement.VALUE_TYPE_TRUE_ONLY );
+dataElement.setNumberType( null );
+dataElement.setTextType( null );
+break;
+}
+case DATE:
+{
+dataElement.setType( DataElement.VALUE_TYPE_DATE );
+dataElement.setNumberType( null );
+dataElement.setTextType( null );
+break;
+}
+case DATETIME:
+{
+dataElement.setType( DataEle

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19984: minor, update data element store/service to use valueType for queries

2015-09-03 Thread noreply

revno: 19984
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Fri 2015-09-04 12:55:14 +0700
message:
  minor, update data element store/service to use valueType for queries
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java
  
dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.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-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java	2015-09-03 04:31:39 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java	2015-09-04 05:55:14 +
@@ -44,10 +44,7 @@
 import org.hisp.dhis.dataelement.DataElementStore;
 import org.hisp.dhis.dataset.DataSet;
 import org.springframework.jdbc.BadSqlGrammarException;
-import org.springframework.jdbc.core.RowCallbackHandler;
 
-import java.sql.ResultSet;
-import java.sql.SQLException;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
@@ -79,12 +76,12 @@
 @SuppressWarnings( "unchecked" )
 public List getAggregateableDataElements()
 {
-Set types = new HashSet<>();
-
-types.add( DataElement.VALUE_TYPE_INT );
-types.add( DataElement.VALUE_TYPE_BOOL );
-
-return getCriteria( Restrictions.in( "type", types ) ).list();
+Set valueTypes = new HashSet<>();
+
+valueTypes.addAll( ValueType.NUMERIC_TYPES );
+valueTypes.add( ValueType.BOOLEAN );
+
+return getCriteria( Restrictions.in( "valueType", valueTypes ) ).list();
 }
 
 @Override
@@ -173,7 +170,7 @@
 {
 Criteria criteria = getCriteria();
 criteria.add( Restrictions.eq( "zeroIsSignificant", zeroIsSignificant ) );
-criteria.add( Restrictions.eq( "type", DataElement.VALUE_TYPE_INT ) );
+criteria.add( Restrictions.in( "valueType", ValueType.NUMERIC_TYPES ) );
 
 return criteria.list();
 }
@@ -235,17 +232,11 @@
 
 try
 {
-jdbcTemplate.query( sql, new RowCallbackHandler()
-{
-@Override
-public void processRow( ResultSet rs )
-throws SQLException
-{
-String de = rs.getString( 1 );
-String coc = rs.getString( 2 );
+jdbcTemplate.query( sql, rs -> {
+String de = rs.getString( 1 );
+String coc = rs.getString( 2 );
 
-map.putValue( de, coc );
-}
+map.putValue( de, coc );
 } );
 }
 catch ( BadSqlGrammarException ex )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java	2015-09-03 04:42:52 +
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java	2015-09-04 05:55:14 +
@@ -262,6 +262,11 @@
 dataElementC.setType( DataElement.VALUE_TYPE_STRING );
 dataElementD.setType( DataElement.VALUE_TYPE_INT );
 
+dataElementA.setValueType( ValueType.INTEGER );
+dataElementB.setValueType( ValueType.BOOLEAN );
+dataElementC.setValueType( ValueType.TEXT );
+dataElementD.setValueType( ValueType.INTEGER );
+
 dataElementService.addDataElement( dataElementA );
 dataElementService.addDataElement( dataElementB );
 dataElementService.addDataElement( dataElementC );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java	2015-09-03 04:31:39 +
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java	2015-09-04 05:55:14 +
@@ -28,22 +28,20 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert