[Dhis2-devs-core] DHIS2 Testing - Invitation to edit

2015-09-01 Thread Jason Pickering (via Google Docs)

I've shared an item with you:

DHIS2 Testing
https://docs.google.com/document/d/1fV2Snv7GyacGqt5jWe5i0MCcZEBEtpMFwkfwWR4lC8w/edit?usp=sharing=CO-twq8L

It's not an attachment -- it's stored online. To open this item, just click  
the link above.


Dear All,
Mark and I have put together a few thoughts and results on our experiment  
with integration testing of the API. We decided to expand this a bit into  
other testing areas as well, but for now, the bulk of the document focuses  
on the integration testing scripts which we have developed over the past  
few days. We would be interested in everyone's feedback on the usefulness  
of this approach.


https://docs.google.com/document/d/1fV2Snv7GyacGqt5jWe5i0MCcZEBEtpMFwkfwWR4lC8w/edit?usp=sharing

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


Re: [Dhis2-devs] Changing admin password to default

2015-09-01 Thread Jason Pickering
@Alan, nice. ; )

The only other things to be sure about are

1) The admin user actually exists.
2) The admin user is not disabled.
3) The admin user is actually a super user.

If you have had a situation where someone else was in control over the
server, they may have (smartly) disabled or completely removed the "admin"
user. Otherwise, you may need to develop a more comprehensive script to
inject a user into the database if the "admin" user does not exist at all.

Regards,
Jason




On Mon, Aug 31, 2015 at 11:21 PM, Alan Ivey  wrote:

> Hi Gerald,
>
> You can create a password hash with Python and the Bcrypt library. Run
> this single command in your terminal to get a hash for *passwordGoesHere*:
>
> $ python -c 'import bcrypt; hash = bcrypt.hashpw("*passwordGoesHere*",
> bcrypt.gensalt(rounds=10, prefix=b"2a")); print(hash);'
>
> You can insert the resulting hash directly into the database for the admin
> user.
>
> Note: If you do not have the Bcrypt library in your Python installation,
> you should add it with pip. The following will install all prerequisites on
> a CentOS 6 system:
>
> $ yum install gcc libffi-devel python-devel python-pip
> $ pip install --user bcrypt
>
> Before attempting to change the admin user password in the database, visit
> the front page of a new installation to have DHIS2 generate data in the
> database for the admin user (you can do something as simple as $ curl -sL
> http://localhost:8080/). Then, you can enter the following query into the
> Postgres CLI with the DHIS2 database in use:
>
> UPDATE USERS SET password = '001122hashgoeshere221100' WHERE username =
> 'admin';
>
> Restart the application server (Tomcat) and then you should be able to log
> in with your new password *passwordGoesHere* or what you changed it to.
>
> Regards,
> Alan
>
> On Mon, Aug 31, 2015 at 11:02 AM, gerald thomas 
> wrote:
>
>> Dear all,
>> I am setting up a training server for staff and i am using dhis2 live
>> to achieve the task but i am using one of our database rather than the
>> default database. I had already used the following query to change the
>> admin password:
>>
>> UPDATE users set password = '48e8f1207baef1ef7fe478a57d19f2e5'
>> where username = 'admin';
>>
>> What am i doing which is wrong and why i can't login with username:
>> admin password: district
>>
>> --
>> Regards,
>>
>> Gerald
>>
>> ___
>> 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
>
>


-- 
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] [Bug 1490838] [NEW] tracker get not yet enrolled on opening record

2015-09-01 Thread Markus Bekken
Public bug reported:

After a cache clean or when accessing the solution on a new browser for
the first time, the first patient that is opened is sometimes not shown:
"Not yet enrolled" is displayed. Workaround: Go back and reopen the
record. Might be connected to slow internet.

** Affects: dhis2
 Importance: Undecided
 Status: New

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

Title:
  tracker get not yet enrolled on opening record

Status in DHIS:
  New

Bug description:
  After a cache clean or when accessing the solution on a new browser
  for the first time, the first patient that is opened is sometimes not
  shown: "Not yet enrolled" is displayed. Workaround: Go back and reopen
  the record. Might be connected to slow internet.

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

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


[Dhis2-devs] [Bug 1490840] [NEW] date format setting not affecting tracker

2015-09-01 Thread Markus Bekken
Public bug reported:

The date format that is assigned in the general dhis2 settings does not
seem to be reflected in the date picker fields in tracker.

** Affects: dhis2
 Importance: Undecided
 Status: New

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

Title:
  date format setting not affecting tracker

Status in DHIS:
  New

Bug description:
  The date format that is assigned in the general dhis2 settings does
  not seem to be reflected in the date picker fields in tracker.

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

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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19919: minor fix

2015-09-01 Thread noreply

