Re: [Dhis2-devs] Possible bug with event data capture without the 'ALL' authority?

2016-11-10 Thread Abyot Asalefew Gizaw
Hi,

The required authority to save event is either
*F_TRACKED_ENTITY_DATAVALUE_ADD* which is (Add/Update Tracked Entity Data
Value)  or *ALL*.

--
Abyot A. Gizaw.
Senior Engineer, DHIS2
University of Oslo
http://www.dhis2.org

On Fri, Nov 11, 2016 at 12:19 AM, Sam Johnson 
wrote:

> Hi all, am just-resending this, as it doesn’t seem to have got through to
> the mailing list (apologies if I end up double-posting).
>
>
>
> In my 2.25 instance, I’m running into problems when a user without the
> ‘ALL’ authority attempts to save an event-without-registration: it caches
> the data values, but doesn’t save them into the database.
>
>
>
> I’m using 2.25, revision 221c5d8 (Wed morning), Chrome 54.0.2840.71
> (64-bit),
>
>
>
> Specifically:
>
> · I can successfully open EventCapture, register a new event, and
> start capturing data.
>
> · However, when I save, a programStageInstance is created in the
> database, but no records are saved to the trackedEntityDataValues table.
>
> · Re-opening the event at first displays the data that was
> entered (but if the cache is cleared, it will appear empty, since no data
> has in fact been saved).
>
> · If the browser is refreshed before clearing the cache, the
> message “There is data stored locally, please upload to server” appears,
> even though I’m online.
>
> · Clicking ‘Update’ starts the upload to server, but it never
> completes (the logs show a single entry:
> * INFO  2016-11-10 13:38:14,583 Import done: 00:00:00.000 (Clock.java
> [http-bio-8080-exec-7])
>
> · After clearing the cache, if the event is opened and fresh data
> entered, it sometimes updates the existing event, and sometimes creates a
> duplicate event on the same date; in both cases, the data is just cached,
> and although two events still appear if the cache is cleared, they are both
> empty again.
>
>
>
> I don’t think this relates to a specific authority, as I’ve tried it with:
>
> · a role with just selected EventCapture authorities
>
> · a role with *every* authority except ‘ALL’
>
> · a role with the ‘ALL’ authority.
>
> Users with the ‘ALL’ role can successfully capture data, the other two run
> into this issue.
>
>
>
> I also don’t think it relates to sharing, as I’ve opened up data element
> and program sharing to rw-- for the relevant User Group.  (The program
> contains only yes/no data elements, so there are no Option Sets to share.)
>
>
>
> Is there some other aspect of sharing/authorities I’ve missed?  (The
> documentation includes an authority for ‘Single Event Without Registration
> Data Entry’ / ‘F_ANONYMOUS_DATA_ENTRY’, but that’s not available via the
> UI, and I’m guessing it doesn’t really exist any longer?)
>
>
>
> Or is there perhaps a bug in part of the persistence process, which
> requires ‘ALL’ permissions?  I’m wondering if this bug might have been
> introduced into 2.25 by a recent update, as I’m pretty sure I successfully
> captured events using this user/role a week or two ago…
>
>
>
> I have a project that’s completely stuck on this, so very grateful for any
> enlightenment anyone can provide…
>
>
>
> Cheers, Sam.
>
>
>
>
>
> ___
> 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] Org. unit tree is not open with org. units selected (datasets, orgunit groups, etc.)

2016-11-10 Thread Jose Garcia Muñoz
Thanks Lars,

Waiting for your news then :).

Best regards

On Fri, Nov 4, 2016 at 10:48 AM, Lars Helge Øverland  wrote:

> Hi Jose,
>
> thanks, yup we are working on this and I understand the inconvenience.
>
> Many of the devs are out this week, and so I cannot promise this in the
> next days, but will keep you posted.
>
> best regards,
>
> Lars
>
> On Thu, Nov 3, 2016 at 12:07 PM, Jose Garcia Muñoz 
> wrote:
>
>>
>> Hi devs,
>>
>> I believe we have already talked about this... So right now, it is
>> difficult to know the org. units that are selected for a particular
>> dataset/org. unit group/etc (see attached image).
>>
>> I think you are going to change the behaviour of this... Is this
>> something we could have in the following days? (it is a bit complicated to
>> manage when you have more than 40.000 org. units in the system :) ).
>>
>> It will be nice to have this fix for 2.24 and 2.25.
>>
>> Thanks
>> Jose
>>
>> [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
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> 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] Average (sum in org unit hierarchy) not working in 2.24 and 2.25?

2016-11-10 Thread Jose Garcia Muñoz
More info about this...

We only have data for October 2016 (20), and September 2016 (4). If I
select periods as a filter, this is what happens:

1) Last month. The value should be 20!!

[image: Inline image 1]

2) Last 3 months, last 6 months, and last 12 months, gives 24.7. It
calculates the sum (with the strange 0.7), no the average.

[image: Inline image 2]

3) This Quarter (approx, the real result should be 6.666)

[image: Inline image 3]

4) Last Quarter (correct!)

[image: Inline image 4]


5) This six-month (approx, the result should be 4. Don't understand why the
addition of 0.1 as the results of divisions are integers)

[image: Inline image 5]

6) This year (correct!)

[image: Inline image 6]


Will be great to have your feedback, as this is very urgent for us! :) . It
seems it works well (but with some rounding problems) when the periods
selected in the analytics are quartes, six-months, years, etc. but no for
months (that calculates the total).

Many thanks
Jose

On Tue, Nov 8, 2016 at 2:19 PM, Jose Garcia Muñoz 
wrote:

>
> Dear devs,
>
> I have the 'test' dataelement which its Agregation type is 'Average (sum
> in org unit hierarchy)', however it doesn't seem to calculate the average
> for periods. For example
>
> [image: Inline image 1]
>
> if a select the period as filter I suppose I should get 12 right? However,
> what I get is:
>
> [image: Inline image 2]
>
> 24.7 that I don't understand. Am I doing something wrong? Is it a bug?
> This is very urgent for us. If it is a bug, we would need a fix for both,
> 2.24 and 2.25. Would that be possible?
>
> Sum accross org. unit tree seems to be ok
>
> Thanks much
> 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] FW: Bug in XML export / import for Program Rules

2016-11-10 Thread Morten Olav Hansen
Hm ok, thanks Sam, I will look into it (it should have been encoded
automatically)

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Fri, Nov 11, 2016 at 6:15 AM, Sam Johnson 
wrote:

> Hi all,
>
>
>
> Using 2.25, revision 221c5d8 (Wed morning), Chrome
>
>
>
> I just wanted to report a bug in the XML export / import for Program Rules:
>
> · When you export XML for a program rule, ‘&&’ operators are kept
> as plain-text in the XML that is exported.
>
> · When you re-import this XML, it crashes with the following log:
> Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
> character '&' (code 38) (expected a name start character)
>
> If converted to character codes (‘& &’) they import fine, so I’m
> guessing the export routine just needs to be updated to convert them on
> export.
>
>
>
> This is a blocker because the ‘and’ variant doesn’t seem to work for
> Program Rules (they fail to fire), so you are tied to using ‘&&’ in
> expressions.
>
>
>
> Cheers, Sam.
>
>
>
> ___
> 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] Possible bug with event data capture without the 'ALL' authority?

2016-11-10 Thread Sam Johnson
Hi all, am just-resending this, as it doesn’t seem to have got through to the 
mailing list (apologies if I end up double-posting).

In my 2.25 instance, I’m running into problems when a user without the ‘ALL’ 
authority attempts to save an event-without-registration: it caches the data 
values, but doesn’t save them into the database.

I’m using 2.25, revision 221c5d8 (Wed morning), Chrome 54.0.2840.71 (64-bit),

Specifically:

· I can successfully open EventCapture, register a new event, and start 
capturing data.

