Re: [Dhis2-devs] dhis2 2.13 pivot table organization unite wise reporting bug in boriwser

2015-02-23 Thread Uddin Fatema
Dear Lars,

Usually pivot table is working fine but when i am creating a new pivot
table by organization unit wise. the steps are given bellow.

Select a group of dataelemnt, and period 2014, select organization unit
group (community clinic), den select organization unite. press update(Till
this point its working fine) after that in layout, organization unit keep
in row . now when i press update that time it shows this error(row size is
not much)

Thanks a lot


On Mon, Feb 23, 2015 at 2:06 AM, Lars Helge Øverland 
wrote:

> Hi Fatema,
>
> does this happen for all your favorites or just one? Can you try to
> re-create that pivot table favorite and see if it goes away?
>
> regards,
>
> Lars
>
>
> On Sun, Feb 22, 2015 at 5:52 AM, Uddin Fatema  wrote:
>
>> Dear All,
>>
>> I am using dhis2 2.13 for few application server. when i am running pivot
>> table with organization wise report that time it shows browser error ..like
>>
>> Apache Tomcat/7.0.26-Error report...
>>
>> Here i attached the bug screen short.
>>
>> Please anyone tell what is the problem. and how can i solve it.
>>
>>
>> Thanks
>>
>> Regards,
>> *Fatema Uddin*
>>
>> Technical Advisor (HIS)-Support to the Health Sector Program II
>> Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH
>> German House
>> House 10/A-2, Road 90
>> Gulshan 2, Dhaka 1212, Bangladesh
>>
>> T  +880 9666701000
>> F  +880 28823099
>> M +880 19 6206 4721
>> I   www.giz.de
>> 
>>
>>
>> ___
>> 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
>>
>>
>


-- 
Regards,
*Fatema Uddin*

Technical Advisor (HIS)-Support to the Health Sector Program II
Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH
German House
House 10/A-2, Road 90
Gulshan 2, Dhaka 1212, Bangladesh

T  +880 9666701000
F  +880 28823099
M +880 19 6206 4721
I   www.giz.de

___
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] Data capture and maintenance organisation units

2015-02-23 Thread Lars Helge Øverland
Hi Lungo,

go to apps > settings > general > set max offline org unit levels to
something lower.

regards,

Lars


On Mon, Feb 23, 2015 at 9:00 AM, Juma Lungo  wrote:

> Dear all
>
> Please advise on how to improve loading of the "Data capture and
> maintenance organisation units" list when adding/editing users. It takes a
> lot of time to load and most of the time it does not complete.
>
> Lungo
>
>
> --
> Juma Lungo | Lecturer, University of Dar-es-Salaam |
> Tel. +255767065098 | jlu...@udsm.ac.tz
>
>
___
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] Analytics table dimensions contain duplicates: ["uidlevel3", "uidlevel4"] DHIS2 v2.17

2015-02-23 Thread Lars Helge Øverland
Hi Pierre,

check the organisationunitlevel table and if the level column are
continuous and has no duplicates.

select * from orgunitlevel order by level;

regards,

Lars
___
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] Aggregation query builder

2015-02-23 Thread Emma Kassy
Hi Channara,
The data element should be assigned to a different data set.
In other wards, you can have the same data element but in different data
sets. That way you will not have an error.

On Mon, Feb 23, 2015 at 8:13 AM, channara rin 
wrote:

> Hi all DHIS2,
> I wonder can i make aggregation query builder for the same data element
> but in different organisation unit?
>
> When i did, i go the error?
> [image: Inline image 1]
>
> ___
> 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
>
>


-- 
Thank you and Kind Regards
*Immarcqulate. A (Emma Kassy) *

*"You miss 100% of the shots you don't take."*
___
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] Aggregation query builder

2015-02-23 Thread channara rin
I did like that, but wonder has error. Let me try another data element
first, i will inform you soon...

Thank you
Channara

On Mon, Feb 23, 2015 at 4:48 PM, Emma Kassy  wrote:

> Hi Channara,
> The data element should be assigned to a different data set.
> In other wards, you can have the same data element but in different data
> sets. That way you will not have an error.
>
> On Mon, Feb 23, 2015 at 8:13 AM, channara rin 
> wrote:
>
>> Hi all DHIS2,
>> I wonder can i make aggregation query builder for the same data element
>> but in different organisation unit?
>>
>> When i did, i go the error?
>> [image: Inline image 1]
>>
>> ___
>> 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
>>
>>
>
>
> --
> Thank you and Kind Regards
> *Immarcqulate. A (Emma Kassy) *
>
> *"You miss 100% of the shots you don't take."*
>
___
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] Aggregation query builder

2015-02-23 Thread channara rin
seem another data element is OK, but why only that data element meet error?
s.th wrong with it?

any one tell me?

Thank you
Channara

On Mon, Feb 23, 2015 at 4:53 PM, channara rin 
wrote:

> I did like that, but wonder has error. Let me try another data element
> first, i will inform you soon...
>
> Thank you
> Channara
>
> On Mon, Feb 23, 2015 at 4:48 PM, Emma Kassy  wrote:
>
>> Hi Channara,
>> The data element should be assigned to a different data set.
>> In other wards, you can have the same data element but in different data
>> sets. That way you will not have an error.
>>
>> On Mon, Feb 23, 2015 at 8:13 AM, channara rin 
>> wrote:
>>
>>> Hi all DHIS2,
>>> I wonder can i make aggregation query builder for the same data element
>>> but in different organisation unit?
>>>
>>> When i did, i go the error?
>>> [image: Inline image 1]
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Thank you and Kind Regards
>> *Immarcqulate. A (Emma Kassy) *
>>
>> *"You miss 100% of the shots you don't take."*
>>
>
>
___
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] SMS Not finding Users Associated with Phones

2015-02-23 Thread Lars Helge Øverland
The significant log part is this:

WARN  2015-02-17 18:04:46,179 Cannot get users with disjoint roles as user
does not have any user roles