revno: 19919
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-01 13:25:21 +0700
message:
  minor fix
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.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-01 05:31:21 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-01 06:25:21 +
@@ -269,7 +269,7 @@
  */
 public boolean isNumericType()
 {
-return valueType.isNumeric();
+return getValueType().isNumeric();
 }
 
 /**

___
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] Retrieve previous month data value of a particular element and put it in current month data entry screen

2015-09-01 Thread Julhas Sujan
Ok. Thank you very much.

On Tue, Sep 1, 2015 at 1:34 PM, Lars Helge Øverland 
wrote:

>
> The data entry module is still using custom endpoints and not the Web API,
> so you will have to live with the difference for now.
>
> Longer term we are working on migrating all web requests to the Web API.
>
> On Tue, Sep 1, 2015 at 9:32 AM, Julhas Sujan 
> wrote:
>
>> Thank you very much.I have written an API and added in the data entry
>> editor as:
>>
>> 
>>  jQuery( document ).ready( function() {
>> $.get("
>> http://103.247.238.67:8080/mishealth/api/dataValueSets.json?dataSet=aglAzf2x2bF&period=201507&orgUnit=NZlRtrITPDc
>> ",function(json){
>> json.rows.forEach(function(row){
>> var id = row[0];
>> var a=$("#SFbW0C3EjCu").html(row[0]);  // just for
>> testing purpose to get a single element.
>>console.log(a);
>> });
>> });
>>   });
>> 
>> Testing data:  
>> --
>>
>> http://103.247.238.67:8080/mishealth/api/dataValueSets.json?dataSet=aglAzf2x2bF=201507=NZlRtrITPDc
>>
>> This line is working fine in cURL and getting data but why i am not
>> getting data in the same format from data entry screen by ajax request? My
>> script is wrong or have another process?
>>
>> Thanks
>> Julhas
>>
>>
>> On Tue, Sep 1, 2015 at 1:20 PM, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Julhas,
>>>
>>> per today your best option is to implement this using javascript i.e. in
>>> the custom form, where you retrieve this data from the dataValueSets Web
>>> API resource.
>>>
>>> Web API Docs:
>>> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s11.html#d5e1433
>>>
>>> Scripts in custom forms / callbacks docs:
>>>
>>> https://www.dhis2.org/doc/snapshot/en/user/html/ch06s02.html#d5e1408
>>>
>>>
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>> On Mon, Aug 31, 2015 at 12:59 PM, Julhas Sujan 
>>> wrote:
>>>
 Hi Experts,

 Hope you are doing fine. I am from Bangladesh. I am working on DHIS2 to
 implement electronic logistics management system(eLMIS) in DHIS2.

 For implementing eLMIS in DHIS2, we are facing the following challenges
 -
 >>Logistics Requirements - Opening Balance Calculation:

 In logistics data entry screen there is a need of showing  'Opening
 Balance'  imported from previous month.(Please check the attachment).

 How can i get the data values of previous month and show it in the
 current months data entry screen.

 Waiting for your kind response.

 Thanks
 Juhas Sujan
 Java Consultant
 Management Science for Health (MSH),
 Dhaka, Bangladesh
 Skype: julhas08

 ___
 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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19920: minor fix, add color/colorSet to MetaData class for export

2015-09-01 Thread noreply

revno: 19920
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-01 14:37:41 +0700
message:
  minor fix, add color/colorSet to MetaData class for export
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java	2015-07-14 07:33:21 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java	2015-09-01 07:37:41 +
@@ -28,15 +28,19 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import com.google.common.collect.Lists;
 import org.hisp.dhis.attribute.Attribute;
 import org.hisp.dhis.chart.Chart;
+import org.hisp.dhis.color.Color;
+import org.hisp.dhis.color.ColorSet;
 import org.hisp.dhis.common.DimensionalObject;
 import org.hisp.dhis.common.DxfNamespaces;
 import org.hisp.dhis.common.NameableObject;
+import org.hisp.dhis.common.filter.MetaDataFilter;
 import org.hisp.dhis.constant.Constant;
 import org.hisp.dhis.dashboard.Dashboard;
 import org.hisp.dhis.dashboard.DashboardItem;
@@ -57,7 +61,6 @@
 import org.hisp.dhis.dxf2.events.event.Event;
 import org.hisp.dhis.eventchart.EventChart;
 import org.hisp.dhis.eventreport.EventReport;
-import org.hisp.dhis.common.filter.MetaDataFilter;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorGroup;
 import org.hisp.dhis.indicator.IndicatorGroupSet;
@@ -97,11 +100,9 @@
 import org.hisp.dhis.validation.ValidationRule;
 import org.hisp.dhis.validation.ValidationRuleGroup;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-import com.google.common.collect.Lists;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
 
 /**
  * @author Morten Olav Hansen 
@@ -210,7 +211,7 @@
 private List events = new ArrayList<>();
 
 private List eventReports = new ArrayList<>();
-
+
 private List eventCharts = new ArrayList<>();
 
 private List programs = new ArrayList<>();
@@ -237,6 +238,10 @@
 
 private List translations = new ArrayList<>();
 
+private List colors = new ArrayList<>();
+
+private List colorSets = new ArrayList<>();
+
 public MetaData()
 {
 }
@@ -1061,7 +1066,7 @@
 
 @JsonProperty
 @JacksonXmlElementWrapper( localName = "metaDataFilters", namespace = DxfNamespaces.DXF_2_0 )
-@JacksonXmlProperty( localName = "filter", namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlProperty( localName = "metaDataFilter", namespace = DxfNamespaces.DXF_2_0 )
 public List getMetaDataFilters()
 {
 return metaDataFilters;
@@ -1072,6 +1077,32 @@
 this.metaDataFilters = metaDataFilters;
 }
 
+@JsonProperty
+@JacksonXmlElementWrapper( localName = "colors", namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlProperty( localName = "color", namespace = DxfNamespaces.DXF_2_0 )
+public List getColors()
+{
+return colors;
+}
+
+public void setColors( List colors )
+{
+this.colors = colors;
+}
+
+@JsonProperty
+@JacksonXmlElementWrapper( localName = "colorSets", namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlProperty( localName = "colorSet", namespace = DxfNamespaces.DXF_2_0 )
+public List getColorSets()
+{
+return colorSets;
+}
+
+public void setColorSets( List colorSets )
+{
+this.colorSets = colorSets;
+}
+
 @Override
 public String toString()
 {
@@ -1128,6 +1159,8 @@
 ", trackedEntities=" + trackedEntities +
 ", trackedEntityAttributes=" + trackedEntityAttributes +
 ", trackedEntityAttributeGroups=" + trackedEntityAttributeGroups +
+", colors=" + colors +
+", colorSets=" + colorSets +
 '}';
 }
 }

___
Mailing list: 

[Dhis2-devs] [Bug 1490835] [NEW] tracker register button missing

2015-09-01 Thread Markus Bekken
Public bug reported:

Registration button is sometimes not visible in the registration screen
the first time after a browser cache cleanout or when accessing the
tracker for the first time on a new browser. Might be connected to slow
internet.

** Affects: dhis2
 Importance: Undecided
 Status: New

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

Title:
  tracker register button missing

Status in DHIS:
  New

Bug description:
  Registration button is sometimes not visible in the registration
  screen the first time after a browser cache cleanout or when accessing
  the tracker for the first time on a new browser. Might be connected to
  slow internet.

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

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


Re: [Dhis2-devs] Changing admin password to default

2015-09-01 Thread Jason Pickering
It should be

$2a$10$iig96L.lNFPYgt9Go0bJGuJ2A5Sdqid17wV/xwEHlq.cCDYXdGFG2

from Alan's code.

On Tue, Sep 1, 2015 at 8:40 AM, Knut Staring  wrote:

> Hi Alan,
>
> Are you saying this will work also for DHIS2 versions up to and including
> 2.20? Or just for later versions? What is the result for "district"?
>
> Knut
>
> On Mon, Aug 31, 2015 at 11:21 PM, Alan Ivey  wrote:
>
>> Hi Gerald,
>>
>> You can create a password hash with Python and the Bcrypt library. Run
>> this single command in your terminal to get a hash for *passwordGoesHere*
>> :
>>
>> $ python -c 'import bcrypt; hash = bcrypt.hashpw("*passwordGoesHere*",
>> bcrypt.gensalt(rounds=10, prefix=b"2a")); print(hash);'
>>
>> You can insert the resulting hash directly into the database for the
>> admin user.
>>
>> Note: If you do not have the Bcrypt library in your Python installation,
>> you should add it with pip. The following will install all prerequisites on
>> a CentOS 6 system:
>>
>> $ yum install gcc libffi-devel python-devel python-pip
>> $ pip install --user bcrypt
>>
>> Before attempting to change the admin user password in the database,
>> visit the front page of a new installation to have DHIS2 generate data in
>> the database for the admin user (you can do something as simple as $
>> curl -sL http://localhost:8080/). Then, you can enter the following
>> query into the Postgres CLI with the DHIS2 database in use:
>>
>> UPDATE USERS SET password = '001122hashgoeshere221100' WHERE username =
>> 'admin';
>>
>> Restart the application server (Tomcat) and then you should be able to
>> log in with your new password *passwordGoesHere* or what you changed it
>> to.
>>
>> Regards,
>> Alan
>>
>> On Mon, Aug 31, 2015 at 11:02 AM, gerald thomas 
>> wrote:
>>
>>> Dear all,
>>> I am setting up a training server for staff and i am using dhis2 live
>>> to achieve the task but i am using one of our database rather than the
>>> default database. I had already used the following query to change the
>>> admin password:
>>>
>>> UPDATE users set password = '48e8f1207baef1ef7fe478a57d19f2e5'
>>> where username = 'admin';
>>>
>>> What am i doing which is wrong and why i can't login with username:
>>> admin password: district
>>>
>>> --
>>> Regards,
>>>
>>> Gerald
>>>
>>> ___
>>> 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
>
>


-- 
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


Re: [Dhis2-devs] Retrieve previous month data value of a particular element and put it in current month data entry screen

2015-09-01 Thread Lars Helge Øverland
Hi Julhas,

per today your best option is to implement this using javascript i.e. in
the custom form, where you retrieve this data from the dataValueSets Web
API resource.

Web API Docs:
https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s11.html#d5e1433

Scripts in custom forms / callbacks docs:

https://www.dhis2.org/doc/snapshot/en/user/html/ch06s02.html#d5e1408



regards,

Lars


On Mon, Aug 31, 2015 at 12:59 PM, Julhas Sujan 
wrote:

> Hi Experts,
>
> Hope you are doing fine. I am from Bangladesh. I am working on DHIS2 to
> implement electronic logistics management system(eLMIS) in DHIS2.
>
> For implementing eLMIS in DHIS2, we are facing the following challenges -
> >>Logistics Requirements - Opening Balance Calculation:
>
> In logistics data entry screen there is a need of showing  'Opening
> Balance'  imported from previous month.(Please check the attachment).
>
> How can i get the data values of previous month and show it in the current
> months data entry screen.
>
> Waiting for your kind response.
>
> Thanks
> Juhas Sujan
> Java Consultant
> Management Science for Health (MSH),
> Dhaka, Bangladesh
> Skype: julhas08
>
> ___
> 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


[Dhis2-devs] Problem log-in

2015-09-01 Thread channara rin
Hi all dhis2,
Can you help me what is problem login page, i can't log in with admin
account. What should i do?
[image: Inline image 1]
___
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] Retrieve previous month data value of a particular element and put it in current month data entry screen

2015-09-01 Thread Julhas Sujan
Thank you very much.I have written an API and added in the data entry
editor as:


 jQuery( document ).ready( function() {
$.get("
http://103.247.238.67:8080/mishealth/api/dataValueSets.json?dataSet=aglAzf2x2bF&period=201507&orgUnit=NZlRtrITPDc
",function(json){
json.rows.forEach(function(row){
var id = row[0];
var a=$("#SFbW0C3EjCu").html(row[0]);  // just for testing
purpose to get a single element.
   console.log(a);
});
});
  });

Testing data:  
--
http://103.247.238.67:8080/mishealth/api/dataValueSets.json?dataSet=aglAzf2x2bF=201507=NZlRtrITPDc

This line is working fine in cURL and getting data but why i am not getting
data in the same format from data entry screen by ajax request? My script
is wrong or have another process?

Thanks
Julhas


On Tue, Sep 1, 2015 at 1:20 PM, Lars Helge Øverland 
wrote:

> Hi Julhas,
>
> per today your best option is to implement this using javascript i.e. in
> the custom form, where you retrieve this data from the dataValueSets Web
> API resource.
>
> Web API Docs:
> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s11.html#d5e1433
>
> Scripts in custom forms / callbacks docs:
>
> https://www.dhis2.org/doc/snapshot/en/user/html/ch06s02.html#d5e1408
>
>
>
> regards,
>
> Lars
>
>
> On Mon, Aug 31, 2015 at 12:59 PM, Julhas Sujan 
> wrote:
>
>> Hi Experts,
>>
>> Hope you are doing fine. I am from Bangladesh. I am working on DHIS2 to
>> implement electronic logistics management system(eLMIS) in DHIS2.
>>
>> For implementing eLMIS in DHIS2, we are facing the following challenges -
>>
>> >>Logistics Requirements - Opening Balance Calculation:
>>
>> In logistics data entry screen there is a need of showing  'Opening
>> Balance'  imported from previous month.(Please check the attachment).
>>
>> How can i get the data values of previous month and show it in the
>> current months data entry screen.
>>
>> Waiting for your kind response.
>>
>> Thanks
>> Juhas Sujan
>> Java Consultant
>> Management Science for Health (MSH),
>> Dhaka, Bangladesh
>> Skype: julhas08
>>
>> ___
>> 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] CORS VS Service Layer Access

2015-09-01 Thread Lars Helge Øverland
Hi Greg,

we have OAuth2 authentication support which is intended for this use-case:

https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s02.html#d5e75

regards,

Lars


On Tue, Sep 1, 2015 at 9:36 AM, Greg Rowles  wrote:

> Hi Devs
>
> Does anyone know if there are plans or even if its possible to support
> service layer access requests from external applications? E.g. pulling a
> custom HTML report from the Sierra Leone instance from my web application
> (similar to CORS but more like cross origin service sharing). I'm sure
> there are plenty of security risks but is this something that, in theory,
> is possible?
>
> Regards,
> Greg
>
> --
> *Health Information Systems Program - South Africa*
> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - -
> - *
> Mobile  :073 246 2992
> Landline:   021 554 3130
> Fax:  086 733 8432
> Skype:  gregory_rowles
>
> ___
> 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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19918: more ValueType replacements

2015-09-01 Thread noreply

revno: 19918
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-09-01 13:14:53 +0700
message:
  more ValueType replacements
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/DefaultPdfDataEntryFormService.java
  
dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dataelementhistory/DefaultHistoryRetriever.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/caseaggregation/GetAggPSDataElementsAction.java
  
dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetFilteredDataElementsAction.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/program/DefaultProgramDataEntryService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2015-06-23 15:59:19 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2015-09-01 06:14:53 +
@@ -28,14 +28,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 import org.apache.commons.lang3.BooleanUtils;
+import org.hisp.dhis.common.ValueType;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.i18n.I18n;
@@ -44,6 +38,13 @@
 import org.hisp.dhis.trackedentitydatavalue.TrackedEntityDataValue;
 import org.hisp.dhis.trackedentitydatavalue.TrackedEntityDataValueService;
 
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 /**
  * @author Chau Thu Tran
  */