· However, when I save, a programStageInstance is created in the 
database, but no records are saved to the trackedEntityDataValues table.

· Re-opening the event at first displays the data that was entered (but 
if the cache is cleared, it will appear empty, since no data has in fact been 
saved).

· If the browser is refreshed before clearing the cache, the message 
“There is data stored locally, please upload to server” appears, even though 
I’m online.

· Clicking ‘Update’ starts the upload to server, but it never completes 
(the logs show a single entry:
* INFO  2016-11-10 13:38:14,583 Import done: 00:00:00.000 (Clock.java 
[http-bio-8080-exec-7])

· After clearing the cache, if the event is opened and fresh data 
entered, it sometimes updates the existing event, and sometimes creates a 
duplicate event on the same date; in both cases, the data is just cached, and 
although two events still appear if the cache is cleared, they are both empty 
again.

I don’t think this relates to a specific authority, as I’ve tried it with:

· a role with just selected EventCapture authorities

· a role with every authority except ‘ALL’

· a role with the ‘ALL’ authority.
Users with the ‘ALL’ role can successfully capture data, the other two run into 
this issue.

I also don’t think it relates to sharing, as I’ve opened up data element and 
program sharing to rw-- for the relevant User Group.  (The program contains 
only yes/no data elements, so there are no Option Sets to share.)

Is there some other aspect of sharing/authorities I’ve missed?  (The 
documentation includes an authority for ‘Single Event Without Registration Data 
Entry’ / ‘F_ANONYMOUS_DATA_ENTRY’, but that’s not available via the UI, and I’m 
guessing it doesn’t really exist any longer?)

Or is there perhaps a bug in part of the persistence process, which requires 
‘ALL’ permissions?  I’m wondering if this bug might have been introduced into 
2.25 by a recent update, as I’m pretty sure I successfully captured events 
using this user/role a week or two ago…

I have a project that’s completely stuck on this, so very grateful for any 
enlightenment anyone can provide…

Cheers, Sam.


___
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] FW: Bug in XML export / import for Program Rules

2016-11-10 Thread Sam Johnson
Hi all,

Using 2.25, revision 221c5d8 (Wed morning), Chrome

I just wanted to report a bug in the XML export / import for Program Rules:

· When you export XML for a program rule, ‘&&’ operators are kept as 
plain-text in the XML that is exported.

· When you re-import this XML, it crashes with the following log:
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 
'&' (code 38) (expected a name start character)
If converted to character codes (‘& &’) they import fine, so I’m 
guessing the export routine just needs to be updated to convert them on export.

This is a blocker because the ‘and’ variant doesn’t seem to work for Program 
Rules (they fail to fire), so you are tied to using ‘&&’ in expressions.

Cheers, Sam.

___
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] Play demo password

2016-11-10 Thread Sam Johnson
Hi all,

Re: Victor’s note about being locked out of the demo server, this sort of 
lock-out has happened a few times recently.  Would it perhaps be worth setting 
up a chron job that runs every five minutes to update the ‘admin’ user password 
back to ‘district’ if it has changed?

Cheers, Sam.


From: Dhis2-devs 
 on behalf of 
Victor Garcia 
Date: Thursday, 10 November 2016 at 09:05
To: DHIS2 Developers 
Subject: [Dhis2-devs] Program rule actions of type ASSIGN not working on 
SCHEDULED events

Hi all,

we have noticed a buggy behavior when using program rule actions of type ASSIGN 
in scheduled events. The program rule is correctly evaluated, but the program 
rule action does not assign the desired value to the dataelement in that event. 
This happens only when the event is created using the visit scheduler. If the 
event is created using the "Add new event" button the program rule action works 
fine.

The steps to reproduce the issue:
1. Create a programRuleVariable of type "DATAELEMENT_CURRENT_EVENT" with the 
dataelement we want to copy.
2. Create a programRule limited to that programStage.
3. Assign a programRuleAction of type ASSIGN, with the previously crated 
programRuleVariable as the "data" and a dataelement as the target.