Try to give the dhis user at least one user role.

Lars
___
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] Aggregation query builder

2015-02-23 Thread Tran Chau (HISP Vietnam)
Hi Channara,

No, we cannot define aggregation query builder for the same data element
with different organisation units.
Organisation unit is not required in one aggregate query builder formula.

When these formulas is run automatically, the system will get tracker data
from orgunits and generate aggregate data for each orgunit.

Besides, we can run the aggregation query builder formulas by manually. For
this functionality, we can choose orgunits where we need to generate
aggregate data. Go to *Individual Records > Manual aggregation* to see this
function.

...
Best regards,
Tran Chau.




On Mon, Feb 23, 2015 at 5:00 PM, channara rin 
wrote:

> seem another data element is OK, but why only that data element meet
> error? s.th wrong with it?
>
> any one tell me?
>
> Thank you
> Channara
>
> On Mon, Feb 23, 2015 at 4:53 PM, channara rin 
> wrote:
>
>> I did like that, but wonder has error. Let me try another data element
>> first, i will inform you soon...
>>
>> Thank you
>> Channara
>>
>> On Mon, Feb 23, 2015 at 4:48 PM, Emma Kassy  wrote:
>>
>>> Hi Channara,
>>> The data element should be assigned to a different data set.
>>> In other wards, you can have the same data element but in different data
>>> sets. That way you will not have an error.
>>>
>>> On Mon, Feb 23, 2015 at 8:13 AM, channara rin 
>>> wrote:
>>>
 Hi all DHIS2,
 I wonder can i make aggregation query builder for the same data element
 but in different organisation unit?

 When i did, i go the error?
 [image: Inline image 1]

 ___
 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


>>>
>>>
>>> --
>>> Thank you and Kind Regards
>>> *Immarcqulate. A (Emma Kassy) *
>>>
>>> *"You miss 100% of the shots you don't take."*
>>>
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] dhis2 2.18 upgrade - Event Capture and Resource table bugs

2015-02-23 Thread Uddin Fatema
Dear All,

I have converted my dhis2 2.16 version to 2.18. Now i found two error those
are given bellow.

1. When i click on event capture and select Orgunite and select event
program that time it shows
 ERROR 2015-02-18 11:13:18,614 Error while executing action
(ExceptionIntercept
or.java [http-apr-8085-exec-10])
java.lang.NullPointerException
at
org.hisp.dhis.appcache.CacheManifest.execute(CacheManifest.java:101)

2. When i click on create resource table that time shows error that are
given bellow.

ERROR: duplicate key value violates unique constraint
"_dateperiodstructure_pkey
"
  Detail: Key (dateperiod)=(2009-12-31) already exists.; nested exception
is org
.postgresql.util.PSQLException: ERROR: duplicate key value violates unique
const
raint "_dateperiodstructure_pkey"
  Detail: Key (dateperiod)=(2009-12-31) already exists.]
(InMemoryNotifier.java
[taskScheduler-3])


Here i attached the log file.


Thanks and waiting for your important suggestion.

Regards,
*Fatema Uddin*

Technical Advisor (HIS)-Support to the Health Sector Program II
Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH
German House
House 10/A-2, Road 90
Gulshan 2, Dhaka 1212, Bangladesh

T  +880 9666701000
F  +880 28823099
M +880 19 6206 4721
I   www.giz.de

* INFO  2015-02-22 11:48:06,009 Login success for user: 'admin', ip: '127.0.0.1'
 (DefaultUserAuditService.java [http-apr-8085-exec-7])
* ERROR 2015-02-22 12:01:33,540 Error while executing action (ExceptionIntercept
or.java [http-apr-8085-exec-3])
java.lang.NullPointerException
at org.hisp.dhis.appcache.CacheManifest.execute(CacheManifest.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultA
ctionInvocation.java:450)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(Defa
ultActionInvocation.java:289)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:252)
at org.hisp.dhis.webportal.interceptor.XWorkPortalUserInterceptor.interc
ept(XWorkPortalUserInterceptor.java:91)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.inte
rcept(XWorkPortalModuleInterceptor.java:92)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor.interc
ept(XWorkPortalMenuInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at org.hisp.dhis.webportal.interceptor.XWorkPortalParamsInterceptor.inte
rcept(XWorkPortalParamsInterceptor.java:150)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at org.hisp.dhis.interceptor.ContextInterceptor.intercept(ContextInterce
ptor.java:83)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at org.hisp.dhis.interceptor.UserSettingInterceptor.intercept(UserSettin
gInterceptor.java:84)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at org.hisp.dhis.security.intercept.LoginInterceptor.intercept(LoginInte
rceptor.java:85)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at org.hisp.dhis.security.intercept.XWorkSecurityInterceptor.intercept(X
WorkSecurityInterceptor.java:116)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at org.hisp.dhis.interceptor.SystemSettingInterceptor.intercept(SystemSe
ttingInterceptor.java:135)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at org.hisp.dhis.interceptor.I18nInterceptor.intercept(I18nInterceptor.j
ava:139)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
(ParametersInterceptor.java:254)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:246)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.inter
cept(StaticParametersInterceptor.java:191)
at com.opensymph

Re: [Dhis2-devs] Analytics table dimensions contain duplicates: ["uidlevel3", "uidlevel4"] DHIS2 v2.17

2015-02-23 Thread Calle Hedberg
Lars,

We had a nearly identical issue with one of our database on Friday -
importing one new orgunit from another databaseinstance resulted in
duplicates in the orgunitlevel table, which in turn caused analytics to
fail.

The key design issue (I would not call it a bug, even if it appears like
that) here is the data and meta-data import functionality in DHIS2 does not
assist users to avoid such duplication by
- identify potential duplicates by checking e.g. name or level or UID
- display the potential duplicates to the user to enable her/him to modify
or drop the conflicting records.
This type of import checks have been in DHIS 1.4 for a long time.