@@ -246,27 +247,27 @@
 
 tabindex++;
 
+ValueType valueType = dataElement.getValueType();
+
 if ( dataElement.getOptionSet() != null && dataElement.getOptionSet().getOptions().size() < 7
 && programStage.getProgram().getDataEntryMethod() )
 {
 String idField = programStageUid + "-" + dataElementUid + "-val";
 inputHTML = populateCustomDataEntryForOptionSet( dataElement, idField, entityInstanceDataValue, i18n );
 }
-else if ( DataElement.VALUE_TYPE_INT.equals( dataElement.getType() )
-|| DataElement.VALUE_TYPE_STRING.equals( dataElement.getType() )
-|| DataElement.VALUE_TYPE_USER_NAME.equals( dataElement.getType() ) )
+else if ( valueType.isText() || valueType.isNumeric() || ValueType.USERNAME == valueType )
 {
 inputHTML = populateCustomDataEntryForTextBox( dataElement, inputHTML, dataElementValue );
 }
-else if ( DataElement.VALUE_TYPE_DATE.equals( dataElement.getType() ) )
+else if ( ValueType.DATE == valueType || ValueType.DATETIME == valueType )
 {
 inputHTML = populateCustomDataEntryForDate( inputHTML, dataElementValue );
 }
-else if ( DataElement.VALUE_TYPE_TRUE_ONLY.equals( dataElement.getType() ) )
+else if ( ValueType.TRUE_ONLY == valueType )
 {
 inputHTML = populateCustomDataEntryForTrueOnly( dataElement, inputHTML, dataElementValue );
 }
-else if ( DataElement.VALUE_TYPE_BOOL.equals( dataElement.getType() ) )
+else if ( ValueType.BOOLEAN == valueType )
 {
 inputHTML = populateCustomDataEntryForBoolean( dataElement, inputHTML, dataElementValue, i18n );
 }
@@ -284,7 +285,7 @@
 }
 else
 {
-if ( DataElement.VALUE_TYPE_DATE.equals( dataElement.getType() ) )
+if ( ValueType.DATE == valueType || ValueType.DATETIME == valueType )
 {
 inputHTML += jQueryCalendar;
  

Re: [Dhis2-devs] Changing admin password to default

2015-09-01 Thread Knut Staring
Hi Alan,

Are you saying this will work also for DHIS2 versions up to and including
2.20? Or just for later versions? What is the result for "district"?

Knut

On Mon, Aug 31, 2015 at 11:21 PM, Alan Ivey  wrote:

> Hi Gerald,
>
> You can create a password hash with Python and the Bcrypt library. Run
> this single command in your terminal to get a hash for *passwordGoesHere*:
>
> $ python -c 'import bcrypt; hash = bcrypt.hashpw("*passwordGoesHere*",
> bcrypt.gensalt(rounds=10, prefix=b"2a")); print(hash);'
>
> You can insert the resulting hash directly into the database for the admin
> user.
>
> Note: If you do not have the Bcrypt library in your Python installation,
> you should add it with pip. The following will install all prerequisites on
> a CentOS 6 system:
>
> $ yum install gcc libffi-devel python-devel python-pip
> $ pip install --user bcrypt
>
> Before attempting to change the admin user password in the database, visit
> the front page of a new installation to have DHIS2 generate data in the
> database for the admin user (you can do something as simple as $ curl -sL
> http://localhost:8080/). Then, you can enter the following query into the
> Postgres CLI with the DHIS2 database in use:
>
> UPDATE USERS SET password = '001122hashgoeshere221100' WHERE username =
> 'admin';
>
> Restart the application server (Tomcat) and then you should be able to log
> in with your new password *passwordGoesHere* or what you changed it to.
>
> Regards,
> Alan
>
> On Mon, Aug 31, 2015 at 11:02 AM, gerald thomas 
> wrote:
>
>> Dear all,
>> I am setting up a training server for staff and i am using dhis2 live
>> to achieve the task but i am using one of our database rather than the
>> default database. I had already used the following query to change the
>> admin password:
>>
>> UPDATE users set password = '48e8f1207baef1ef7fe478a57d19f2e5'
>> where username = 'admin';
>>
>> What am i doing which is wrong and why i can't login with username:
>> admin password: district
>>
>> --
>> Regards,
>>
>> Gerald
>>
>> ___
>> 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] Retrieve previous month data value of a particular element and put it in current month data entry screen

2015-09-01 Thread Lars Helge Øverland
The data entry module is still using custom endpoints and not the Web API,
so you will have to live with the difference for now.

Longer term we are working on migrating all web requests to the Web API.

On Tue, Sep 1, 2015 at 9:32 AM, Julhas Sujan 
wrote:

> Thank you very much.I have written an API and added in the data entry
> editor as:
>
> 
>  jQuery( document ).ready( function() {
> $.get("
> http://103.247.238.67:8080/mishealth/api/dataValueSets.json?dataSet=aglAzf2x2bF&period=201507&orgUnit=NZlRtrITPDc
> ",function(json){
> json.rows.forEach(function(row){
> var id = row[0];
> var a=$("#SFbW0C3EjCu").html(row[0]);  // just for testing
> purpose to get a single element.
>console.log(a);
> });
> });
>   });
> 
> Testing data:  
> --
>
> http://103.247.238.67:8080/mishealth/api/dataValueSets.json?dataSet=aglAzf2x2bF=201507=NZlRtrITPDc
>
> This line is working fine in cURL and getting data but why i am not
> getting data in the same format from data entry screen by ajax request? My
> script is wrong or have another process?
>
> Thanks
> Julhas
>
>
> On Tue, Sep 1, 2015 at 1:20 PM, Lars Helge Øverland 
> wrote:
>
>> Hi Julhas,
>>
>> per today your best option is to implement this using javascript i.e. in
>> the custom form, where you retrieve this data from the dataValueSets Web
>> API resource.
>>
>> Web API Docs:
>> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s11.html#d5e1433
>>
>> Scripts in custom forms / callbacks docs:
>>
>> https://www.dhis2.org/doc/snapshot/en/user/html/ch06s02.html#d5e1408
>>
>>
>>
>> regards,
>>
>> Lars
>>
>>
>> On Mon, Aug 31, 2015 at 12:59 PM, Julhas Sujan 
>> wrote:
>>
>>> Hi Experts,
>>>
>>> Hope you are doing fine. I am from Bangladesh. I am working on DHIS2 to
>>> implement electronic logistics management system(eLMIS) in DHIS2.
>>>
>>> For implementing eLMIS in DHIS2, we are facing the following challenges
>>> -
>>> >>Logistics Requirements - Opening Balance Calculation:
>>>
>>> In logistics data entry screen there is a need of showing  'Opening
>>> Balance'  imported from previous month.(Please check the attachment).
>>>
>>> How can i get the data values of previous month and show it in the
>>> current months data entry screen.
>>>
>>> Waiting for your kind response.
>>>
>>> Thanks
>>> Juhas Sujan
>>> Java Consultant
>>> Management Science for Health (MSH),
>>> Dhaka, Bangladesh
>>> Skype: julhas08
>>>
>>> ___
>>> 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


[Dhis2-devs] CORS VS Service Layer Access

2015-09-01 Thread Greg Rowles
Hi Devs

Does anyone know if there are plans or even if its possible to support
service layer access requests from external applications? E.g. pulling a
custom HTML report from the Sierra Leone instance from my web application
(similar to CORS but more like cross origin service sharing). I'm sure
there are plenty of security risks but is this something that, in theory,
is possible?

Regards,
Greg

-- 
*Health Information Systems Program - South Africa*
*- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - - - *
Mobile  :073 246 2992
Landline:   021 554 3130
Fax:  086 733 8432
Skype:  gregory_rowles
___
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] Functionality of the Complete button in Data Entry

2015-09-01 Thread Knut Staring
Hi Rae,

The data are saved regardless, but clicking the button allows you to
indicate that you are indeed done filling in data, even though it might
look as though some data are missing - because you actually have nothing to
report. This is also related to the question of whether to require people
to report zero  (0) - and whether that is significantly different from not
reporting anything (NULL).

Others can complete the picture.

Knut

On Tue, Sep 1, 2015 at 10:42 PM, Rae Li  wrote:

> Hello DHIS 2 Team!
>
> I am not sure what exactly the functionality is of the Complete button in
> Data Entry. From what I have read in the DHIS 2 User-Manual, I understood
> that the Complete button is a subjective approach to calculating
> completeness, meaning that the data will be saved even if I do NOT click
> the Complete button after entering the data.
>
> Could you please provide me with more detailed explanation of the Complete
> button if I did not understand its functionality correctly?
>
> Thank you for your time addressing my question!
>
> Best,
> Rae
>
> --
> Ruiyi (Rae) Li
> Mailman School of Public Health
> Columbia University
>
> ___
> 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
>
>