I couldn't access demo server to reproduce the issue (it seems that admin 
password has been changed), but I did in dev server and created an example that 
you can easily verify until it is reset tonight. It is in the program "WHO 
RMNCH Tracker", in the stage "Postpartum care visit". I added a new dataelement 
called "Copy HIV test result" just below "HIV test result" that copies its 
value. You can verify that if the stage is created using the "Add event button" 
the value is correctly copied; but it the stage is added using the visit 
scheduler, the value is not copied.

If there is doubt please let me know.

Thank you!

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


Re: [Dhis2-devs] DataElements don't appear ordered in the Event Capture Android App

2016-11-10 Thread Araz Abishov
Dear Jose,

- It seems that all dataelements are being displayed following no order
We are already aware of this issue and planning to release fix this week.

- Would you say that the last android versions are stable enough for using
them against 2.25?
EventCapture is relatively stable now, however it still lacks some features
of old event capture like support of indicators and some of the program
rules. In other words, it depends what you need for your use case.

If you have any other questions, do not hesitate to ask. Your feedback on
the new app is also highly appreciated.

Best regards,

—
Araz Abishov,
Android developer, DHIS 2
University of Oslo
https://www.dhis2.org/

On November 9, 2016 at 6:04:09 AM, Jose Garcia Muñoz (josem...@gmail.com)
wrote:


Dear devs, Araz,

I'm doing some tests with the 0.5.6 release for Android Event Capture
pulling metadata from a 2.25 server. It seems that all dataelements are
being displayed following no order, or at least they are not appearing in
the same order defined in the programstage. Would this be a bug?

Also, we are planning to move some countries to 2.25 in the next weeks,
some of them are using android for data collection. Would you say that the
last android versions are stable enough for using them against 2.25? (I'm
mainly interested in Event Capture android app).

Please let me know as we need to make a decission about using 2.25 or not...

Thanks
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] 2.25 HighCharts Plugins

2016-11-10 Thread Vanya Seth
Oops sorry!! Yeah you are right  :)

perfect thanks :)

Regards
Vanya

On Thu, Nov 10, 2016 at 4:42 PM, Jan Henrik Øverland  wrote:

> Well, there is no need to use highcharts for pivot tables :-)
>
> But the current status for the plugins is that
>
> - pivot tables and charts (aggregate) have been improved in 2.25
>
> - event reports and event charts are currently receiving the same refactor
> and will be ready for 2.26
>
> On 10 November 2016 at 12:01, Vanya Seth  wrote:
>
>> I hope that the new highchart based plugins are available for all 4 types
>> of objects (Charts, Pivot Tables, Event Reports and Event Charts ) ?
>>
>> Regards
>> Vanya
>>
>> On Thu, Nov 10, 2016 at 4:22 PM, Jan Henrik Øverland 
>> wrote:
>>
>>> Hi Vanya,
>>>
>>> I recommend the new chart plugin based on Highcharts over the old one.
>>> Due to both looks and performance.
>>>
>>> Will try to write up the documentation as soon as possible, but apart
>>> from the instructions you read in the other email it works the same way.
>>>
>>> Jan
>>>
>>> On 10 November 2016 at 06:28, Vanya Seth 
>>> wrote:
>>>
 Hi Jan

 Hope you are doing well.

 Going through one of the emails in the mailing list I noticed that the
 highcarts based plugins for visualization objects are now available.

 I have two questions here:
 - The level of maturity of these plugins as compared to the ExtJs ones.
 - The level of documentation of these plugins. (For ExtJs ones we had
 to investigate a lot because of lack of documentation).

 It would be good to know your thoughts about this. As of now we are
 leveraging the ExtJs based plugins to render the visualization objects.

 --
 With Regards
 Vanya
 ThoughtWorks Technologies
 Hyderabad

 --Stay Hungry Stay Foolish!!