This design issue does not only affect the orgunitlevel table - it affects
much more profoundly the whole categoryoptioncombo and attributeoptioncombo
system, where it is very easy to end up with multiple versions of in
reality the same categoryoptioncombo name (but each with it's own internal
id and uid). That in turn causes havoc with e.g. indicators, because the
indicator engine seemingly randomly picks the first of those duplicates it
find. This issue has required many days of cleaning up in the back end for
at least two country systems I've worked on recently (Namibia and Lesotho).

Any chance we could have a round-table discussion on how to re-design the
import processes to handle this better?

Regards
Calle

On 23 February 2015 at 11:01, Lars Helge Øverland 
wrote:

> Hi Pierre,
>
> check the organisationunitlevel table and if the level column are
> continuous and has no duplicates.
>
> select * from orgunitlevel order by level;
>
> regards,
>
> Lars
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

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

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19274

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

Skype: calle_hedberg

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


[Dhis2-devs] [Bug 1424604] [NEW] Category option combo not matched on import

2015-02-23 Thread Lars Helge Øverland
Public bug reported:

During meta-data import, category option combos are sometimes not
properly matched to existing ones. Most notably, you might end up with
multiple "default" category option combos after a meta-data import.

** Affects: dhis2
 Importance: Critical
 Assignee: Morten Olav Hansen (mortenoh)
 Status: New

** Changed in: dhis2
 Assignee: (unassigned) => Morten Olav Hansen (mortenoh)

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

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

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

Title:
  Category option combo not matched on import

Status in DHIS 2:
  New

Bug description:
  During meta-data import, category option combos are sometimes not
  properly matched to existing ones. Most notably, you might end up with
  multiple "default" category option combos after a meta-data import.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1424604/+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 18375: Data set report, allowing for future periods as some data sets might have future data

2015-02-23 Thread noreply

revno: 18375
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-02-23 11:10:31 +0100
message:
  Data set report, allowing for future periods as some data sets might have 