-- 
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] Functionality of the Complete button in Data Entry

2015-09-01 Thread Rae Li
Hello DHIS 2 Team!

I am not sure what exactly the functionality is of the Complete button in
Data Entry. From what I have read in the DHIS 2 User-Manual, I understood
that the Complete button is a subjective approach to calculating
completeness, meaning that the data will be saved even if I do NOT click
the Complete button after entering the data.

Could you please provide me with more detailed explanation of the Complete
button if I did not understand its functionality correctly?

Thank you for your time addressing my question!

Best,
Rae

-- 
Ruiyi (Rae) Li
Mailman School of Public Health
Columbia University
___
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] Weird cache issue

2015-09-01 Thread Calle Hedberg
Halvdan,

Ah, OK, and not - I was not using any queries, I simply updated the Data
Set names directly in the table.

As I've said - the weird thing is that all those new names immediately
showed up in the UI data set list, but the old names are still appearing
wherever the Data Integrity process throws up integrity violations

Regards
Calle

On 1 September 2015 at 18:01, Halvdan Grelland  wrote:

> Calle, I'm pretty sure Jason was referring to whatever you were doing to
> update the records (your point #1 in original email) which was not, as far
> as I can understand, using the UI or the web-api. I am not familiar with
> "pgremote" but am assuming it's some kind of postgres connector allowing
> you to run (sql) queries. We'd need to see those queries in order to figure
> out what could have gone wrong.
>
> 2015-09-01 14:50 GMT+02:00 Calle Hedberg :
>
>> Jason
>>
>> I was not executing any custom sql - I'm running the Data Administration
>> -> Data Integrity process checks.
>>
>> My reference to the sql queries being run relates to my ASSUMPTION that
>> the Data Integrity checks are a series of SQL queries - but maybe not,
>> maybe the integrity checks are a series of web api calls followed by some
>> kind of front-end processing? I just don't know, and I'm not a Java
>> developer and I don't have the code base on my laptop so I cannot find out
>> myself...
>>
>> Seems my initial post was not clear enough on this - apologies for that.
>>
>> Regards
>> Calle
>>
>> On 1 September 2015 at 14:31, Jason Pickering <
>> jason.p.picker...@gmail.com> wrote:
>>
>>> Hi Calle,
>>> It is very difficult to say much without knowing what SQL it was you
>>> executed. In general, use of the API or UI is usually much safer.
>>>
>>> Do you have any sort of cache in front of your DHIS2 instance?
>>>
>>> Can you confirm from the database that the names were actually changed?
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>> On Tue, Sep 1, 2015 at 12:49 PM, Calle Hedberg 
>>> wrote:
>>>
 Lars,

 Nope - all data set names and short names are the same.

 It's just weird, and I don't like inexplicable things happening to a
 database

 When you run data integrity - WHERE are those queries fetching data
 from? Are the integrity queries running against the database itself, or
 some kind of cache repository?

 Regards
 Calle

 On 1 September 2015 at 13:00, Lars Helge Øverland 
 wrote:

> Hi Calle,
>
> perhaps you did not update the data set short names?
>
> Lars
>
> On Tue, Sep 1, 2015 at 11:50 AM, Calle Hedberg <
> calle.hedb...@gmail.com> wrote:
>
>> Hi
>>
>> I've got a baffling problem (presumably related to some kind of
>> caching):
>>
>> 1. yesterday I updated various data records using pgremote, including
>> data set names. We restarted tomcat after the updates.
>>
>> 2. I've also cleared my browser cache, the DHIS2 cache, updated
>> resource tables, etc.
>>
>> 3. When I now open the list of data sets, all the changed/new names
>> are showing as expected.
>>
>> 4. BUT when I run Data Integrity, a few violations related to data
>> sets are coming up AND THE DATA SET NAMES ARE THE OLD ONES.
>>
>> Any ideas what could cause this weird behaviour?
>>
>> Regards
>> Calle
>>
>> ***
>>
>> Calle Hedberg
>>
>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>
>> Tel/fax (home): +27-21-685-6472
>>
>> Cell: +27-82-853-5352
>>
>> Iridium SatPhone: +8816-315-19274
>>
>> Email: calle.hedb...@gmail.com
>>
>> Skype: calle_hedberg
>>
>> ***
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
>


 --

 ***

 Calle Hedberg

 46D Alma Road, 7700 Rosebank, SOUTH AFRICA

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

 Cell: +27-82-853-5352

 Iridium SatPhone: +8816-315-19274

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

 Skype: calle_hedberg

 ***


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

[Dhis2-devs] Weird cache issue

2015-09-01 Thread Calle Hedberg
Hi

I've got a baffling problem (presumably related to some kind of caching):

1. yesterday I updated various data records using pgremote, including data
set names. We restarted tomcat after the updates.

2. I've also cleared my browser cache, the DHIS2 cache, updated resource
tables, etc.

3. When I now open the list of data sets, all the changed/new names are
showing as expected.

4. BUT when I run Data Integrity, a few violations related to data sets are
coming up AND THE DATA SET NAMES ARE THE OLD ONES.

Any ideas what could cause this weird behaviour?

Regards
Calle

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

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

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19274

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

Skype: calle_hedberg

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


[Dhis2-devs] Pivot or event report (Facts Sheets) into word

2015-09-01 Thread moses mwale
Hello, is it possible that fact sheets (Pivot tables or event reports) can
be converted into word or excel?
___
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] Weird cache issue

2015-09-01 Thread Calle Hedberg
Lars,

Nope - all data set names and short names are the same.

It's just weird, and I don't like inexplicable things happening to a
database

When you run data integrity - WHERE are those queries fetching data from?
Are the integrity queries running against the database itself, or some kind
of cache repository?

Regards
Calle

On 1 September 2015 at 13:00, Lars Helge Øverland 
wrote:

> Hi Calle,
>
> perhaps you did not update the data set short names?
>
> Lars
>
> On Tue, Sep 1, 2015 at 11:50 AM, Calle Hedberg 
> wrote:
>
>> Hi
>>
>> I've got a baffling problem (presumably related to some kind of caching):
>>
>> 1. yesterday I updated various data records using pgremote, including
>> data set names. We restarted tomcat after the updates.
>>
>> 2. I've also cleared my browser cache, the DHIS2 cache, updated resource
>> tables, etc.
>>
>> 3. When I now open the list of data sets, all the changed/new names are
>> showing as expected.
>>
>> 4. BUT when I run Data Integrity, a few violations related to data sets
>> are coming up AND THE DATA SET NAMES ARE THE OLD ONES.
>>
>> Any ideas what could cause this weird behaviour?
>>
>> Regards
>> Calle
>>
>> ***
>>
>> Calle Hedberg
>>
>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>
>> Tel/fax (home): +27-21-685-6472
>>
>> Cell: +27-82-853-5352
>>
>> Iridium SatPhone: +8816-315-19274
>>
>> Email: calle.hedb...@gmail.com
>>
>> Skype: calle_hedberg
>>
>> ***
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

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

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19274

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

Skype: calle_hedberg

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


Re: [Dhis2-devs] Problem log-in

2015-09-01 Thread Morten Olav Hansen
Hi

That error message just means wrong password.. bad credentials

--
Morten

On Tue, Sep 1, 2015 at 2:51 PM, channara rin  wrote:

> Hi all dhis2,
> Can you help me what is problem login page, i can't log in with admin
> account. What should i do?
> [image: Inline image 1]
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Problem log-in

2015-09-01 Thread Knut Staring
Excellent. However, why is this different from the password discussed in
Gerald's thread with Alan and Jason?

$2a$10$iig96L.lNFPYgt9Go0bJGuJ2A5Sdqid17wV/xwEHlq.cCDYXdGFG2
$2a$10$wjLPViry3bkYEcjwGRqnYO1bT2Kl.ZY0kO.fwFDfMX53hitfx5.3C

Knut

On Tue, Sep 1, 2015 at 11:00 AM, channara rin 
wrote:

> Yes, now it work fine
>
> thank Lars, Morten
>
> On Tue, Sep 1, 2015 at 3:23 PM, Lars Helge Øverland 
> wrote:
>
>> Hi Channara,
>>
>> do this to set password to district for user admin:
>>
>> update users set
>> password='$2a$10$wjLPViry3bkYEcjwGRqnYO1bT2Kl.ZY0kO.fwFDfMX53hitfx5.3C'
>> where username='admin';
>>
>> Then restart tomcat to make sure the application cache is cleared.
>>
>> Then log in with admin/district.
>>
>> regards,
>>
>> Lars
>>
>>
>>
>> On Tue, Sep 1, 2015 at 10:17 AM, channara rin 
>> wrote:
>>
>>> No! i don't have any account more.
>>>
>>> On Tue, Sep 1, 2015 at 3:13 PM, channara rin 
>>> wrote:
>>>
 But it still display log-in page.

 On Tue, Sep 1, 2015 at 3:13 PM, channara rin 
 wrote:

> Hi Morten,
> I go to database schema and change value of attribute: "Password" to
> value:"*$2a$10$iig96L.lNFPYgt9Go0bJGuJ2A5Sdqid17wV/xwEHlq.cCDYXdGFG2*
> "="district"
>
>
> On Tue, Sep 1, 2015 at 2:55 PM, Morten Olav Hansen  > wrote:
>
>> Hi
>>
>> That error message just means wrong password.. bad credentials
>>
>> --
>> Morten
>>
>> On Tue, Sep 1, 2015 at 2:51 PM, channara rin 
>> wrote:
>>
>>> Hi all dhis2,
>>> Can you help me what is problem login page, i can't log in with
>>> admin account. What should i do?
>>> [image: Inline image 1]
>>>
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> 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
>
>