>>>
>>>
>>>
>>> --
>>> Jan Henrik Øverland
>>> Software developer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org 
>>>
>>
>>
>>
>> --
>> With Regards
>> ThoughtWorks Technologies
>> Hyderabad
>>
>> --Stay Hungry Stay Foolish!!
>>
>
>
>
> --
> Jan Henrik Øverland
> Software developer, DHIS 2
> University of Oslo
> http://www.dhis2.org 
>



-- 
With Regards
ThoughtWorks Technologies
Hyderabad

--Stay Hungry Stay Foolish!!
___
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] 2.25 HighCharts Plugins

2016-11-10 Thread Vanya Seth
I hope that the new highchart based plugins are available for all 4 types
of objects (Charts, Pivot Tables, Event Reports and Event Charts ) ?

Regards
Vanya

On Thu, Nov 10, 2016 at 4:22 PM, Jan Henrik Øverland  wrote:

> Hi Vanya,
>
> I recommend the new chart plugin based on Highcharts over the old one. Due
> to both looks and performance.
>
> Will try to write up the documentation as soon as possible, but apart from
> the instructions you read in the other email it works the same way.
>
> Jan
>
> On 10 November 2016 at 06:28, Vanya Seth  wrote:
>
>> Hi Jan
>>
>> Hope you are doing well.
>>
>> Going through one of the emails in the mailing list I noticed that the
>> highcarts based plugins for visualization objects are now available.
>>
>> I have two questions here:
>> - The level of maturity of these plugins as compared to the ExtJs ones.
>> - The level of documentation of these plugins. (For ExtJs ones we had to
>> investigate a lot because of lack of documentation).
>>
>> It would be good to know your thoughts about this. As of now we are
>> leveraging the ExtJs based plugins to render the visualization objects.
>>
>> --
>> With Regards
>> Vanya
>> ThoughtWorks Technologies
>> Hyderabad
>>
>> --Stay Hungry Stay Foolish!!
>>
>
>
>
> --
> Jan Henrik Øverland
> Software developer, DHIS 2
> University of Oslo
> http://www.dhis2.org 
>



-- 
With Regards
ThoughtWorks Technologies
Hyderabad

--Stay Hungry Stay Foolish!!
___
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] [issue] Metadata Import fails when modifying a tracker program and tracker program stage

2016-11-10 Thread Morten Olav Hansen
Hm ok, that's basically what I did.. but I will test again tomorrow

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Thu, Nov 10, 2016 at 4:40 PM, Archana Chillala  wrote:

> Hi Morten,
>
> Here are the steps to reproduce:
> 1) Create a program "with registration".
> 2) Create a program Stage within it.
> 3) Export and Import this metadata into another instance.
> 4) Import is successful
> 5) Now, modify some property of the Program in the first instance (e.g:
> name, description etc)
> 6) Export and Import (i.e Sync metadata)
> 7) Import Fails with the error mentioned in the logs attached in previous
> mail.
>
> P.S. We're using DHIS version 2.25 build 1ce40ae.
>
>
>
> *Cheers,*
>
> Archana Chillala
> Application Developer
> Email archa...@thoughtworks.com
> Telephone +91 9100960533 <+91+9100960533>
> [image: ThoughtWorks]
> 
>
> On Thu, Nov 10, 2016 at 11:47 AM, Morten Olav Hansen 
> wrote:
>
>> Hi Archana
>>
>> I'm not able to reproduce this issue. Could you provide a bit more info?
>> steps to reproduce.
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Thu, Nov 10, 2016 at 12:52 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Hi Archana
>>>
>>> Ok, looking into it now..
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Thu, Nov 10, 2016 at 12:39 PM, Archana Chillala <
>>> archa...@thoughtworks.com> wrote:
>>>
 Hi Morten,

 Thanks for the fix. We're now able to import *Program Stage *of a
 Tracker program after modifying it.

 But, the issue still exists while importing a modified *Tracker
 program.*

 Please find the log trace attached herewith.


 *Cheers,*

 Archana Chillala
 Application Developer
 Email archa...@thoughtworks.com
 Telephone +91 9100960533 <+91+9100960533>
 [image: ThoughtWorks]
 

 On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen 
 wrote:

> This should be fixed in latest 225/master (2.24 was not affected)
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen 
> wrote:
>
>> Hi Archana
>>
>> I'm looking into this now.
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Fri, Nov 4, 2016 at 4:07 PM, Archana Chillala <
>> archa...@thoughtworks.com> wrote:
>>
>>> Hi,
>>>
>>> We are using the latest version of DHIS 2.25 (build - 5e16867). We
>>> have two instances of DHIS and are trying to sync metadata from one
>>> instance to the other. Sync is failing for the following cases.
>>>
>>>
>>> *Modifying a Tracker program (i.e. program “with registration”)  *
>>>
>>> * INFO  2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type
>>> ProgramTrackedEntityAttribute (DefaultObjectBundleService.java
>>> [http-bio-8080-exec-7])
>>> * *WARN  2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505
>>> (SqlExceptionHelper.java [http-bio-8080-exec-7])*
>>> ** ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates
>>> unique constraint "programtrackedentityattribute_unique_key"*
>>> *  Detail: Key (programid, trackedentityattributeid)=(80, 74)
>>> already exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])*
>>> ** ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to
>>> import the metadata. could not execute statement
>>> (MetadataSyncImportHandler.java [http-bio-8080-exec-7])*
>>> *org.hibernate.exception.ConstraintViolationException: could not
>>> execute statement*
>>> at org.hibernate.exception.internal.SQLStateConversionDelegate.
>>> convert(SQLStateConversionDelegate.java:112)
>>> at org.hibernate.exception.internal.StandardSQLExceptionConvert
>>> er.convert(StandardSQLExceptionConverter.java:42)
>>> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(Sql
>>> ExceptionHelper.java:111)
>>> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(Sql
>>> ExceptionHelper.java:97)
>>> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.execu
>>> teUpdate(ResultSetReturnImpl.java:207)
>>> at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.ad
>>> dToBatch(NonBatchingBatch.java:45)
>>> at org.hibernate.persister.entity.AbstractEntityPersister.inser
>>> t(AbstractEntityPersister.java:2921)
>>> at org.hibernate.persis

Re: [Dhis2-devs] [issue] Metadata Import fails when modifying a tracker program and tracker program stage

2016-11-10 Thread Archana Chillala
Hi Morten,

Here are the steps to reproduce:
1) Create a program "with registration".
2) Create a program Stage within it.
3) Export and Import this metadata into another instance.
4) Import is successful
5) Now, modify some property of the Program in the first instance (e.g:
name, description etc)
6) Export and Import (i.e Sync metadata)
7) Import Fails with the error mentioned in the logs attached in previous
mail.

P.S. We're using DHIS version 2.25 build 1ce40ae.



*Cheers,*

Archana Chillala
Application Developer
Email archa...@thoughtworks.com
Telephone +91 9100960533 <+91+9100960533>
[image: ThoughtWorks]


On Thu, Nov 10, 2016 at 11:47 AM, Morten Olav Hansen 
wrote:

> Hi Archana
>
> I'm not able to reproduce this issue. Could you provide a bit more info?
> steps to reproduce.
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Nov 10, 2016 at 12:52 PM, Morten Olav Hansen 
> wrote:
>
>> Hi Archana
>>
>> Ok, looking into it now..
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Thu, Nov 10, 2016 at 12:39 PM, Archana Chillala <
>> archa...@thoughtworks.com> wrote:
>>
>>> Hi Morten,
>>>
>>> Thanks for the fix. We're now able to import *Program Stage *of a
>>> Tracker program after modifying it.
>>>
>>> But, the issue still exists while importing a modified *Tracker
>>> program.*
>>>
>>> Please find the log trace attached herewith.
>>>
>>>
>>> *Cheers,*
>>>
>>> Archana Chillala
>>> Application Developer
>>> Email archa...@thoughtworks.com
>>> Telephone +91 9100960533 <+91+9100960533>
>>> [image: ThoughtWorks]
>>> 
>>>
>>> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen 
>>> wrote:
>>>
 This should be fixed in latest 225/master (2.24 was not affected)

 --
 Morten Olav Hansen
 Senior Engineer, DHIS 2
 University of Oslo
 http://www.dhis2.org

 On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen 
 wrote:

> Hi Archana
>
> I'm looking into this now.
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Fri, Nov 4, 2016 at 4:07 PM, Archana Chillala <
> archa...@thoughtworks.com> wrote:
>
>> Hi,
>>
>> We are using the latest version of DHIS 2.25 (build - 5e16867). We
>> have two instances of DHIS and are trying to sync metadata from one
>> instance to the other. Sync is failing for the following cases.
>>
>>
>> *Modifying a Tracker program (i.e. program “with registration”)  *
>>
>> * INFO  2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type
>> ProgramTrackedEntityAttribute (DefaultObjectBundleService.java
>> [http-bio-8080-exec-7])
>> * *WARN  2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505
>> (SqlExceptionHelper.java [http-bio-8080-exec-7])*
>> ** ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates
>> unique constraint "programtrackedentityattribute_unique_key"*
>> *  Detail: Key (programid, trackedentityattributeid)=(80, 74) already
>> exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])*
>> ** ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to
>> import the metadata. could not execute statement
>> (MetadataSyncImportHandler.java [http-bio-8080-exec-7])*
>> *org.hibernate.exception.ConstraintViolationException: could not
>> execute statement*
>> at org.hibernate.exception.internal.SQLStateConversionDelegate.
>> convert(SQLStateConversionDelegate.java:112)
>> at org.hibernate.exception.internal.StandardSQLExceptionConvert
>> er.convert(StandardSQLExceptionConverter.java:42)
>> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(Sql
>> ExceptionHelper.java:111)
>> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(Sql
>> ExceptionHelper.java:97)
>> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.execu
>> teUpdate(ResultSetReturnImpl.java:207)
>> at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.ad
>> dToBatch(NonBatchingBatch.java:45)
>> at org.hibernate.persister.entity.AbstractEntityPersister.inser
>> t(AbstractEntityPersister.java:2921)
>> at org.hibernate.persister.entity.AbstractEntityPersister.inser
>> t(AbstractEntityPersister.java:3421)
>> at org.hibernate.action.internal.EntityInsertAction.execute(Ent
>> ityInsertAction.java:89)
>> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQu
>> eue.java:560)
>> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQu
>> eue.java:434)
>>

Re: [Dhis2-devs] Unable to create resource of type "File"

2016-11-10 Thread Archana Chillala
Hi Jason,

It works. Thanks. It's to do with permissions.

Archana Chillala
Application Developer
Email archa...@thoughtworks.com
Telephone +91 9100960533 <+91+9100960533>
[image: ThoughtWorks]


On Tue, Nov 8, 2016 at 5:44 PM, Archana Chillala 
wrote:

> Okay. Got it. Will check that.
>
> Archana Chillala
> Application Developer
> Email archa...@thoughtworks.com
> Telephone +91 9100960533 <+91+9100960533>
> [image: ThoughtWorks]
> 
>
> On Tue, Nov 8, 2016 at 5:41 PM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> No, I am talking about the system user on the operating system.
>>
>> So, if you DHIS2 server is running as the user "dhis", then this user
>> needs access to be able to write to that directory mentioned in your file.
>>
>> This has nothing to do with users in DHIS2, but is potentially an
>> operating system issue with the permissions of the directory which the
>> server needs to write to.
>>
>> Regards,
>> Jason
>>
>>
>> On Tue, Nov 8, 2016 at 1:09 PM, Archana Chillala <
>> archa...@thoughtworks.com> wrote:
>>
>>> Hi Jason,
>>>
>>> The user has been given all the authorities that include the following:
>>> Add/Update Private Document
>>> Add/update Public Document
>>> Delete Document
>>>
>>> Even though, the issue exists.
>>>
>>>
>>>
>>>
>>> Archana Chillala
>>> Application Developer
>>> Email archa...@thoughtworks.com
>>> Telephone +91 9100960533 <+91+9100960533>
>>> [image: ThoughtWorks]
>>> 
>>>
>>> On Tue, Nov 8, 2016 at 4:58 PM, Jason Pickering <
>>> jason.p.picker...@gmail.com> wrote:
>>>
 Are you certain that the user which is running the DHIS2 server has
 access to write to

 /home/dhis/documents/ ?

 Regards,
 Jason


 On Tue, Nov 8, 2016 at 12:18 PM, Archana Chillala <
 archa...@thoughtworks.com> wrote:

> Hi Lars,
>
> Yes, it works fine on the play server. But somehow, not on ours. We're
> using DHIS version 2.25 build - 66c1fc0. Please have a look at the
> logs attached herewith.
>
>
>
> Archana Chillala
> Application Developer
> Email archa...@thoughtworks.com
> Telephone +91 9100960533 <+91+9100960533>
> [image: ThoughtWorks]
> 
>
> On Fri, Nov 4, 2016 at 7:18 PM, Lars Helge Øverland 
> wrote:
>
>> Hi Archana,
>>
>> I just tested this on the demo instance for 2.25 and it works there.
>>
>> Can you please provide the tomcat log?
>>
>> regards,
>>
>> Lars
>>
>>
>>
>>
>> On Fri, Nov 4, 2016 at 1:44 PM, Archana Chillala <
>> archa...@thoughtworks.com> wrote:
>>
>>> Hi,
>>>
>>> We are using DHIS version 2.25. In the Reports module, we have 
>>> *Resources
>>> *of types "File" and "URL". We are able to create a resource of
>>> type 'URL'. But when we try to create one with type - 'File', the
>>> application throws an exception. This used to get saved in 2.24 and 
>>> earlier
>>> versions. But doesn't work in 2.25.
>>>
>>> See the screenshot attached.
>>>
>>>
>>>
>>> *Cheers,*
>>>
>>> Archana Chillala
>>> Application Developer
>>> Email archa...@thoughtworks.com
>>> Telephone +91 9100960533 <+91+9100960533>
>>> [image: ThoughtWorks]
>>> 
>>>
>>> ___
>>> 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
>> l...@dhis2.org
>> http://www.dhis2.org 
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


 --
 Jason P. Pickering
 email: jason.p.picker...@gmail.com
 tel:+46764147049

>>>
>>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com

[Dhis2-devs] Program rule actions of type ASSIGN not working on SCHEDULED events

2016-11-10 Thread Victor Garcia
Hi all,

we have noticed a buggy behavior when using program rule actions of type
ASSIGN in scheduled events. The program rule is correctly evaluated, but
the program rule action does not assign the desired value to the
dataelement in that event. This happens only when the event is created
using the visit scheduler. If the event is created using the "Add new
event" button the program rule action works fine.

The steps to reproduce the issue:
1. Create a programRuleVariable of type "DATAELEMENT_CURRENT_EVENT" with
the dataelement we want to copy.
2. Create a programRule limited to that programStage.
3. Assign a programRuleAction of type ASSIGN, with the previously crated
programRuleVariable as the "data" and a dataelement as the target.

I couldn't access demo server to reproduce the issue (it seems that admin
password has been changed), but I did in dev server and created an example
that you can easily verify until it is reset tonight. It is in the program
"WHO RMNCH Tracker", in the stage "Postpartum care visit". I added a new
dataelement called "Copy HIV test result" just below "HIV test result" that
copies its value. You can verify that if the stage is created using the
"Add event button" the value is correctly copied; but it the stage is added
using the visit scheduler, the value is not copied.

If there is doubt please let me know.

Thank you!

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