future data
modified:
  
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2015-01-20 19:24:35 +
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2015-02-23 10:10:31 +
@@ -136,7 +136,6 @@
 dhis2.dsr.displayPeriodsInternal = function( periodType, offset )
 {
 var periods = dhis2.period.generator.generateReversedPeriods(periodType, offset);
-periods = dhis2.period.generator.filterFuturePeriodsExceptCurrent( periods );
 
 $( "#periodId" ).removeAttr( "disabled" );
 clearListById( "periodId" );

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


Re: [Dhis2-devs] [Bug 1424604] [NEW] Category option combo not matched on import

2015-02-23 Thread Calle Hedberg
Please add to this: the same happens with regard to the orgunitlevel table
when importing OrgUnits - if the orgunit being imported have levels with
different names or UIDs, you risk duplication.

Regards
Calle

On 23 February 2015 at 13:49, Lars Helge Øverland 
wrote:

> Public bug reported:
>
> During meta-data import, category option combos are sometimes not
> properly matched to existing ones. Most notably, you might end up with
> multiple "default" category option combos after a meta-data import.
>
> ** Affects: dhis2
>  Importance: Critical
>  Assignee: Morten Olav Hansen (mortenoh)
>  Status: New
>
> ** Changed in: dhis2
>  Assignee: (unassigned) => Morten Olav Hansen (mortenoh)
>
> ** Changed in: dhis2
> Milestone: None => 2.19
>
> ** Changed in: dhis2
>Importance: Undecided => Critical
>
> --
> You received this bug notification because you are a member of DHIS 2
> developers, which is subscribed to DHIS.
> https://bugs.launchpad.net/bugs/1424604
>
> Title:
>   Category option combo not matched on import
>
> Status in DHIS 2:
>   New
>
> Bug description:
>   During meta-data import, category option combos are sometimes not
>   properly matched to existing ones. Most notably, you might end up with
>   multiple "default" category option combos after a meta-data import.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1424604/+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
>



-- 

***

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 18377: Cache manifest action, fixed nullpointer vulnerability

2015-02-23 Thread noreply

revno: 18377
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-02-23 12:48:32 +0100
message:
  Cache manifest action, fixed nullpointer vulnerability
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/resources/struts.xml
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/appcache/CacheManifestAction.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-apps/src/main/resources/struts.xml	2015-01-22 16:55:07 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/resources/struts.xml	2015-02-23 11:48:32 +
@@ -46,6 +46,7 @@
 		
 			index.html
 		
+		
 		
 			dhis-web-event-capture
 			i18n

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/appcache/CacheManifestAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/appcache/CacheManifestAction.java	2015-02-22 20:30:29 +
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/appcache/CacheManifestAction.java	2015-02-23 11:48:32 +
@@ -38,9 +38,9 @@
 import javax.servlet.ServletContext;
 
 import org.apache.struts2.ServletActionContext;
+import org.hisp.dhis.i18n.locale.LocaleManager;
 import org.hisp.dhis.system.SystemInfo;
 import org.hisp.dhis.system.SystemService;
-import org.hisp.dhis.user.UserSettingService;
 import org.springframework.beans.factory.annotation.Autowired;
 
 import com.opensymphony.xwork2.Action;
@@ -53,10 +53,10 @@
 implements Action
 {
 @Autowired
-private UserSettingService userSettingService;
-
-@Autowired
 private SystemService systemService;
+
+@Autowired
+private LocaleManager localeManager;
 
 private String appPath;
 
@@ -97,7 +97,8 @@
 File i18nFolder = null;
 StringBuffer stringBuffer = null;
 
-String locale = userSettingService.getUserSetting( UserSettingService.KEY_UI_LOCALE ).toString();
+String locale = localeManager.getCurrentLocale().toString();
+
 SystemInfo info = systemService.getSystemInfo();
 String revisionTag = "#Revision:" + info.getRevision();
 

___
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 18376: minor fixes, adds type to QueryEngine and adds ResultTransformers for running multiple transforme...

2015-02-23 Thread noreply

revno: 18376
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-02-23 18:17:55 +0700
message:
  minor fixes, adds type to QueryEngine and adds ResultTransformers for running 
multiple transformes on a result
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/ResultTransformers.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Operator.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/QueryEngine.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/CriteriaQueryEngine.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryService.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/query/Operator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Operator.java	2015-02-20 08:28:01 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Operator.java	2015-02-23 11:17:55 +
@@ -28,7 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.apache.commons.lang3.time.DateUtils;
 import org.hisp.dhis.schema.Klass;
 
 import java.util.Date;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/QueryEngine.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/QueryEngine.java	2015-02-18 13:08:37 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/QueryEngine.java	2015-02-23 11:17:55 +
@@ -35,7 +35,7 @@
 /**
  * @author Morten Olav Hansen 
  */
-public interface QueryEngine
+public interface QueryEngine
 {
-List query( Query query );
+List query( Query query );
 }

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/ResultTransformers.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/ResultTransformers.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/ResultTransformers.java	2015-02-23 11:17:55 +
@@ -0,0 +1,75 @@
+package org.hisp.dhis.query;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author Morten Olav Hansen 
+ */
+public class ResultTransformers implements ResultTransformer
+{
+private List resultTransformers = new ArrayList<>();
+
+public ResultTransformers( ResultTransformer... resultTransformers )
+{
+Collections.addAll( this.resultTransformers, resultTransformers );
+}
+
+public ResultTransformers( List resultTransformers )
+{
+this.resultTransformers = resultTransformers;
+}
+
+@Override
+public Result transform( MutableResult mutableResult )
+{
+Result result = mutableResult;
+
+for ( ResultTransformer resultTransformer : resultTransformers )
+{
+result = resultTransformer.transform( new MutableResult( result.getItems() ) );
+}
+
+return result;
+}
+
+public ResultTransformer add( ResultTransformer... resultTransformers )
+{
+Collections.addAll( this.resultTransformers, resultTransformers );
+return this;
+}
+
+public static ResultTransformer from( ResultTransformer... res

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18378: Added bean def for CacheManifestAction

2015-02-23 Thread noreply

revno: 18378
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Mon 2015-02-23 12:57:42 +0100
message:
  Added bean def for CacheManifestAction
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2014-12-16 17:42:43 +
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2015-02-23 11:57:42 +
@@ -624,4 +624,6 @@
 
   
 
+  
+
 

___
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 2.18 upgrade - Event Capture and Resource table bugs

2015-02-23 Thread Lars Helge Øverland
Hi Fatema,


> 1. When i click on event capture and select Orgunite and select event
> program that time it shows
>  ERROR 2015-02-18 11:13:18,614 Error while executing action
> (ExceptionIntercept
> or.java [http-apr-8085-exec-10])
> java.lang.NullPointerException
> at
> org.hisp.dhis.appcache.CacheManifest.execute(CacheManifest.java:101)
>
>
This has been fixed now in 2.18. Download in 40 minutes.


> 2. When i click on create resource table that time shows error that are
> given bellow.
>
> ERROR: duplicate key value violates unique constraint
> "_dateperiodstructure_pkey
> "
>   Detail: Key (dateperiod)=(2009-12-31) already exists.; nested exception
> is org
> .postgresql.util.PSQLException: ERROR: duplicate key value violates unique
> const
> raint "_dateperiodstructure_pkey"
>   Detail: Key (dateperiod)=(2009-12-31) already exists.]
> (InMemoryNotifier.java
> [taskScheduler-3])
>

For this I need to have a closer look at your database. Are you able to
provide a login or dump without data privately?

regards,

Lars
___
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] Analytics table dimensions contain duplicates: ["uidlevel3", "uidlevel4"] DHIS2 v2.17

2015-02-23 Thread Lars Helge Øverland
Hi Calle,

yes we will look into it.

The meta-data importer does match against existing objects, first on uid,
then code, then name (if unique).

This problem is specific to category option combos, since option combos are
generated based on category options/combos and not created explicitly. What
could happen is that you have identical categories on another system, but
the generated option combos get different uids. We need to make a special
case for the the category option combos and compare equality on category
options + combo and not just uid/code.

The same goes for org unit levels. What could happen is that you have
create a level on another system with a matching numeric level but another
domain. That way you can end up with two org unit levels with the same
numeric level when importing. We need to make a special case during import
to check not just uid/code/name but also level.

regards,

Lars








On Mon, Feb 23, 2015 at 12:38 PM, Calle Hedberg 
wrote:

> Lars,
>
> We had a nearly identical issue with one of our database on Friday -
> importing one new orgunit from another databaseinstance resulted in
> duplicates in the orgunitlevel table, which in turn caused analytics to
> fail.
>
> The key design issue (I would not call it a bug, even if it appears like
> that) here is the data and meta-data import functionality in DHIS2 does not
> assist users to avoid such duplication by
> - identify potential duplicates by checking e.g. name or level or UID
> - display the potential duplicates to the user to enable her/him to modify
> or drop the conflicting records.
> This type of import checks have been in DHIS 1.4 for a long time.
>
> This design issue does not only affect the orgunitlevel table - it affects
> much more profoundly the whole categoryoptioncombo and attributeoptioncombo
> system, where it is very easy to end up with multiple versions of in
> reality the same categoryoptioncombo name (but each with it's own internal
> id and uid). That in turn causes havoc with e.g. indicators, because the
> indicator engine seemingly randomly picks the first of those duplicates it
> find. This issue has required many days of cleaning up in the back end for
> at least two country systems I've worked on recently (Namibia and Lesotho).
>
> Any chance we could have a round-table discussion on how to re-design the
> import processes to handle this better?
>
> Regards
> Calle
>
> On 23 February 2015 at 11:01, Lars Helge Øverland 
> wrote:
>
>> Hi Pierre,
>>
>> check the organisationunitlevel table and if the level column are
>> continuous and has no duplicates.
>>
>> select * from orgunitlevel order by level;
>>
>> regards,
>>
>> Lars
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19274
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Analytics table dimensions contain duplicates: ["uidlevel3", "uidlevel4"] DHIS2 v2.17

2015-02-23 Thread Calle Hedberg
In short, YES.

There is clearly still a need for a more sophisticated type of import,
though - where the user can SEE what is identified for import and if
required modify or drop specific things

Regards
Calle

On 23 February 2015 at 14:31, Lars Helge Øverland 
wrote:

>
> Hi Calle,
>
> yes we will look into it.
>
> The meta-data importer does match against existing objects, first on uid,
> then code, then name (if unique).
>
> This problem is specific to category option combos, since option combos
> are generated based on category options/combos and not created explicitly.
> What could happen is that you have identical categories on another system,
> but the generated option combos get different uids. We need to make a
> special case for the the category option combos and compare equality on
> category options + combo and not just uid/code.
>
> The same goes for org unit levels. What could happen is that you have
> create a level on another system with a matching numeric level but another
> domain. That way you can end up with two org unit levels with the same
> numeric level when importing. We need to make a special case during import
> to check not just uid/code/name but also level.
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
> On Mon, Feb 23, 2015 at 12:38 PM, Calle Hedberg 
> wrote:
>
>> Lars,
>>
>> We had a nearly identical issue with one of our database on Friday -
>> importing one new orgunit from another databaseinstance resulted in
>> duplicates in the orgunitlevel table, which in turn caused analytics to
>> fail.
>>
>> The key design issue (I would not call it a bug, even if it appears like
>> that) here is the data and meta-data import functionality in DHIS2 does not
>> assist users to avoid such duplication by
>> - identify potential duplicates by checking e.g. name or level or UID
>> - display the potential duplicates to the user to enable her/him to
>> modify or drop the conflicting records.
>> This type of import checks have been in DHIS 1.4 for a long time.
>>
>> This design issue does not only affect the orgunitlevel table - it
>> affects much more profoundly the whole categoryoptioncombo and
>> attributeoptioncombo system, where it is very easy to end up with multiple
>> versions of in reality the same categoryoptioncombo name (but each with
>> it's own internal id and uid). That in turn causes havoc with e.g.
>> indicators, because the indicator engine seemingly randomly picks the first
>> of those duplicates it find. This issue has required many days of cleaning
>> up in the back end for at least two country systems I've worked on recently
>> (Namibia and Lesotho).
>>
>> Any chance we could have a round-table discussion on how to re-design the
>> import processes to handle this better?
>>
>> Regards
>> Calle
>>
>> On 23 February 2015 at 11:01, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Pierre,
>>>
>>> check the organisationunitlevel table and if the level column are
>>> continuous and has no duplicates.
>>>
>>> select * from orgunitlevel order by level;
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>>
>> ***
>>
>> Calle Hedberg
>>
>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>
>> Tel/fax (home): +27-21-685-6472
>>
>> Cell: +27-82-853-5352
>>
>> Iridium SatPhone: +8816-315-19274
>>
>> Email: calle.hedb...@gmail.com
>>
>> Skype: calle_hedberg
>>
>> ***
>>
>>
>


-- 

***

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] Analytics table dimensions contain duplicates: ["uidlevel3", "uidlevel4"] DHIS2 v2.17

2015-02-23 Thread Calle Hedberg
Sorry, one more thing:

A more fundamental challenge relates to the whole cat/att-optioncombo
DESIGN for any particular database - DHIS2 enables anything with very
little guidance, and the net result can be very messy configurations with
multiple permutations of what is basically the same thing, like
(age,gender,NEW) and (gender,NEW,age) and (NEW,age, gender) combos for data
broken down on gender, age, and NEW/REPEAT (just to use a very
practical/actual example from Lesotho).

What that reflect is mainly lack of guidance materials (materials,
training) and lack of checks when creating new combos.

Will get back to it, for sure

Regards
calle

On 23 February 2015 at 14:52, Calle Hedberg  wrote:

> In short, YES.
>
> There is clearly still a need for a more sophisticated type of import,
> though - where the user can SEE what is identified for import and if
> required modify or drop specific things
>
> Regards
> Calle
>
> On 23 February 2015 at 14:31, Lars Helge Øverland 
> wrote:
>
>>
>> Hi Calle,
>>
>> yes we will look into it.
>>
>> The meta-data importer does match against existing objects, first on uid,
>> then code, then name (if unique).
>>
>> This problem is specific to category option combos, since option combos
>> are generated based on category options/combos and not created explicitly.
>> What could happen is that you have identical categories on another system,
>> but the generated option combos get different uids. We need to make a
>> special case for the the category option combos and compare equality on
>> category options + combo and not just uid/code.
>>
>> The same goes for org unit levels. What could happen is that you have
>> create a level on another system with a matching numeric level but another
>> domain. That way you can end up with two org unit levels with the same
>> numeric level when importing. We need to make a special case during import
>> to check not just uid/code/name but also level.
>>
>> regards,
>>
>> Lars
>>
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Feb 23, 2015 at 12:38 PM, Calle Hedberg 
>> wrote:
>>
>>> Lars,
>>>
>>> We had a nearly identical issue with one of our database on Friday -
>>> importing one new orgunit from another databaseinstance resulted in
>>> duplicates in the orgunitlevel table, which in turn caused analytics to
>>> fail.
>>>
>>> The key design issue (I would not call it a bug, even if it appears like
>>> that) here is the data and meta-data import functionality in DHIS2 does not
>>> assist users to avoid such duplication by
>>> - identify potential duplicates by checking e.g. name or level or UID
>>> - display the potential duplicates to the user to enable her/him to
>>> modify or drop the conflicting records.
>>> This type of import checks have been in DHIS 1.4 for a long time.
>>>
>>> This design issue does not only affect the orgunitlevel table - it
>>> affects much more profoundly the whole categoryoptioncombo and
>>> attributeoptioncombo system, where it is very easy to end up with multiple
>>> versions of in reality the same categoryoptioncombo name (but each with
>>> it's own internal id and uid). That in turn causes havoc with e.g.
>>> indicators, because the indicator engine seemingly randomly picks the first
>>> of those duplicates it find. This issue has required many days of cleaning
>>> up in the back end for at least two country systems I've worked on recently
>>> (Namibia and Lesotho).
>>>
>>> Any chance we could have a round-table discussion on how to re-design
>>> the import processes to handle this better?
>>>
>>> Regards
>>> Calle
>>>
>>> On 23 February 2015 at 11:01, Lars Helge Øverland 
>>> wrote:
>>>
 Hi Pierre,

 check the organisationunitlevel table and if the level column are
 continuous and has no duplicates.

 select * from orgunitlevel order by level;

 regards,

 Lars


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


>>>
>>>
>>> --
>>>
>>> ***
>>>
>>> Calle Hedberg
>>>
>>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>>
>>> Tel/fax (home): +27-21-685-6472
>>>
>>> Cell: +27-82-853-5352
>>>
>>> Iridium SatPhone: +8816-315-19274
>>>
>>> Email: calle.hedb...@gmail.com
>>>
>>> Skype: calle_hedberg
>>>
>>> ***
>>>
>>>
>>
>
>
> --
>
> ***
>
> 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
>
> ***
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-6

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18379: remove unused imports

2015-02-23 Thread noreply

revno: 18379
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2015-02-23 20:06:26 +0700
message:
  remove unused imports
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/QueryEngine.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Restriction.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Restrictions.java
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ObjectFilterService.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/query/QueryEngine.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/QueryEngine.java	2015-02-23 11:17:55 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/QueryEngine.java	2015-02-23 13:06:26 +
@@ -28,8 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.hisp.dhis.common.IdentifiableObject;
-
 import java.util.List;
 
 /**

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Restriction.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Restriction.java	2015-02-20 08:28:01 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Restriction.java	2015-02-23 13:06:26 +
@@ -29,10 +29,8 @@
  */
 
 import com.google.common.base.MoreObjects;
-import org.apache.commons.lang3.time.DateUtils;
 
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 
 /**

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Restrictions.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Restrictions.java	2015-02-20 08:28:01 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Restrictions.java	2015-02-23 13:06:26 +
@@ -28,10 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.apache.commons.lang3.time.DateUtils;
-
-import java.util.Date;
-
 /**
  * @author Morten Olav Hansen 
  */

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java	2015-02-20 09:31:37 +
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java	2015-02-23 13:06:26 +
@@ -38,8 +38,6 @@
 import org.hisp.dhis.hibernate.exception.CreateAccessDeniedException;
 import org.hisp.dhis.hibernate.exception.DeleteAccessDeniedException;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.query.Order;
-import org.hisp.dhis.schema.Property;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserGroup;
 import org.hisp.dhis.user.UserGroupAccess;

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ObjectFilterService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ObjectFilterService.java	2015-02-20 09:14:02 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/ObjectFilterService.java	2015-02-23 13:06:26 +
@@ -28,9 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.hisp.dhis.common.IdentifiableObject;
-import org.hisp.dhis.query.Query;
-
 import java.util.List;
 
 /**

___
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 2.18 upgrade - Event Capture and Resource table bugs

2015-02-23 Thread Ola Hodne Titlestad
On 23 February 2015 at 13:23, Lars Helge Øverland 
wrote:

> Hi Fatema,
>
>
>> 1. When i click on event capture and select Orgunite and select event
>> program that time it shows
>>  ERROR 2015-02-18 11:13:18,614 Error while executing action
>> (ExceptionIntercept
>> or.java [http-apr-8085-exec-10])
>> java.lang.NullPointerException
>> at
>> org.hisp.dhis.appcache.CacheManifest.execute(CacheManifest.java:101)
>>
>>
> This has been fixed now in 2.18. Download in 40 minutes.
>
>
>> 2. When i click on create resource table that time shows error that are
>> given bellow.
>>
>> ERROR: duplicate key value violates unique constraint
>> "_dateperiodstructure_pkey
>> "
>>   Detail: Key (dateperiod)=(2009-12-31) already exists.; nested exception
>> is org
>> .postgresql.util.PSQLException: ERROR: duplicate key value violates
>> unique const
>> raint "_dateperiodstructure_pkey"
>>   Detail: Key (dateperiod)=(2009-12-31) already exists.]
>> (InMemoryNotifier.java
>> [taskScheduler-3])
>>
>
>
This is caused by a server time zone issue and not the database. I had the
same problem in Gaza some weeks ago.
Morten said he would work on it. He said it had something to do with 1/2
hour time zones or something.

Fatema, a quick fix is to change the time zone of your server (I assume
this is your laptop) to something else (e.g. UTC) and run resource tables
again.

Ola




> For this I need to have a closer look at your database. Are you able to
> provide a login or dump without data privately?
>
> regards,
>
> Lars
>
>
___
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] Editing the code in the option sets

2015-02-23 Thread Jose Garcia Muñoz
Following with this thread...

I have tested changing the name of the option sets

We had the following option '4A03 - Meidy Mazariegos' in the 2.16, when we
upgrade to the 2.17 the name and the code of the option were filled both
with the same text '4A03 - Meidy Mazariegos'. However, we realized that
there were some mistakes in the data entry, so we need to change the text
of the option. As it is not possible to change the code right now, we had
to change just the name value (as showed in the next figure). So first
question, is it going to be possible to edit the code in the coming future?

[image: Inline image 1]

The next figure represents a data entry screen capture (please note
that in fact the value of the option appears updated)

[image: Inline image 3]

However, after running the analytics, in the event reports we are getting:

[image: Inline image 4]
So it is taking the code not the text. However, doesn't it make more sense
showing the text instead? (or least let the user choose?)

Any thoughts on this? This is quite urgent for us as we have many cases in
which we have to change the text of different options. Right now it seems
it is not possible to show those changes in the reports.

Many thanks
Jose


On Thu, Feb 19, 2015 at 1:06 PM, Jose Garcia Muñoz 
wrote:

>
> Hi guys,
>
> When update the DHIS2 version to 2.17, the new 'code' field in optionsets
> is filled with the value of the name. However,  we find out that sometimes
> the name was wrong introduced by the users, so we would need to change it.
> Right now we can not change the code for optionsets, do you have in mind to
> allow that? (we can certainly change the name, but it is going to be quite
> confused to have the code not synchronized with the name)
>
> In the event reports, the results are being filtered by its name (no with
> the code), right?
>
> Thank you
> Jose
>
___
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] Editing the code in the option sets

2015-02-23 Thread Juan Manuel Alcantara Acosta
Hi Jose
I tested this in DEV, where we have options that have a code that is different 
than the text. I changed the value of one option and checked the result in an 
event report, I kept getting the old text until I cleared the server cache.
Best regards,
JM

> El 23/02/2015, a las 17:31, Jose Garcia Muñoz  escribió:
> 
> 
> Following with this thread... 
> 
> I have tested changing the name of the option sets
> 
> We had the following option '4A03 - Meidy Mazariegos' in the 2.16, when we 
> upgrade to the 2.17 the name and the code of the option were filled both with 
> the same text '4A03 - Meidy Mazariegos'. However, we realized that there were 
> some mistakes in the data entry, so we need to change the text of the option. 
> As it is not possible to change the code right now, we had to change just the 
> name value (as showed in the next figure). So first question, is it going to 
> be possible to edit the code in the coming future?
> 
> 
> 
> The next figure represents a data entry screen capture (please note that 
> in fact the value of the option appears updated)
> 
> 
> 
> However, after running the analytics, in the event reports we are getting:
> 
> 
> So it is taking the code not the text. However, doesn't it make more sense 
> showing the text instead? (or least let the user choose?)
> 
> Any thoughts on this? This is quite urgent for us as we have many cases in 
> which we have to change the text of different options. Right now it seems it 
> is not possible to show those changes in the reports.
> 
> Many thanks
> Jose
> 
> 
> On Thu, Feb 19, 2015 at 1:06 PM, Jose Garcia Muñoz  > wrote:
> 
> Hi guys,
> 
> When update the DHIS2 version to 2.17, the new 'code' field in optionsets is 
> filled with the value of the name. However,  we find out that sometimes the 
> name was wrong introduced by the users, so we would need to change it. Right 
> now we can not change the code for optionsets, do you have in mind to allow 
> that? (we can certainly change the name, but it is going to be quite confused 
> to have the code not synchronized with the name)
> 
> In the event reports, the results are being filtered by its name (no with the 
> code), right?
> 
> Thank you
> Jose
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp

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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18380: removed realObject hack on TEIController, expands relative in relationship (for one level)

2015-02-23 Thread noreply

revno: 18380
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2015-02-24 10:57:26 +0700
message:
  removed realObject hack on TEIController, expands relative in relationship 
(for one level)
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/Relationship.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/TrackedEntityInstanceService.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityInstanceController.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java	2015-02-20 12:35:55 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java	2015-02-24 03:57:26 +
@@ -109,6 +109,12 @@
 @Override
 public TrackedEntityInstance getTrackedEntityInstance( org.hisp.dhis.trackedentity.TrackedEntityInstance entityInstance )
 {
+return getTrackedEntityInstance( entityInstance, true );
+}
+
+@Override
+public TrackedEntityInstance getTrackedEntityInstance( org.hisp.dhis.trackedentity.TrackedEntityInstance entityInstance, boolean expandRelative )
+{
 if ( entityInstance == null )
 {
 return null;
@@ -132,6 +138,19 @@
 
 relationship.setRelationship( entityRelationship.getRelationshipType().getUid() );
 
+if ( expandRelative )
+{
+// we might have cases where A <=> A, so we only include the relative if the UIDs do not match
+if ( !entityRelationship.getEntityInstanceA().getUid().equals( entityInstance.getUid() ) )
+{
+relationship.setRelative( getTrackedEntityInstance( entityRelationship.getEntityInstanceA(), false ) );
+}
+else if ( !entityRelationship.getEntityInstanceB().getUid().equals( entityInstance.getUid() ) )
+{
+relationship.setRelative( getTrackedEntityInstance( entityRelationship.getEntityInstanceB(), false ) );
+}
+}
+
 trackedEntityInstance.getRelationships().add( relationship );
 }
 

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/Relationship.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/Relationship.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/Relationship.java	2015-02-24 03:57:26 +
@@ -31,8 +31,11 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import com.google.common.base.MoreObjects;
 import org.hisp.dhis.common.DxfNamespaces;
 
+import java.util.Objects;
+
 /**
  * @author Morten Olav Hansen 
  */
@@ -42,11 +45,13 @@
 private String displayName;
 
 private String trackedEntityInstanceA;
-
+
 private String trackedEntityInstanceB;
 
 private String relationship;
 
+private TrackedEntityInstance relative;
+
 public Relationship()
 {
 }
@@ -74,7 +79,7 @@
 {
 this.trackedEntityInstanceA = trackedEntityInstanceA;
 }
-
+
 @JsonProperty
 @JacksonXmlProperty( isAttribute = true )
 public String getTrackedEntityInstanceB()
@@ -99,42 +104,51 @@
 this.relationship = relationship;
 }
 
-@Override
-public boolean equals( Object o )
-{
-if ( this == o ) return true;
-if ( o == null || getClass() != o.getClass() ) return false;
-
-Relationship that = (Relationship) o;
-
-if ( displayName != null ? !displayName.equals( that.displayName ) : that.displayName != null ) return false;
-if ( trackedEntityInstanceA != null ? !trackedEntityInstanceA.equals( that.trackedEntityInstanceA ) : that.trackedEntityInstanceA != null )
-return false;
-if ( trackedEntityInstanceB != null ? !trackedEntityInstanceB.equals( that.trackedEntityInstanceB ) : that.trackedEntityInstanceB != null )
-return fa

Re: [Dhis2-devs] [Dhis2-users] Aggregation query builder

2015-02-23 Thread channara rin
Hi Tran,
if like this seem sound, but when i create New aggregate query builder, it
require select "Data set" and then choose data element, And my DHIS2 system
is each Dataset has different organisation unit. because each dataset has
some is the same data element and some is different data element.

On Mon, Feb 23, 2015 at 6:03 PM, Tran Chau (HISP Vietnam) <
tran.hispviet...@gmail.com> wrote:

> Hi Channara,
>
> No, we cannot define aggregation query builder for the same data element
> with different organisation units.
> Organisation unit is not required in one aggregate query builder formula.
>
> When these formulas is run automatically, the system will get tracker data
> from orgunits and generate aggregate data for each orgunit.
>
> Besides, we can run the aggregation query builder formulas by manually.
> For this functionality, we can choose orgunits where we need to generate
> aggregate data. Go to *Individual Records > Manual aggregation* to see
> this function.
>
> ...
> Best regards,
> Tran Chau.
>
>
>
>
> On Mon, Feb 23, 2015 at 5:00 PM, channara rin 
> wrote:
>
>> seem another data element is OK, but why only that data element meet
>> error? s.th wrong with it?
>>
>> any one tell me?
>>
>> Thank you
>> Channara
>>
>> On Mon, Feb 23, 2015 at 4:53 PM, channara rin 
>> wrote:
>>
>>> I did like that, but wonder has error. Let me try another data element
>>> first, i will inform you soon...
>>>
>>> Thank you
>>> Channara
>>>
>>> On Mon, Feb 23, 2015 at 4:48 PM, Emma Kassy  wrote:
>>>
 Hi Channara,
 The data element should be assigned to a different data set.
 In other wards, you can have the same data element but in different
 data sets. That way you will not have an error.

 On Mon, Feb 23, 2015 at 8:13 AM, channara rin 
 wrote:

> Hi all DHIS2,
> I wonder can i make aggregation query builder for the same data
> element but in different organisation unit?
>
> When i did, i go the error?
> [image: Inline image 1]
>
> ___
> 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
>
>


 --
 Thank you and Kind Regards
 *Immarcqulate. A (Emma Kassy) *

 *"You miss 100% of the shots you don't take."*

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


Re: [Dhis2-devs] [Dhis2-users] Aggregation query builder

2015-02-23 Thread Tran Chau (HISP Vietnam)
Hi Channara,

Tracker Aggregation formula is for generating Data Elemment data.
It is not 'Data Set' specific.  It generates the Data Element value for all
Data Sets that the Data Element belong to.
On interface, there is 'Data Set' selector before selecting the Data
Element.
This does not limit the Data Set that we are going to generate the Data
Element value.
It is only used for searching/selecting the Data Element, regardless of the
Data Set we are going to generate the value.
We know that it is confusing, because there is Data Set selector before
Data Element selection.  I will discuss with DHIS for doing something about
this in future.

For your case, I would suggest creating two (or more) different data
elements if you want different formula for same data element.  Would this
solve your issue?
If not, could you explain to me the detail of different formula you are
trying to apply to different org unit?
So that I understand what you are trying to do and assist you on it.


Best regards,
Tran Chau

On Tue, Feb 24, 2015 at 12:04 PM, channara rin 
wrote:

> Hi Tran,
> if like this seem sound, but when i create New aggregate query builder, it
> require select "Data set" and then choose data element, And my DHIS2 system
> is each Dataset has different organisation unit. because each dataset has
> some is the same data element and some is different data element.
>
> On Mon, Feb 23, 2015 at 6:03 PM, Tran Chau (HISP Vietnam) <
> tran.hispviet...@gmail.com> wrote:
>
>> Hi Channara,
>>
>> No, we cannot define aggregation query builder for the same data element
>> with different organisation units.
>> Organisation unit is not required in one aggregate query builder formula.
>>
>> When these formulas is run automatically, the system will get tracker
>> data from orgunits and generate aggregate data for each orgunit.
>>
>> Besides, we can run the aggregation query builder formulas by manually.
>> For this functionality, we can choose orgunits where we need to generate
>> aggregate data. Go to *Individual Records > Manual aggregation* to see
>> this function.
>>
>> ...
>> Best regards,
>> Tran Chau.
>>
>>
>>
>>
>> On Mon, Feb 23, 2015 at 5:00 PM, channara rin 
>> wrote:
>>
>>> seem another data element is OK, but why only that data element meet
>>> error? s.th wrong with it?
>>>
>>> any one tell me?
>>>
>>> Thank you
>>> Channara
>>>
>>> On Mon, Feb 23, 2015 at 4:53 PM, channara rin 
>>> wrote:
>>>
 I did like that, but wonder has error. Let me try another data element
 first, i will inform you soon...

 Thank you
 Channara

 On Mon, Feb 23, 2015 at 4:48 PM, Emma Kassy  wrote:

> Hi Channara,
> The data element should be assigned to a different data set.
> In other wards, you can have the same data element but in different
> data sets. That way you will not have an error.
>
> On Mon, Feb 23, 2015 at 8:13 AM, channara rin 
> wrote:
>
>> Hi all DHIS2,
>> I wonder can i make aggregation query builder for the same data
>> element but in different organisation unit?
>>
>> When i did, i go the error?
>> [image: Inline image 1]
>>
>> ___
>> 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
>>
>>
>
>
> --
> Thank you and Kind Regards
> *Immarcqulate. A (Emma Kassy) *
>
> *"You miss 100% of the shots you don't take."*
>


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