-- 
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] Weird cache issue

2015-09-01 Thread Lars Helge Øverland
Hi Calle,

perhaps you did not update the data set short names?

Lars

On Tue, Sep 1, 2015 at 11:50 AM, Calle Hedberg 
wrote:

> Hi
>
> I've got a baffling problem (presumably related to some kind of caching):
>
> 1. yesterday I updated various data records using pgremote, including data
> set names. We restarted tomcat after the updates.
>
> 2. I've also cleared my browser cache, the DHIS2 cache, updated resource
> tables, etc.
>
> 3. When I now open the list of data sets, all the changed/new names are
> showing as expected.
>
> 4. BUT when I run Data Integrity, a few violations related to data sets
> are coming up AND THE DATA SET NAMES ARE THE OLD ONES.
>
> Any ideas what could cause this weird behaviour?
>
> Regards
> Calle
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19274
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19921: Analytics tables. Making sure to ignore duplicate analytics tables. Might happen for non-iso cale...

2015-09-01 Thread noreply

revno: 19921
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2015-09-01 11:22:27 +0200
message:
  Analytics tables. Making sure to ignore duplicate analytics tables. Might 
happen for non-iso calendars.
modified:
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTable.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java
  
dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/table/AnalyticsTableTest.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/AnalyticsTable.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTable.java	2015-02-24 13:57:25 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTable.java	2015-09-01 09:22:27 +
@@ -125,12 +125,6 @@
 return program != null;
 }
 
-@Override
-public String toString()
-{
-return getTableName();
-}
-
 // -
 // Getters and setters
 // -
@@ -174,4 +168,84 @@
 {
 this.program = program;
 }
+
+// -
+// hashCode, equals, toString
+// -
+
+@Override
+public int hashCode()
+{
+final int prime = 31;
+int result = 1;
+result = prime * result + ( ( baseName == null ) ? 0 : baseName.hashCode() );
+result = prime * result + ( ( period == null ) ? 0 : period.hashCode() );
+result = prime * result + ( ( program == null ) ? 0 : program.hashCode() );
+return result;
+}
+
+@Override
+public boolean equals( Object object )
+{
+if ( this == object )
+{
+return true;
+}
+
+if ( object == null )
+{
+return false;
+}
+
+if ( getClass() != object.getClass() )
+{
+return false;
+}
+
+AnalyticsTable other = (AnalyticsTable) object;
+
+if ( baseName == null )
+{
+if ( other.baseName != null )
+{
+return false;
+}
+}
+else if ( !baseName.equals( other.baseName ) )
+{
+return false;
+}
+
+if ( period == null )
+{
+if ( other.period != null )
+{
+return false;
+}
+}
+else if ( !period.equals( other.period ) )
+{
+return false;
+}
+
+if ( program == null )
+{
+if ( other.program != null )
+{
+return false;
+}
+}
+else if ( !program.equals( other.program ) )
+{
+return false;
+}
+
+return true;
+}
+
+@Override
+public String toString()
+{
+return getTableName();
+}
 }

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java	2015-08-27 15:28:24 +
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java	2015-09-01 09:22:27 +
@@ -46,6 +46,7 @@
 import org.hisp.dhis.common.CodeGenerator;
 import org.hisp.dhis.common.IdentifiableObjectManager;
 import org.hisp.dhis.commons.collection.ListUtils;
+import org.hisp.dhis.commons.collection.UniqueArrayList;
 import org.hisp.dhis.commons.timer.SystemTimer;
 import org.hisp.dhis.commons.timer.Timer;
 import org.hisp.dhis.dataapproval.DataApprovalLevelService;
@@ -147,7 +148,8 @@
 
 private List getTables( List dataYears )
 {
-List tables = new ArrayList<>();
+List tables = new UniqueArrayList<>();
+
 Calendar calendar = PeriodType.getCalendar();
 
 Collections.sort( dataYears );

=== modified file 

[Dhis2-devs] Convert Excel to xml and to json

2015-09-01 Thread channara rin
Hi all DHIS2,
Do you know how to convert Excel tracker list to xml and to json that
enable import into DHIS2 system?

[image: Inline image 1]

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


Re: [Dhis2-devs] Problem log-in

2015-09-01 Thread channara rin
Yes, now it work fine

thank Lars, Morten

On Tue, Sep 1, 2015 at 3:23 PM, Lars Helge Øverland 
wrote:

> Hi Channara,
>
> do this to set password to district for user admin:
>
> update users set
> password='$2a$10$wjLPViry3bkYEcjwGRqnYO1bT2Kl.ZY0kO.fwFDfMX53hitfx5.3C'
> where username='admin';
>
> Then restart tomcat to make sure the application cache is cleared.
>
> Then log in with admin/district.
>
> regards,
>
> Lars
>
>
>
> On Tue, Sep 1, 2015 at 10:17 AM, channara rin 
> wrote:
>
>> No! i don't have any account more.
>>
>> On Tue, Sep 1, 2015 at 3:13 PM, channara rin 
>> wrote:
>>
>>> But it still display log-in page.
>>>
>>> On Tue, Sep 1, 2015 at 3:13 PM, channara rin 
>>> wrote:
>>>
 Hi Morten,
 I go to database schema and change value of attribute: "Password" to
 value:"*$2a$10$iig96L.lNFPYgt9Go0bJGuJ2A5Sdqid17wV/xwEHlq.cCDYXdGFG2*
 "="district"


 On Tue, Sep 1, 2015 at 2:55 PM, Morten Olav Hansen 
 wrote:

> Hi
>
> That error message just means wrong password.. bad credentials
>
> --
> Morten
>
> On Tue, Sep 1, 2015 at 2:51 PM, channara rin 
> wrote:
>
>> Hi all dhis2,
>> Can you help me what is problem login page, i can't log in with admin
>> account. What should i do?
>> [image: Inline image 1]
>>
>>
>> ___
>> 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
>>
>>
>
>
> --
> 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] Problem log-in

2015-09-01 Thread Halvdan Grelland
They should be different. Bcrypt (or any sane pw hashing scheme for that
matter) uses a random salt per run (which is embedded in the resulting
string).

2015-09-01 11:06 GMT+02:00 Knut Staring :

> Excellent. However, why is this different from the password discussed in
> Gerald's thread with Alan and Jason?
>
> $2a$10$iig96L.lNFPYgt9Go0bJGuJ2A5Sdqid17wV/xwEHlq.cCDYXdGFG2
> $2a$10$wjLPViry3bkYEcjwGRqnYO1bT2Kl.ZY0kO.fwFDfMX53hitfx5.3C
>
> Knut
>
> On Tue, Sep 1, 2015 at 11:00 AM, channara rin 
> wrote:
>
>> Yes, now it work fine
>>
>> thank Lars, Morten
>>
>> On Tue, Sep 1, 2015 at 3:23 PM, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Channara,
>>>
>>> do this to set password to district for user admin:
>>>
>>> update users set
>>> password='$2a$10$wjLPViry3bkYEcjwGRqnYO1bT2Kl.ZY0kO.fwFDfMX53hitfx5.3C'
>>> where username='admin';
>>>
>>> Then restart tomcat to make sure the application cache is cleared.
>>>
>>> Then log in with admin/district.
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>>
>>> On Tue, Sep 1, 2015 at 10:17 AM, channara rin 
>>> wrote:
>>>
 No! i don't have any account more.

 On Tue, Sep 1, 2015 at 3:13 PM, channara rin 
 wrote:

> But it still display log-in page.
>
> On Tue, Sep 1, 2015 at 3:13 PM, channara rin 
> wrote:
>
>> Hi Morten,
>> I go to database schema and change value of attribute: "Password" to
>> value:"*$2a$10$iig96L.lNFPYgt9Go0bJGuJ2A5Sdqid17wV/xwEHlq.cCDYXdGFG2*
>> "="district"
>>
>>
>> On Tue, Sep 1, 2015 at 2:55 PM, Morten Olav Hansen <
>> morte...@gmail.com> wrote:
>>
>>> Hi
>>>
>>> That error message just means wrong password.. bad credentials
>>>
>>> --
>>> Morten
>>>
>>> On Tue, Sep 1, 2015 at 2:51 PM, channara rin >> > wrote:
>>>
 Hi all dhis2,
 Can you help me what is problem login page, i can't log in with
 admin account. What should i do?
 [image: Inline image 1]


 ___
 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


>>>
>>>
>>> --
>>> 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
>>
>>
>
>
> --
> 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


Re: [Dhis2-devs] Problem log-in

2015-09-01 Thread Knut Staring
What has changed since the last time? Do you have another account with
superuSer privileges?
On Sep 1, 2015 9:59 AM, "channara rin"  wrote:

> Hi all dhis2,
> Can you help me what is problem login page, i can't log in with admin
> account. What should i do?
> [image: Inline image 1]
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Problem log-in

2015-09-01 Thread channara rin
But it still display log-in page.

On Tue, Sep 1, 2015 at 3:13 PM, channara rin  wrote:

> Hi Morten,
> I go to database schema and change value of attribute: "Password" to
> value:"*$2a$10$iig96L.lNFPYgt9Go0bJGuJ2A5Sdqid17wV/xwEHlq.cCDYXdGFG2*
> "="district"
>
>
> On Tue, Sep 1, 2015 at 2:55 PM, Morten Olav Hansen 
> wrote:
>
>> Hi
>>
>> That error message just means wrong password.. bad credentials
>>
>> --
>> Morten
>>
>> On Tue, Sep 1, 2015 at 2:51 PM, channara rin 
>> wrote:
>>
>>> Hi all dhis2,
>>> Can you help me what is problem login page, i can't log in with admin
>>> account. What should i do?
>>> [image: Inline image 1]
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Problem log-in

2015-09-01 Thread channara rin
Hi Morten,
I go to database schema and change value of attribute: "Password" to value:"
*$2a$10$iig96L.lNFPYgt9Go0bJGuJ2A5Sdqid17wV/xwEHlq.cCDYXdGFG2*"="district"


On Tue, Sep 1, 2015 at 2:55 PM, Morten Olav Hansen 
wrote:

> Hi
>
> That error message just means wrong password.. bad credentials
>
> --
> Morten
>
> On Tue, Sep 1, 2015 at 2:51 PM, channara rin 
> wrote:
>
>> Hi all dhis2,
>> Can you help me what is problem login page, i can't log in with admin
>> account. What should i do?
>> [image: Inline image 1]
>>
>>
>> ___
>> 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] Changing admin password to default

2015-09-01 Thread Halvdan Grelland
For the record: Starting in 2.21 we only accept bcrypt password hashes.
Anything else will fail.

Beginning in 2.17 we started hot-swapping every user logging in with the
old scheme (md5) to the new one (bcrypt) on login. Even though they work in
2.20 I strongly suggest using bcrypt hashes for this reason as well as the
obvious security improvement.

As it seems you've experienced, changing the password in the DB at runtime
will not work (application memory will hold the old one). If you need to
force a password swap you will need to change the password in the db before
you start the server.

2015-09-01 9:53 GMT+02:00 gerald thomas :

> Dear Alan,
> Thanks very much
>
> Regards,
> Gerald
> On Aug 31, 2015 9:22 PM, "Alan Ivey"  wrote:
>
>> Hi Gerald,
>>
>> You can create a password hash with Python and the Bcrypt library. Run
>> this single command in your terminal to get a hash for *passwordGoesHere*
>> :
>>
>> $ python -c 'import bcrypt; hash = bcrypt.hashpw("*passwordGoesHere*",
>> bcrypt.gensalt(rounds=10, prefix=b"2a")); print(hash);'
>>
>> You can insert the resulting hash directly into the database for the
>> admin user.
>>
>> Note: If you do not have the Bcrypt library in your Python installation,
>> you should add it with pip. The following will install all prerequisites on
>> a CentOS 6 system:
>>
>> $ yum install gcc libffi-devel python-devel python-pip
>> $ pip install --user bcrypt
>>
>> Before attempting to change the admin user password in the database,
>> visit the front page of a new installation to have DHIS2 generate data in
>> the database for the admin user (you can do something as simple as $
>> curl -sL http://localhost:8080/). Then, you can enter the following
>> query into the Postgres CLI with the DHIS2 database in use:
>>
>> UPDATE USERS SET password = '001122hashgoeshere221100' WHERE username =
>> 'admin';
>>
>> Restart the application server (Tomcat) and then you should be able to
>> log in with your new password *passwordGoesHere* or what you changed it
>> to.
>>
>> Regards,
>> Alan
>>
>> On Mon, Aug 31, 2015 at 11:02 AM, gerald thomas 
>> wrote:
>>
>>> Dear all,
>>> I am setting up a training server for staff and i am using dhis2 live
>>> to achieve the task but i am using one of our database rather than the
>>> default database. I had already used the following query to change the
>>> admin password:
>>>
>>> UPDATE users set password = '48e8f1207baef1ef7fe478a57d19f2e5'
>>> where username = 'admin';
>>>
>>> What am i doing which is wrong and why i can't login with username:
>>> admin password: district
>>>
>>> --
>>> Regards,
>>>
>>> Gerald
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Convert Excel to xml and to json

2015-09-01 Thread Knut Staring
Dear Channara,

Please avoid posting ANY information about individual people on this list.

Knut

On Tue, Sep 1, 2015 at 12:02 PM, channara rin 
wrote:

> Hi all DHIS2,
> Do you know how to convert Excel tracker list to xml and to json that
> enable import into DHIS2 system?
>
> [image: Inline image 1]
>
> thank you
> CHANNARA
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
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] Weird cache issue

2015-09-01 Thread Jason Pickering
Hi Calle,
It is very difficult to say much without knowing what SQL it was you
executed. In general, use of the API or UI is usually much safer.

Do you have any sort of cache in front of your DHIS2 instance?

Can you confirm from the database that the names were actually changed?

Regards,
Jason


On Tue, Sep 1, 2015 at 12:49 PM, Calle Hedberg 
wrote:

> Lars,
>
> Nope - all data set names and short names are the same.
>
> It's just weird, and I don't like inexplicable things happening to a
> database
>
> When you run data integrity - WHERE are those queries fetching data from?
> Are the integrity queries running against the database itself, or some kind
> of cache repository?
>
> Regards
> Calle
>
> On 1 September 2015 at 13:00, Lars Helge Øverland 
> wrote:
>
>> Hi Calle,
>>
>> perhaps you did not update the data set short names?
>>
>> Lars
>>
>> On Tue, Sep 1, 2015 at 11:50 AM, Calle Hedberg 
>> wrote:
>>
>>> Hi
>>>
>>> I've got a baffling problem (presumably related to some kind of caching):
>>>
>>> 1. yesterday I updated various data records using pgremote, including
>>> data set names. We restarted tomcat after the updates.
>>>
>>> 2. I've also cleared my browser cache, the DHIS2 cache, updated resource
>>> tables, etc.
>>>
>>> 3. When I now open the list of data sets, all the changed/new names are
>>> showing as expected.
>>>
>>> 4. BUT when I run Data Integrity, a few violations related to data sets
>>> are coming up AND THE DATA SET NAMES ARE THE OLD ONES.
>>>
>>> Any ideas what could cause this weird behaviour?
>>>
>>> Regards
>>> Calle
>>>
>>> ***
>>>
>>> Calle Hedberg
>>>
>>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>>
>>> Tel/fax (home): +27-21-685-6472
>>>
>>> Cell: +27-82-853-5352
>>>
>>> Iridium SatPhone: +8816-315-19274
>>>
>>> Email: calle.hedb...@gmail.com
>>>
>>> Skype: calle_hedberg
>>>
>>> ***
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> http://www.dhis2.org 
>>
>>
>
>
> --
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19274
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
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] Pivot tables or event reports

2015-09-01 Thread moses mwale
Hello, is it possible that fact sheets (Pivot tables or event reports) can
be converted into word or excel?
___
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] Convert Excel to xml and to json

2015-09-01 Thread Alex Tumwesigye
Dear Channara,

The simplest way is to map this excel to a temp table in postgres, then use
postgres json functionality to format the data from the temp table to a
json format directly.

You may need a function to update each event with a uid for tracking so
that you don't send duplicates.



Alex

On Tue, Sep 1, 2015 at 1:02 PM, channara rin  wrote:

> Hi all DHIS2,
> Do you know how to convert Excel tracker list to xml and to json that
> enable import into DHIS2 system?
>
> [image: Inline image 1]
>
> thank you
> CHANNARA
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
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 "
___
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] Weird cache issue

2015-09-01 Thread Calle Hedberg
Jason

I was not executing any custom sql - I'm running the Data Administration ->
Data Integrity process checks.

My reference to the sql queries being run relates to my ASSUMPTION that the
Data Integrity checks are a series of SQL queries - but maybe not, maybe
the integrity checks are a series of web api calls followed by some kind of
front-end processing? I just don't know, and I'm not a Java developer and I
don't have the code base on my laptop so I cannot find out myself...

Seems my initial post was not clear enough on this - apologies for that.

Regards
Calle

On 1 September 2015 at 14:31, Jason Pickering 
wrote:

> Hi Calle,
> It is very difficult to say much without knowing what SQL it was you
> executed. In general, use of the API or UI is usually much safer.
>
> Do you have any sort of cache in front of your DHIS2 instance?
>
> Can you confirm from the database that the names were actually changed?
>
> Regards,
> Jason
>
>
> On Tue, Sep 1, 2015 at 12:49 PM, Calle Hedberg 
> wrote:
>
>> Lars,
>>
>> Nope - all data set names and short names are the same.
>>
>> It's just weird, and I don't like inexplicable things happening to a
>> database
>>
>> When you run data integrity - WHERE are those queries fetching data from?
>> Are the integrity queries running against the database itself, or some kind
>> of cache repository?
>>
>> Regards
>> Calle
>>
>> On 1 September 2015 at 13:00, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Calle,
>>>
>>> perhaps you did not update the data set short names?
>>>
>>> Lars
>>>
>>> On Tue, Sep 1, 2015 at 11:50 AM, Calle Hedberg 
>>> wrote:
>>>
 Hi

 I've got a baffling problem (presumably related to some kind of
 caching):

 1. yesterday I updated various data records using pgremote, including
 data set names. We restarted tomcat after the updates.

 2. I've also cleared my browser cache, the DHIS2 cache, updated
 resource tables, etc.

 3. When I now open the list of data sets, all the changed/new names are
 showing as expected.

 4. BUT when I run Data Integrity, a few violations related to data sets
 are coming up AND THE DATA SET NAMES ARE THE OLD ONES.

 Any ideas what could cause this weird behaviour?

 Regards
 Calle

 ***

 Calle Hedberg

 46D Alma Road, 7700 Rosebank, SOUTH AFRICA

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

 Cell: +27-82-853-5352

 Iridium SatPhone: +8816-315-19274

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

 Skype: calle_hedberg

 ***


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


>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> http://www.dhis2.org 
>>>
>>>
>>
>>
>> --
>>
>> ***
>>
>> Calle Hedberg
>>
>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>
>> Tel/fax (home): +27-21-685-6472
>>
>> Cell: +27-82-853-5352
>>
>> Iridium SatPhone: +8816-315-19274
>>
>> Email: calle.hedb...@gmail.com
>>
>> Skype: calle_hedberg
>>
>> ***
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
>



-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

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

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19274

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

Skype: calle_hedberg

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


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

2015-09-01 Thread noreply

revno: 19924
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-09-02 12:19:09 +0700
message:
  Minor fix
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.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-02 05:15:31 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-02 05:19:09 +
@@ -74,9 +74,6 @@
 @Autowired
 private OrganisationUnitService organisationUnitService;
 
-@Autowired
-private DataElementService dataElementService;
-
 // -
 // Execute
 // -

___
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 19927: use ValueType in MinMaxOutlierAnalysisService

2015-09-01 Thread noreply

revno: 19927
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-09-02 12:31:37 +0700
message:
  use ValueType in MinMaxOutlierAnalysisService
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/MinMaxOutlierAnalysisService.java
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.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/dataanalysis/MinMaxOutlierAnalysisService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/MinMaxOutlierAnalysisService.java	2015-07-03 01:33:37 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/MinMaxOutlierAnalysisService.java	2015-09-02 05:31:37 +
@@ -28,23 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_INT;
-import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_NEGATIVE_INT;
-import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_POSITIVE_INT;
-import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_ZERO_OR_POSITIVE_INT;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import org.amplecode.quick.BatchHandler;
 import org.amplecode.quick.BatchHandlerFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.IdentifiableObjectUtils;
+import org.hisp.dhis.common.ValueType;
 import org.hisp.dhis.commons.filter.Filter;
 import org.hisp.dhis.commons.filter.FilterUtils;
 import org.hisp.dhis.dataelement.DataElement;
@@ -59,6 +48,13 @@
 import org.hisp.dhis.system.util.MathUtils;
 import org.joda.time.DateTime;
 
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 /**
  * @author Lars Helge Overland
  */
@@ -66,27 +62,27 @@
 implements MinMaxDataAnalysisService
 {
 private static final Log log = LogFactory.getLog( MinMaxOutlierAnalysisService.class );
-
+
 private static final Filter DATALEMENT_INT_FILTER = new DataElementTypeFilter( DataElement.VALUE_TYPE_INT );
-
+
 // -
 // Dependencies
 // -
-
+
 private DataAnalysisStore dataAnalysisStore;
 
 public void setDataAnalysisStore( DataAnalysisStore dataAnalysisStore )
 {
 this.dataAnalysisStore = dataAnalysisStore;
 }
-
+
 private MinMaxDataElementService minMaxDataElementService;
 
 public void setMinMaxDataElementService( MinMaxDataElementService minMaxDataElementService )
 {
 this.minMaxDataElementService = minMaxDataElementService;
 }
-
+
 private BatchHandlerFactory batchHandlerFactory;
 
 public void setBatchHandlerFactory( BatchHandlerFactory batchHandlerFactory )
@@ -103,21 +99,21 @@
 Collection dataElements, Collection periods, Double stdDevFactor, Date from )
 {
 Set elements = new HashSet<>( dataElements );
-
+
 FilterUtils.filter( elements, DATALEMENT_INT_FILTER );
-
+
 Set categoryOptionCombos = new HashSet<>();
-
+
 for ( DataElement dataElement : elements )
 {
 categoryOptionCombos.addAll( dataElement.getCategoryCombo().getOptionCombos() );
 }
 
 log.debug( "Starting min-max analysis, no of data elements: " + elements.size() + ", no of org units: " + organisationUnits.size() );
-
+
 return dataAnalysisStore.getMinMaxViolations( elements, categoryOptionCombos, periods, organisationUnits, MAX_OUTLIERS );
 }
-
+
 @Override
 public void generateMinMaxValues( Collection organisationUnits,
 Collection dataElements, Double stdDevFactor )
@@ -127,57 +123,59 @@
 Set orgUnitIds = new HashSet<>( IdentifiableObjectUtils.getIdentifiers( organisationUnits ) );
 
 Date from = new DateTime( 1, 1, 1, 1, 1 ).toDate();
-
+
 minMaxDataElementService.removeMinMaxDataElements( dataElements, organisationUnits );
 
 log.debug( "Deleted existing min-max values" );
 
 BatchHandler batchHandler = batchHandlerFactory.createBatchHandler( 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19923: adds persisted valuetype (vtype), old types are still present for now, does not expose type/textt...

2015-09-01 Thread noreply

revno: 19923
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-09-02 12:15:31 +0700
message:
  adds persisted valuetype (vtype), old types are still present for now, does 
not expose type/texttype/numbertype in the web-api anymore (only valueType)
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java
  
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/startup/TableAlteror.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityAttribute.hbm.xml
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/AddDataElementAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.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-08-31 07:23:07 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java	2015-09-02 05:15:31 +
@@ -28,11 +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.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * @author Lars Helge Overland
@@ -59,6 +61,19 @@
 OPTION_SET( String.class ),
 USERNAME( String.class );
 
+public static List INTEGER_TYPE_STRINGS = Lists.newArrayList(
+INTEGER.toString(), INTEGER_POSITIVE.toString(), INTEGER_NEGATIVE.toString(), INTEGER_ZERO_OR_POSITIVE.toString()
+);
+
+public static List NUMERIC_TYPE_STRINGS = Lists.newArrayList(
+INTEGER.toString(), INTEGER_POSITIVE.toString(), INTEGER_NEGATIVE.toString(), INTEGER_ZERO_OR_POSITIVE.toString(),
+NUMBER.toString(), UNIT_INTERVAL.toString(), PERCENTAGE.toString()
+);
+
+public static List TEXT_TYPE_STRINGS = Lists.newArrayList(
+TEXT.toString(), LONG_TEXT.toString()
+);
+
 private final Class javaClass;
 
 ValueType()
@@ -83,7 +98,7 @@
 
 public boolean isNumeric()
 {
-return this.isInteger() || this == NUMBER;
+return this.isInteger() || this == NUMBER || this == UNIT_INTERVAL || this == PERCENTAGE;
 }
 
 public boolean isText()

=== 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-01 06:25:21 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-02 05:15:31 +
@@ -616,7 +616,7 @@
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
 public ValueType getValueType()
 {
-return ValueType.getFromDataElement( this );
+return valueType != null ? valueType : ValueType.getFromDataElement( this );
 }
 
 public void setValueType( ValueType valueType )
@@ -624,6 +624,36 @@
 this.valueType = valueType;
 }
 
+public String getType()
+{
+return type;
+}
+
+public void setType( String type )
+{
+this.type = type;
+}
+
+public String getNumberType()
+{
+return numberType;
+}
+
+public void setNumberType( String numberType )
+{
+this.numberType = numberType;
+}
+
+public String getTextType()
+{
+return textType;
+}
+
+public void setTextType( String textType )
+{
+this.textType = textType;
+}
+
 @JsonProperty
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
@@ -654,32 +684,6 @@
 @JsonProperty
 @JsonView( { DetailedView.class, ExportView.class } )
   

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19925: support de.valueType mergeWith

2015-09-01 Thread noreply

revno: 19925
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-09-02 12:21:56 +0700
message:
  support de.valueType mergeWith
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.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-02 05:15:31 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-02 05:21:56 +
@@ -836,6 +836,7 @@
 type = dataElement.getType();
 numberType = dataElement.getNumberType();
 textType = dataElement.getTextType();
+valueType = dataElement.getValueType();
 aggregationOperator = dataElement.getAggregationOperator();
 categoryCombo = dataElement.getCategoryCombo();
 url = dataElement.getUrl();
@@ -849,6 +850,7 @@
 type = dataElement.getType() == null ? type : dataElement.getType();
 numberType = dataElement.getNumberType() == null ? numberType : dataElement.getNumberType();
 textType = dataElement.getTextType() == null ? textType : dataElement.getTextType();
+valueType = dataElement.getValueType() == null ? valueType : dataElement.getValueType();
 aggregationOperator = dataElement.getAggregationOperator() == null ? aggregationOperator : dataElement.getAggregationOperator();
 categoryCombo = dataElement.getCategoryCombo() == null ? categoryCombo : dataElement.getCategoryCombo();
 url = dataElement.getUrl() == null ? url : dataElement.getUrl();

___
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 19926: update DefaultDataEntryFormService to use ValueType

2015-09-01 Thread noreply

revno: 19926
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-09-02 12:26:25 +0700
message:
  update DefaultDataEntryFormService to use ValueType
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.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/dataentryform/DefaultDataEntryFormService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java	2015-06-16 05:11:29 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java	2015-09-02 05:26:25 +
@@ -28,23 +28,14 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.apache.commons.lang3.StringEscapeUtils.escapeHtml3;
-import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_BOOL;
-import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_LONG_TEXT;
-import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_TRUE_ONLY;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.IdentifiableObjectManager;
 import org.hisp.dhis.common.IdentifiableObjectUtils;
+import org.hisp.dhis.common.ValueType;
+import org.hisp.dhis.commons.collection.CachingMap;
+import org.hisp.dhis.commons.filter.Filter;
+import org.hisp.dhis.commons.filter.FilterUtils;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementOperand;
@@ -54,11 +45,18 @@
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorService;
 import org.hisp.dhis.system.callable.IdentifiableObjectCallable;
-import org.hisp.dhis.commons.collection.CachingMap;
-import org.hisp.dhis.commons.filter.Filter;
-import org.hisp.dhis.commons.filter.FilterUtils;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+
+import static org.apache.commons.lang3.StringEscapeUtils.escapeHtml3;
+
 /**
  * @author Bharath Kumar
  */
@@ -116,7 +114,7 @@
 {
 dataEntryForm.setFormat( DataEntryForm.CURRENT_FORMAT );
 }
-
+
 return dataEntryFormStore.save( dataEntryForm );
 }
 
@@ -157,7 +155,7 @@
 {
 return null;
 }
-
+
 StringBuffer sb = new StringBuffer();
 
 Matcher inputMatcher = INPUT_PATTERN.matcher( htmlCode );
@@ -200,14 +198,14 @@
 {
 return null;
 }
-
+
 CachingMap optionComboMap = new CachingMap<>();
 
 optionComboMap.putAll( IdentifiableObjectUtils.getUidObjectMap( dataSet.getDataElementOptionCombos() ) );
-
-IdentifiableObjectCallable optionComboCallabel = 
+
+IdentifiableObjectCallable optionComboCallabel =
 new IdentifiableObjectCallable( idObjectManager, DataElementCategoryOptionCombo.class, null );
-
+
 StringBuffer sb = new StringBuffer();
 
 Matcher inputMatcher = INPUT_PATTERN.matcher( dataEntryForm.getHtmlCode() );
@@ -269,8 +267,8 @@
 continue;
 }
 
-inputHtml = inputHtml.contains( EMPTY_VALUE_TAG ) ? inputHtml.replace( EMPTY_VALUE_TAG, displayValue ) : inputHtml.replace( TAG_CLOSE, ( displayValue + TAG_CLOSE ) );
-inputHtml = inputHtml.contains( EMPTY_TITLE_TAG ) ? inputHtml.replace( EMPTY_TITLE_TAG, displayTitle ) : inputHtml.replace( TAG_CLOSE, ( displayTitle + TAG_CLOSE ) );
+inputHtml = inputHtml.contains( EMPTY_VALUE_TAG ) ? inputHtml.replace( EMPTY_VALUE_TAG, displayValue ) : inputHtml.replace( TAG_CLOSE, (displayValue + TAG_CLOSE) );
+inputHtml = inputHtml.contains( EMPTY_TITLE_TAG ) ? inputHtml.replace( EMPTY_TITLE_TAG, displayTitle ) : inputHtml.replace( TAG_CLOSE, (displayTitle + TAG_CLOSE) );
 
 inputMatcher.appendReplacement( sb, inputHtml );
 }
@@ -289,20 +287,20 @@
 {
 return null;
 }
-
+
 // -
 // Inline javascript/html to add to HTML 

Re: [Dhis2-devs] Weird cache issue

2015-09-01 Thread Halvdan Grelland
Calle, I'm pretty sure Jason was referring to whatever you were doing to
update the records (your point #1 in original email) which was not, as far
as I can understand, using the UI or the web-api. I am not familiar with
"pgremote" but am assuming it's some kind of postgres connector allowing
you to run (sql) queries. We'd need to see those queries in order to figure
out what could have gone wrong.

2015-09-01 14:50 GMT+02:00 Calle Hedberg :

> Jason
>
> I was not executing any custom sql - I'm running the Data Administration
> -> Data Integrity process checks.
>
> My reference to the sql queries being run relates to my ASSUMPTION that
> the Data Integrity checks are a series of SQL queries - but maybe not,
> maybe the integrity checks are a series of web api calls followed by some
> kind of front-end processing? I just don't know, and I'm not a Java
> developer and I don't have the code base on my laptop so I cannot find out
> myself...
>
> Seems my initial post was not clear enough on this - apologies for that.
>
> Regards
> Calle
>
> On 1 September 2015 at 14:31, Jason Pickering  > wrote:
>
>> Hi Calle,
>> It is very difficult to say much without knowing what SQL it was you
>> executed. In general, use of the API or UI is usually much safer.
>>
>> Do you have any sort of cache in front of your DHIS2 instance?
>>
>> Can you confirm from the database that the names were actually changed?
>>
>> Regards,
>> Jason
>>
>>
>> On Tue, Sep 1, 2015 at 12:49 PM, Calle Hedberg 
>> wrote:
>>
>>> Lars,
>>>
>>> Nope - all data set names and short names are the same.
>>>
>>> It's just weird, and I don't like inexplicable things happening to a
>>> database
>>>
>>> When you run data integrity - WHERE are those queries fetching data
>>> from? Are the integrity queries running against the database itself, or
>>> some kind of cache repository?
>>>
>>> Regards
>>> Calle
>>>
>>> On 1 September 2015 at 13:00, Lars Helge Øverland 
>>> wrote:
>>>
 Hi Calle,

 perhaps you did not update the data set short names?

 Lars

 On Tue, Sep 1, 2015 at 11:50 AM, Calle Hedberg  wrote:

> Hi
>
> I've got a baffling problem (presumably related to some kind of
> caching):
>
> 1. yesterday I updated various data records using pgremote, including
> data set names. We restarted tomcat after the updates.
>
> 2. I've also cleared my browser cache, the DHIS2 cache, updated
> resource tables, etc.
>
> 3. When I now open the list of data sets, all the changed/new names
> are showing as expected.
>
> 4. BUT when I run Data Integrity, a few violations related to data
> sets are coming up AND THE DATA SET NAMES ARE THE OLD ONES.
>
> Any ideas what could cause this weird behaviour?
>
> Regards
> Calle
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19274
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


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


>>>
>>>
>>> --
>>>
>>> ***
>>>
>>> Calle Hedberg
>>>
>>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>>
>>> Tel/fax (home): +27-21-685-6472
>>>
>>> Cell: +27-82-853-5352
>>>
>>> Iridium SatPhone: +8816-315-19274
>>>
>>> Email: calle.hedb...@gmail.com
>>>
>>> Skype: calle_hedberg
>>>
>>> ***
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com
>> tel:+46764147049
>>
>
>
>
> --
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19274
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
>
> ___
> Mailing list: 

Re: [Dhis2-devs] Convert Excel to xml and to json

2015-09-01 Thread Jason Pickering
Hi Channara,

Good to know this is fake data.

Anyway, did you have a look here at the docs
?

I think you would need quite a few scripts for this. You would need to
properly encode and escape the Khmer text to UTF-8, format the DOB properly
(it does not look standard), and then map each of the fields to an
attribute to enroll the tracked entity into a program (to create a tracked
entity instance). Likely, the other fields such as the community and
village, would need to be part of an option set, so you would need to be
sure that the option exists and that the code is transmitted as part of the
payload.

Another approach might be direct injection into the database, but you would
still need to properly map all of the fields, and I suspect that it would
be easier to use the API for this.

I do not think there is any one tool which would do this, but likely would
would need to code something yourself using some scripting language (VBA,
Python and R come to mind).

Regards,
Jason


On Tue, Sep 1, 2015 at 12:02 PM, channara rin 
wrote:

> Hi all DHIS2,
> Do you know how to convert Excel tracker list to xml and to json that
> enable import into DHIS2 system?
>
> [image: Inline image 1]
>
> thank you
> CHANNARA
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
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 19922: Introduced attribute type category combo to programs. This will be used to tage events of a given...

2015-09-01 Thread noreply

revno: 19922
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Tue 2015-09-01 16:28:36 +0200
message:
  Introduced attribute type category combo to programs. This will be used to 
tage events of a given program based on different projects and implementation 
plans
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
  
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/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/AddProgramAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/ShowAddProgramFormAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/ShowUpdateProgramFormAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/UpdateProgramAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.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/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2015-08-25 09:48:55 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2015-09-01 14:28:36 +
@@ -43,6 +43,7 @@
 import org.hisp.dhis.common.view.DetailedView;
 import org.hisp.dhis.common.view.ExportView;
 import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 import org.hisp.dhis.dataentryform.DataEntryForm;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.relationship.RelationshipType;
@@ -128,6 +129,11 @@
 
 private DataEntryForm dataEntryForm;
 
+/**
+ * The CategoryCombo used for data attributes.
+ */
+private DataElementCategoryCombo categoryCombo;
+
 // -
 // Constructors
 // -
@@ -634,6 +640,29 @@
 this.dataEntryForm = dataEntryForm;
 }
 
+@JsonProperty
+@JsonSerialize( as = BaseIdentifiableObject.class )
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+public DataElementCategoryCombo getCategoryCombo()
+{
+return categoryCombo;
+}
+
+public void setCategoryCombo( DataElementCategoryCombo categoryCombo )
+{
+this.categoryCombo = categoryCombo;
+}
+
+/**
+ * Indicates whether this program has a category combination which is different
+ * from the default category combination.
+ */
+public boolean hasCategoryCombo()
+{
+return categoryCombo != null && !DataElementCategoryCombo.DEFAULT_CATEGORY_COMBO_NAME.equals( categoryCombo.getName() );
+}
+
 @Override
 public void mergeWith( IdentifiableObject other, MergeStrategy strategy )
 {

=== 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-08-19 11:58:26 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-01 14:28:36 +
@@ -724,7 +724,8 @@
 
 executeSql( "UPDATE optionset SET version=0 WHERE version IS NULL" );
 executeSql( "UPDATE dataset SET version=0 WHERE version IS NULL" );
-executeSql( "UPDATE program 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( "ALTER TABLE datavalue ALTER COLUMN lastupdated TYPE timestamp" );
 executeSql( "ALTER TABLE completedatasetregistration ALTER COLUMN date TYPE timestamp" );

=== modified file