[Dhis2-devs] 2.23 Metadata importer rewrite and dryRuns

2016-02-02 Thread Morten Olav Hansen
Hi everyone

I'm currently in the process of re-writing our DXF2 metadata importer, and
was wondering if anyone is actually using the dryRun option? its adds quite
a bit of complexity to the code, so it will be added only to the new
importer if people are actually using it for imports

--
Morten
___
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.23 Metadata importer rewrite and dryRuns

2016-02-02 Thread Pamod Amarakoon
Hi Morten,

We are using metaData import frequently when transferring data back and
forth in running instances. Dry Run feature is almost always used just to
check any incompatibility before actual transfer. So it's quite useful.

On Tue, Feb 2, 2016 at 1:45 PM, Morten Olav Hansen 
wrote:

> Hi everyone
>
> I'm currently in the process of re-writing our DXF2 metadata importer, and
> was wondering if anyone is actually using the dryRun option? its adds quite
> a bit of complexity to the code, so it will be added only to the new
> importer if people are actually using it for imports
>
> --
> Morten
>
> ___
> 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,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.
___
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.23 Metadata importer rewrite and dryRuns

2016-02-02 Thread Busoye Anifalaje
Since there is no rollback feature we rely on the dry run to test imports
before actually importing. If you will replace with a comparable feature
then great otherwise please let it live through the next season.

Thanks.

Busoye
On 2 Feb 2016 08:19, "Pamod Amarakoon"  wrote:

> Hi Morten,
>
> We are using metaData import frequently when transferring data back and
> forth in running instances. Dry Run feature is almost always used just to
> check any incompatibility before actual transfer. So it's quite useful.
>
> On Tue, Feb 2, 2016 at 1:45 PM, Morten Olav Hansen 
> wrote:
>
>> Hi everyone
>>
>> I'm currently in the process of re-writing our DXF2 metadata importer,
>> and was wondering if anyone is actually using the dryRun option? its adds
>> quite a bit of complexity to the code, so it will be added only to the new
>> importer if people are actually using it for imports
>>
>> --
>> Morten
>>
>> ___
>> 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,
> Pamod Amarakoon
>
> Confidentiality Notice: the information contained in this email and any
> attachments may be legally privileged and confidential. If you are not an
> intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not retain,
> copy or use this e-mail or any attachments for any purpose, nor disclose
> all or any part of the contents to any other person.
>
>
>
>
> ___
> 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
>
>

-- 


*This message and any attachments are subject to a disclaimer published at 
http://www.hisp.org/policies.html#comms_disclaimer 
.  Please read the 
disclaimer before opening any attachment or taking any other action in 
terms of this electronic transmission.  If you cannot access the 
disclaimer, kindly send an email to disclai...@hisp.org 
 and a copy will be provided to you. By replying to 
this e-mail or opening any attachment you agree to be bound by the 
provisions of the disclaimer.*
___
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.23 Metadata importer rewrite and dryRuns

2016-02-02 Thread Calle Hedberg
Morten,

Dropping the dry run is OK if, and I stress if, the import process itself
becomes more transparent and step-wise. Basically this means
1.
Display new records coming in, with the ability to remove all or some from
import
2.
Display updated records coming in and the equivalent existing records, with
the ability to remove all or some from import/updating.

The fundamental problem with DHIS2 imports are that they are "black boxes",
you cannot see what's happening until after it's done. Without even the dry
run, your only "Safety net" is to back up the whole database just before
importing - which is tricky to do in a production environment when manager
A imports data while user B,C,D, and E are capturing data directly.

Regards
Calle

On 2 February 2016 at 10:15, Morten Olav Hansen  wrote:

> Hi everyone
>
> I'm currently in the process of re-writing our DXF2 metadata importer, and
> was wondering if anyone is actually using the dryRun option? its adds quite
> a bit of complexity to the code, so it will be added only to the new
> importer if people are actually using it for imports
>
> --
> Morten
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

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

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

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

Skype: calle_hedberg

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


Re: [Dhis2-devs] 2.23 Metadata importer rewrite and dryRuns

2016-02-02 Thread Morten Olav Hansen
Hi Calle

Yeah, I think its obvious from the quick emails we are getting that we
should not remove it. I would be great to have a proper rollback feature,
but right now this won't be that easy to add.

(I am talking about metadata only though, you seem to also mention
aggregate/event data? those importers are not scheduled to be rewritten,
and will behave as today)

--
Morten

On Tue, Feb 2, 2016 at 3:26 PM, Calle Hedberg 
wrote:

> Morten,
>
> Dropping the dry run is OK if, and I stress if, the import process itself
> becomes more transparent and step-wise. Basically this means
> 1.
> Display new records coming in, with the ability to remove all or some from
> import
> 2.
> Display updated records coming in and the equivalent existing records,
> with the ability to remove all or some from import/updating.
>
> The fundamental problem with DHIS2 imports are that they are "black
> boxes", you cannot see what's happening until after it's done. Without even
> the dry run, your only "Safety net" is to back up the whole database just
> before importing - which is tricky to do in a production environment when
> manager A imports data while user B,C,D, and E are capturing data directly.
>
> Regards
> Calle
>
> On 2 February 2016 at 10:15, Morten Olav Hansen 
> wrote:
>
>> Hi everyone
>>
>> I'm currently in the process of re-writing our DXF2 metadata importer,
>> and was wondering if anyone is actually using the dryRun option? its adds
>> quite a bit of complexity to the code, so it will be added only to the new
>> importer if people are actually using it for imports
>>
>> --
>> Morten
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19119
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Maintenance app features

2016-02-02 Thread Olav Poppe
Great, thanks.

Olav


> 1. feb. 2016 kl. 18.46 skrev Lars Helge Øverland :
> 
> Hi Olav,
> 
> that makes sense. The second is already planned. Issues here:
> 
> https://github.com/dhis2/d2-ui/issues/24
> 
> https://github.com/dhis2/d2-ui/issues/23
> 
> regards,
> 
> Lars
> 
> 
> 
> 
>> On Sun, Jan 31, 2016 at 8:49 PM, Olav Poppe  wrote:
>> Hi devs,
>> two requests/suggestions regarding the new maintenance app:
>> - support for sorting by columns. It can often be useful to sort by last 
>> updated, and even "public access"
>> - make it customisable what columns to display in the list, as well as in 
>> the "info" box.
>> Combining the two points so that you could add any column and then sort by 
>> that would be ideal.
>> 
>> Olav
>> 
>> 
>> 
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
> 
> 
> 
> -- 
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org

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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21850: switch to sharing accessible objects only for PreheatMode.ALL, also switches from id object manag...

2016-02-02 Thread noreply

revno: 21850
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2016-02-02 16:16:43 +0700
message:
  switch to sharing accessible objects only for PreheatMode.ALL, also switches 
from id object manager to query service
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/preheat/DefaultPreheatService.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/preheat/DefaultPreheatService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/preheat/DefaultPreheatService.java	2016-02-01 10:27:53 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/preheat/DefaultPreheatService.java	2016-02-02 09:16:43 +
@@ -30,7 +30,9 @@
 
 import com.google.common.collect.Sets;
 import org.hisp.dhis.common.IdentifiableObject;
-import org.hisp.dhis.common.IdentifiableObjectManager;
+import org.hisp.dhis.query.Query;
+import org.hisp.dhis.query.QueryService;
+import org.hisp.dhis.query.Restrictions;
 import org.hisp.dhis.schema.Property;
 import org.hisp.dhis.schema.PropertyType;
 import org.hisp.dhis.schema.Schema;
@@ -57,7 +59,7 @@
 private SchemaService schemaService;
 
 @Autowired
-private IdentifiableObjectManager manager;
+private QueryService queryService;
 
 @Override
 @SuppressWarnings( "unchecked" )
@@ -75,7 +77,8 @@
 
 for ( Class klass : params.getClasses() )
 {
-List objects = manager.getAllNoAcl( klass ); // should we use getAll here? are we allowed to reference unshared objects?
+Query query = Query.from( schemaService.getDynamicSchema( klass ) );
+List objects = queryService.query( query );
 
 if ( PreheatIdentifier.UID == params.getPreheatIdentifier() || PreheatIdentifier.AUTO == params.getPreheatIdentifier() )
 {
@@ -98,7 +101,9 @@
 for ( Class klass : uidMap.keySet() )
 {
 Collection identifiers = uidMap.get( klass );
-List objects = manager.getByUid( klass, identifiers );
+Query query = Query.from( schemaService.getDynamicSchema( klass ) );
+query.add( Restrictions.in( "id", identifiers ) );
+List objects = queryService.query( query );
 preheat.put( PreheatIdentifier.UID, objects );
 }
 }
@@ -108,7 +113,9 @@
 for ( Class klass : codeMap.keySet() )
 {
 Collection identifiers = codeMap.get( klass );
-List objects = manager.getByCode( klass, identifiers );
+Query query = Query.from( schemaService.getDynamicSchema( klass ) );
+query.add( Restrictions.in( "code", identifiers ) );
+List objects = queryService.query( query );
 preheat.put( PreheatIdentifier.CODE, objects );
 }
 }

___
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 1540854] [NEW] Altering a Category in 2.22 21784 removes it from the assigned category combo

2016-02-02 Thread Timothy Harding
Public bug reported:

Altering a Category in 2.22 21784 removes it from the assigned category
combo

Steps to reproduce
1. Create a Category
2. Assign Category to CatCombo
3. Remove or add an option from the category from step 1
4. Notice it is no longer a part of the CatCombo Assigned in step 2

I imagine this might remove it from all the category combos (plural) but
I haven't tested that far yet

** Affects: dhis2
 Importance: Undecided
 Status: New

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

Title:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

Status in DHIS:
  New

Bug description:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

  Steps to reproduce
  1. Create a Category
  2. Assign Category to CatCombo
  3. Remove or add an option from the category from step 1
  4. Notice it is no longer a part of the CatCombo Assigned in step 2

  I imagine this might remove it from all the category combos (plural)
  but I haven't tested that far yet

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

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


Re: [Dhis2-devs] 2.23 Metadata importer rewrite and dryRuns

2016-02-02 Thread Calle Hedberg
Morten,

I was talking about meta-data, and I'm not suggesting a roll-back feature -
I'm suggesting a more step-wise import process where the user can see and
control what is being imported/updated:
- what meta-data appear as new (it might not actually be new meta-data, but
rather just appear as new due to minor discrepancies in UIDs, names or
codes)
- what meta-data appear as updates (some might be wanted, some not).

I'm frequently addressing these challenges by comparing external meta-data
to DHIS2 meta-data using either PostgreSQL views or ODBC connections via MS
Access, but that's really cumbersome. Still better than importing what
turns out to be duplicates etc, and which later has to be cleaned up
manually.

A more step-wise process will also have major advantages over the current
"import summary" in the sense that you can see exactly WHAT fields are
updated (and presumably also filter out updates where e.g. the LastUpdated
value is older).

Regards
Calle

On 2 February 2016 at 10:29, Morten Olav Hansen  wrote:

> Hi Calle
>
> Yeah, I think its obvious from the quick emails we are getting that we
> should not remove it. I would be great to have a proper rollback feature,
> but right now this won't be that easy to add.
>
> (I am talking about metadata only though, you seem to also mention
> aggregate/event data? those importers are not scheduled to be rewritten,
> and will behave as today)
>
> --
> Morten
>
> On Tue, Feb 2, 2016 at 3:26 PM, Calle Hedberg 
> wrote:
>
>> Morten,
>>
>> Dropping the dry run is OK if, and I stress if, the import process itself
>> becomes more transparent and step-wise. Basically this means
>> 1.
>> Display new records coming in, with the ability to remove all or some
>> from import
>> 2.
>> Display updated records coming in and the equivalent existing records,
>> with the ability to remove all or some from import/updating.
>>
>> The fundamental problem with DHIS2 imports are that they are "black
>> boxes", you cannot see what's happening until after it's done. Without even
>> the dry run, your only "Safety net" is to back up the whole database just
>> before importing - which is tricky to do in a production environment when
>> manager A imports data while user B,C,D, and E are capturing data directly.
>>
>> Regards
>> Calle
>>
>> On 2 February 2016 at 10:15, Morten Olav Hansen 
>> wrote:
>>
>>> Hi everyone
>>>
>>> I'm currently in the process of re-writing our DXF2 metadata importer,
>>> and was wondering if anyone is actually using the dryRun option? its adds
>>> quite a bit of complexity to the code, so it will be added only to the new
>>> importer if people are actually using it for imports
>>>
>>> --
>>> Morten
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>>
>> ***
>>
>> Calle Hedberg
>>
>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>
>> Tel/fax (home): +27-21-685-6472
>>
>> Cell: +27-82-853-5352
>>
>> Iridium SatPhone: +8816-315-19119
>>
>> Email: calle.hedb...@gmail.com
>>
>> Skype: calle_hedberg
>>
>> ***
>>
>>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

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

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

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

Skype: calle_hedberg

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


[Dhis2-devs] Reporting Rate Summary

2016-02-02 Thread Pamod Amarakoon
Hi,

I need to clarify 2 things on reporting rate summary.

1. Is it possible to obtain reporting rate summary through web api.
2. is it possible to add a reporting rate summary as a dashboard item

Thank you

-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.
___
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] 2.23 Metadata importer rewrite and dryRuns

2016-02-02 Thread Halvdan Grelland
>From a dev perspective dryRun is pretty useful for debugging any features
built on top of it.

2016-02-02 9:15 GMT+01:00 Morten Olav Hansen :

> Hi everyone
>
> I'm currently in the process of re-writing our DXF2 metadata importer, and
> was wondering if anyone is actually using the dryRun option? its adds quite
> a bit of complexity to the code, so it will be added only to the new
> importer if people are actually using it for imports
>
> --
> Morten
>
> ___
> 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
>
>
___
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] User Activity Report

2016-02-02 Thread Pamod Amarakoon
Hi,

Any update on this.

On Fri, Jan 15, 2016 at 2:09 PM, Pamod Amarakoon  wrote:

> Dear All,
>
> Is it possible to obtain a report on activities/interaction of individual
> users with the DHIS2 instance at the moment. If not, is there any plans of
> including this feature in future releases.
>
> Thanx
>
> --
> Regards,
> Pamod Amarakoon
>
> Confidentiality Notice: the information contained in this email and any
> attachments may be legally privileged and confidential. If you are not an
> intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not retain,
> copy or use this e-mail or any attachments for any purpose, nor disclose
> all or any part of the contents to any other person.
>
>
>
>


-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.
___
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] User Activity Report

2016-02-02 Thread Lars Helge Øverland
Hi Pamod,

we do not plan to have support a full view of all activity. However we aim
for a "data usage statistics" feature for 2.23, where you can see which
types of data analysis a user is doing:

https://blueprints.launchpad.net/dhis2/+spec/system-usage-analytics

This might be expanded to more type of activity later, but not confirmed at
this point.

regards,

Lars


On Fri, Jan 15, 2016 at 9:39 AM, Pamod Amarakoon  wrote:

> Dear All,
>
> Is it possible to obtain a report on activities/interaction of individual
> users with the DHIS2 instance at the moment. If not, is there any plans of
> including this feature in future releases.
>
> Thanx
>
> --
> Regards,
> Pamod Amarakoon
>
> Confidentiality Notice: the information contained in this email and any
> attachments may be legally privileged and confidential. If you are not an
> intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not retain,
> copy or use this e-mail or any attachments for any purpose, nor disclose
> all or any part of the contents to any other person.
>
>
>
>
> ___
> 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
>
>


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


Re: [Dhis2-devs] Reporting Rate Summary

2016-02-02 Thread Lars Helge Øverland
Hi Pamod,

the "reporting rate summary" under reports is not available in the Web API.

What you can do is to create a pivot table or chart from pivot table app or
data visualizer app, and then access those through the API or put it on the
dashboard.

That will only give you percentages, not no of reports etc. We are working
on that.

regards,

Lars





On Tue, Feb 2, 2016 at 2:10 PM, Pamod Amarakoon  wrote:

> Hi,
>
> I need to clarify 2 things on reporting rate summary.
>
> 1. Is it possible to obtain reporting rate summary through web api.
> 2. is it possible to add a reporting rate summary as a dashboard item
>
> Thank you
>
> --
> Regards,
> Pamod Amarakoon
>
> Confidentiality Notice: the information contained in this email and any
> attachments may be legally privileged and confidential. If you are not an
> intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not retain,
> copy or use this e-mail or any attachments for any purpose, nor disclose
> all or any part of the contents to any other person.
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


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


Re: [Dhis2-devs] [Dhis2-users] User Activity Report

2016-02-02 Thread Olav Poppe
Hi Lars,
this looks good. Just a question, I wasn’t able to see from the blueprint if 
this statistics was for the number of report items that exist, or if it would 
somehow also include statistics on how often favourites are opened?

Olav


> 2. feb. 2016 kl. 15.49 skrev Lars Helge Øverland :
> 
> Hi Pamod,
> 
> we do not plan to have support a full view of all activity. However we aim 
> for a "data usage statistics" feature for 2.23, where you can see which types 
> of data analysis a user is doing:
> 
> https://blueprints.launchpad.net/dhis2/+spec/system-usage-analytics
> 
> This might be expanded to more type of activity later, but not confirmed at 
> this point.
> 
> regards,
> 
> Lars
> 
> 
>> On Fri, Jan 15, 2016 at 9:39 AM, Pamod Amarakoon  wrote:
>> Dear All,
>> 
>> Is it possible to obtain a report on activities/interaction of individual 
>> users with the DHIS2 instance at the moment. If not, is there any plans of 
>> including this feature in future releases.
>> 
>> Thanx
>> 
>> -- 
>> Regards,
>> Pamod Amarakoon
>> 
>> Confidentiality Notice: the information contained in this email and any 
>> attachments may be legally privileged and confidential. If you are not an 
>> intended recipient, you are hereby notified that any dissemination, 
>> distribution, or copying of this e-mail is strictly prohibited. If you have 
>> received this e-mail in error, please notify the sender and permanently 
>> delete the e-mail and any attachments immediately. You should not retain, 
>> copy or use this e-mail or any attachments for any purpose, nor disclose all 
>> or any part of the contents to any other person.
>> 
>> 
>> 
>> 
>> ___
>> 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
> 
> 
> 
> -- 
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp

___
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 1540854] Re: Altering a Category in 2.22 21784 removes it from the assigned category combo

2016-02-02 Thread Lars Helge Øverland
** Changed in: dhis2
 Assignee: (unassigned) => Mark Polak (markpo)

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

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

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

Title:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

Status in DHIS:
  New

Bug description:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

  Steps to reproduce
  1. Create a Category
  2. Assign Category to CatCombo
  3. Remove or add an option from the category from step 1
  4. Notice it is no longer a part of the CatCombo Assigned in step 2

  I imagine this might remove it from all the category combos (plural)
  but I haven't tested that far yet

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

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


Re: [Dhis2-devs] Reporting Rate Summary

2016-02-02 Thread Pamod Amarakoon
Thanx Lars.

In this case I assume we can only use compulsory data elements to assess
the completeness. Will use that as a work around.

On Tue, Feb 2, 2016 at 8:23 PM, Lars Helge Øverland 
wrote:

> Hi Pamod,
>
> the "reporting rate summary" under reports is not available in the Web API.
>
> What you can do is to create a pivot table or chart from pivot table app
> or data visualizer app, and then access those through the API or put it on
> the dashboard.
>
> That will only give you percentages, not no of reports etc. We are working
> on that.
>
> regards,
>
> Lars
>
>
>
>
>
> On Tue, Feb 2, 2016 at 2:10 PM, Pamod Amarakoon  wrote:
>
>> Hi,
>>
>> I need to clarify 2 things on reporting rate summary.
>>
>> 1. Is it possible to obtain reporting rate summary through web api.
>> 2. is it possible to add a reporting rate summary as a dashboard item
>>
>> Thank you
>>
>> --
>> Regards,
>> Pamod Amarakoon
>>
>> Confidentiality Notice: the information contained in this email and any
>> attachments may be legally privileged and confidential. If you are not an
>> intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this e-mail is strictly prohibited. If you have
>> received this e-mail in error, please notify the sender and permanently
>> delete the e-mail and any attachments immediately. You should not retain,
>> copy or use this e-mail or any attachments for any purpose, nor disclose
>> all or any part of the contents to any other person.
>>
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
>


-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.
___
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] User Activity Report

2016-02-02 Thread Jason Pickering
You can consider to implement Google Analytics or other similar open source
solutions for seeing what users are up to, without being too invasive.
Also, lots of information can be gleaned from the Web server logs. There
are many tools capable of getting generating stats from your logs. This
might be a good solution to start with.

Regards,
Jason


On Tue, Feb 2, 2016, 15:50 Lars Helge Øverland  wrote:

> Hi Pamod,
>
> we do not plan to have support a full view of all activity. However we aim
> for a "data usage statistics" feature for 2.23, where you can see which
> types of data analysis a user is doing:
>
> https://blueprints.launchpad.net/dhis2/+spec/system-usage-analytics
>
> This might be expanded to more type of activity later, but not confirmed
> at this point.
>
> regards,
>
> Lars
>
>
> On Fri, Jan 15, 2016 at 9:39 AM, Pamod Amarakoon  wrote:
>
>> Dear All,
>>
>> Is it possible to obtain a report on activities/interaction of individual
>> users with the DHIS2 instance at the moment. If not, is there any plans of
>> including this feature in future releases.
>>
>> Thanx
>>
>> --
>> Regards,
>> Pamod Amarakoon
>>
>> Confidentiality Notice: the information contained in this email and any
>> attachments may be legally privileged and confidential. If you are not an
>> intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this e-mail is strictly prohibited. If you have
>> received this e-mail in error, please notify the sender and permanently
>> delete the e-mail and any attachments immediately. You should not retain,
>> copy or use this e-mail or any attachments for any purpose, nor disclose
>> all or any part of the contents to any other person.
>>
>>
>>
>>
>> ___
>>
> 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
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
> ___
> 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
>
___
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] User Activity Report

2016-02-02 Thread Pamod Amarakoon
Hi Lars,

Looks very useful. But my use case being the the district manager needs to
create a user report for each month where he wants to see the following,

1. number of data sets completed by the facility user
2. number of Program events completed by facility user
3. number of sms/emails sent by facility user
4. number of logins per each user per month

This could be made available at a separate section in user profile may be.

Just wondering if there is any plan of implementing such feature in future

On Tue, Feb 2, 2016 at 8:28 PM, Olav Poppe  wrote:

> Hi Lars,
> this looks good. Just a question, I wasn’t able to see from the blueprint
> if this statistics was for the number of report items that exist, or if it
> would somehow also include statistics on how often favourites are opened?
>
> Olav
>
>
> 2. feb. 2016 kl. 15.49 skrev Lars Helge Øverland :
>
> Hi Pamod,
>
> we do not plan to have support a full view of all activity. However we aim
> for a "data usage statistics" feature for 2.23, where you can see which
> types of data analysis a user is doing:
>
> https://blueprints.launchpad.net/dhis2/+spec/system-usage-analytics
>
> This might be expanded to more type of activity later, but not confirmed
> at this point.
>
> regards,
>
> Lars
>
>
> On Fri, Jan 15, 2016 at 9:39 AM, Pamod Amarakoon  wrote:
>
>> Dear All,
>>
>> Is it possible to obtain a report on activities/interaction of individual
>> users with the DHIS2 instance at the moment. If not, is there any plans of
>> including this feature in future releases.
>>
>> Thanx
>>
>> --
>> Regards,
>> Pamod Amarakoon
>>
>> Confidentiality Notice: the information contained in this email and any
>> attachments may be legally privileged and confidential. If you are not an
>> intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this e-mail is strictly prohibited. If you have
>> received this e-mail in error, please notify the sender and permanently
>> delete the e-mail and any attachments immediately. You should not retain,
>> copy or use this e-mail or any attachments for any purpose, nor disclose
>> all or any part of the contents to any other person.
>>
>>
>>
>>
>> ___
>> 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
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
>


-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.
___
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] User Activity Report

2016-02-02 Thread Lars Helge Øverland
On Tue, Feb 2, 2016 at 3:58 PM, Olav Poppe  wrote:

> Hi Lars,
> this looks good. Just a question, I wasn’t able to see from the blueprint
> if this statistics was for the number of report items that exist, or if it
> would somehow also include statistics on how often favourites are opened?
>

It will be both.

Lars







>
> Olav
>
>
> 2. feb. 2016 kl. 15.49 skrev Lars Helge Øverland :
>
> Hi Pamod,
>
> we do not plan to have support a full view of all activity. However we aim
> for a "data usage statistics" feature for 2.23, where you can see which
> types of data analysis a user is doing:
>
> https://blueprints.launchpad.net/dhis2/+spec/system-usage-analytics
>
> This might be expanded to more type of activity later, but not confirmed
> at this point.
>
> regards,
>
> Lars
>
>
> On Fri, Jan 15, 2016 at 9:39 AM, Pamod Amarakoon  wrote:
>
>> Dear All,
>>
>> Is it possible to obtain a report on activities/interaction of individual
>> users with the DHIS2 instance at the moment. If not, is there any plans of
>> including this feature in future releases.
>>
>> Thanx
>>
>> --
>> Regards,
>> Pamod Amarakoon
>>
>> Confidentiality Notice: the information contained in this email and any
>> attachments may be legally privileged and confidential. If you are not an
>> intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this e-mail is strictly prohibited. If you have
>> received this e-mail in error, please notify the sender and permanently
>> delete the e-mail and any attachments immediately. You should not retain,
>> copy or use this e-mail or any attachments for any purpose, nor disclose
>> all or any part of the contents to any other person.
>>
>>
>>
>>
>> ___
>> 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
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
>


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


Re: [Dhis2-devs] [Dhis2-users] User Activity Report

2016-02-02 Thread Lars Helge Øverland
On Tue, Feb 2, 2016 at 4:21 PM, Pamod Amarakoon  wrote:

> Hi Lars,
>
> Looks very useful. But my use case being the the district manager needs to
> create a user report for each month where he wants to see the following,
>
> 1. number of data sets completed by the facility user
> 2. number of Program events completed by facility user
> 3. number of sms/emails sent by facility user
> 4. number of logins per each user per month
>
> This could be made available at a separate section in user profile may be.
>
> Just wondering if there is any plan of implementing such feature in future
>

Thanks Pamod. That's interesting feedback. We will definitely think about
implementing that.

Note that these things can be calculated by plain SQL. You can create it as
a standard report or SQL view as of now, assuming some SQL mastery.

Lars







>
> On Tue, Feb 2, 2016 at 8:28 PM, Olav Poppe  wrote:
>
>> Hi Lars,
>> this looks good. Just a question, I wasn’t able to see from the blueprint
>> if this statistics was for the number of report items that exist, or if it
>> would somehow also include statistics on how often favourites are opened?
>>
>> Olav
>>
>>
>> 2. feb. 2016 kl. 15.49 skrev Lars Helge Øverland :
>>
>> Hi Pamod,
>>
>> we do not plan to have support a full view of all activity. However we
>> aim for a "data usage statistics" feature for 2.23, where you can see which
>> types of data analysis a user is doing:
>>
>> https://blueprints.launchpad.net/dhis2/+spec/system-usage-analytics
>>
>> This might be expanded to more type of activity later, but not confirmed
>> at this point.
>>
>> regards,
>>
>> Lars
>>
>>
>> On Fri, Jan 15, 2016 at 9:39 AM, Pamod Amarakoon 
>> wrote:
>>
>>> Dear All,
>>>
>>> Is it possible to obtain a report on activities/interaction of
>>> individual users with the DHIS2 instance at the moment. If not, is there
>>> any plans of including this feature in future releases.
>>>
>>> Thanx
>>>
>>> --
>>> Regards,
>>> Pamod Amarakoon
>>>
>>> Confidentiality Notice: the information contained in this email and any
>>> attachments may be legally privileged and confidential. If you are not an
>>> intended recipient, you are hereby notified that any dissemination,
>>> distribution, or copying of this e-mail is strictly prohibited. If you have
>>> received this e-mail in error, please notify the sender and permanently
>>> delete the e-mail and any attachments immediately. You should not retain,
>>> copy or use this e-mail or any attachments for any purpose, nor disclose
>>> all or any part of the contents to any other person.
>>>
>>>
>>>
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> http://www.dhis2.org 
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>
>
> --
> Regards,
> Pamod Amarakoon
>
> Confidentiality Notice: the information contained in this email and any
> attachments may be legally privileged and confidential. If you are not an
> intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not retain,
> copy or use this e-mail or any attachments for any purpose, nor disclose
> all or any part of the contents to any other person.
>
>
>
>


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


Re: [Dhis2-devs] Reporting Rate Summary

2016-02-02 Thread Lars Helge Øverland
Unfortunately we only the "complete data set registration" mode here per
now.

Lars


On Tue, Feb 2, 2016 at 4:12 PM, Pamod Amarakoon  wrote:

> Thanx Lars.
>
> In this case I assume we can only use compulsory data elements to assess
> the completeness. Will use that as a work around.
>
> On Tue, Feb 2, 2016 at 8:23 PM, Lars Helge Øverland 
> wrote:
>
>> Hi Pamod,
>>
>> the "reporting rate summary" under reports is not available in the Web
>> API.
>>
>> What you can do is to create a pivot table or chart from pivot table app
>> or data visualizer app, and then access those through the API or put it on
>> the dashboard.
>>
>> That will only give you percentages, not no of reports etc. We are
>> working on that.
>>
>> regards,
>>
>> Lars
>>
>>
>>
>>
>>
>> On Tue, Feb 2, 2016 at 2:10 PM, Pamod Amarakoon  wrote:
>>
>>> Hi,
>>>
>>> I need to clarify 2 things on reporting rate summary.
>>>
>>> 1. Is it possible to obtain reporting rate summary through web api.
>>> 2. is it possible to add a reporting rate summary as a dashboard item
>>>
>>> Thank you
>>>
>>> --
>>> Regards,
>>> Pamod Amarakoon
>>>
>>> Confidentiality Notice: the information contained in this email and any
>>> attachments may be legally privileged and confidential. If you are not an
>>> intended recipient, you are hereby notified that any dissemination,
>>> distribution, or copying of this e-mail is strictly prohibited. If you have
>>> received this e-mail in error, please notify the sender and permanently
>>> delete the e-mail and any attachments immediately. You should not retain,
>>> copy or use this e-mail or any attachments for any purpose, nor disclose
>>> all or any part of the contents to any other person.
>>>
>>>
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> http://www.dhis2.org 
>>
>>
>
>
> --
> Regards,
> Pamod Amarakoon
>
> Confidentiality Notice: the information contained in this email and any
> attachments may be legally privileged and confidential. If you are not an
> intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not retain,
> copy or use this e-mail or any attachments for any purpose, nor disclose
> all or any part of the contents to any other person.
>
>
>
>


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


Re: [Dhis2-devs] [Dhis2-users] User Activity Report

2016-02-02 Thread Pamod Amarakoon
Thanx Lars/Jason for the info. I'll start working on that path.

On Tue, Feb 2, 2016 at 9:22 PM, Lars Helge Øverland 
wrote:

>
>
> On Tue, Feb 2, 2016 at 4:21 PM, Pamod Amarakoon  wrote:
>
>> Hi Lars,
>>
>> Looks very useful. But my use case being the the district manager needs
>> to create a user report for each month where he wants to see the following,
>>
>> 1. number of data sets completed by the facility user
>> 2. number of Program events completed by facility user
>> 3. number of sms/emails sent by facility user
>> 4. number of logins per each user per month
>>
>> This could be made available at a separate section in user profile may be.
>>
>> Just wondering if there is any plan of implementing such feature in future
>>
>
> Thanks Pamod. That's interesting feedback. We will definitely think about
> implementing that.
>
> Note that these things can be calculated by plain SQL. You can create it
> as a standard report or SQL view as of now, assuming some SQL mastery.
>
> Lars
>
>
>
>
>
>
>
>>
>> On Tue, Feb 2, 2016 at 8:28 PM, Olav Poppe  wrote:
>>
>>> Hi Lars,
>>> this looks good. Just a question, I wasn’t able to see from the
>>> blueprint if this statistics was for the number of report items that exist,
>>> or if it would somehow also include statistics on how often favourites are
>>> opened?
>>>
>>> Olav
>>>
>>>
>>> 2. feb. 2016 kl. 15.49 skrev Lars Helge Øverland :
>>>
>>> Hi Pamod,
>>>
>>> we do not plan to have support a full view of all activity. However we
>>> aim for a "data usage statistics" feature for 2.23, where you can see which
>>> types of data analysis a user is doing:
>>>
>>> https://blueprints.launchpad.net/dhis2/+spec/system-usage-analytics
>>>
>>> This might be expanded to more type of activity later, but not confirmed
>>> at this point.
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>> On Fri, Jan 15, 2016 at 9:39 AM, Pamod Amarakoon 
>>> wrote:
>>>
 Dear All,

 Is it possible to obtain a report on activities/interaction of
 individual users with the DHIS2 instance at the moment. If not, is there
 any plans of including this feature in future releases.

 Thanx

 --
 Regards,
 Pamod Amarakoon

 Confidentiality Notice: the information contained in this email and any
 attachments may be legally privileged and confidential. If you are not an
 intended recipient, you are hereby notified that any dissemination,
 distribution, or copying of this e-mail is strictly prohibited. If you have
 received this e-mail in error, please notify the sender and permanently
 delete the e-mail and any attachments immediately. You should not retain,
 copy or use this e-mail or any attachments for any purpose, nor disclose
 all or any part of the contents to any other person.




 ___
 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


>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> http://www.dhis2.org 
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>>
>>
>>
>> --
>> Regards,
>> Pamod Amarakoon
>>
>> Confidentiality Notice: the information contained in this email and any
>> attachments may be legally privileged and confidential. If you are not an
>> intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this e-mail is strictly prohibited. If you have
>> received this e-mail in error, please notify the sender and permanently
>> delete the e-mail and any attachments immediately. You should not retain,
>> copy or use this e-mail or any attachments for any purpose, nor disclose
>> all or any part of the contents to any other person.
>>
>>
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
>


-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.
___
Mailing list: http

Re: [Dhis2-devs] Reporting Rate Summary

2016-02-02 Thread Pamod Amarakoon
Okay. Thanx Lars.

On Tue, Feb 2, 2016 at 9:23 PM, Lars Helge Øverland 
wrote:

>
> Unfortunately we only the "complete data set registration" mode here per
> now.
>
> Lars
>
>
> On Tue, Feb 2, 2016 at 4:12 PM, Pamod Amarakoon  wrote:
>
>> Thanx Lars.
>>
>> In this case I assume we can only use compulsory data elements to assess
>> the completeness. Will use that as a work around.
>>
>> On Tue, Feb 2, 2016 at 8:23 PM, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Pamod,
>>>
>>> the "reporting rate summary" under reports is not available in the Web
>>> API.
>>>
>>> What you can do is to create a pivot table or chart from pivot table app
>>> or data visualizer app, and then access those through the API or put it on
>>> the dashboard.
>>>
>>> That will only give you percentages, not no of reports etc. We are
>>> working on that.
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Feb 2, 2016 at 2:10 PM, Pamod Amarakoon 
>>> wrote:
>>>
 Hi,

 I need to clarify 2 things on reporting rate summary.

 1. Is it possible to obtain reporting rate summary through web api.
 2. is it possible to add a reporting rate summary as a dashboard item

 Thank you

 --
 Regards,
 Pamod Amarakoon

 Confidentiality Notice: the information contained in this email and any
 attachments may be legally privileged and confidential. If you are not an
 intended recipient, you are hereby notified that any dissemination,
 distribution, or copying of this e-mail is strictly prohibited. If you have
 received this e-mail in error, please notify the sender and permanently
 delete the e-mail and any attachments immediately. You should not retain,
 copy or use this e-mail or any attachments for any purpose, nor disclose
 all or any part of the contents to any other person.




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


>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> http://www.dhis2.org 
>>>
>>>
>>
>>
>> --
>> Regards,
>> Pamod Amarakoon
>>
>> Confidentiality Notice: the information contained in this email and any
>> attachments may be legally privileged and confidential. If you are not an
>> intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this e-mail is strictly prohibited. If you have
>> received this e-mail in error, please notify the sender and permanently
>> delete the e-mail and any attachments immediately. You should not retain,
>> copy or use this e-mail or any attachments for any purpose, nor disclose
>> all or any part of the contents to any other person.
>>
>>
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org 
>
>


-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.
___
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 1540854] Re: Altering a Category in 2.22 21784 removes it from the assigned category combo

2016-02-02 Thread Mark Polak
This issue seems reasonably hard to reproduce because updating a
category seems to give a 500 error when updating it (after having added
it to a categoryCombo?).

root cause
java.lang.NullPointerException

org.hisp.dhis.dataelement.DataElementCategory.removeAllCategoryCombos(DataElementCategory.java:138)

org.hisp.dhis.dataelement.DataElementCategory.mergeWith(DataElementCategory.java:272)

org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter.updateObject(DefaultIdentifiableObjectImporter.java:457)

org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter.startImport(DefaultIdentifiableObjectImporter.java:551)

org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter.importObjectLocal(DefaultIdentifiableObjectImporter.java:530)

org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter.importObject(DefaultIdentifiableObjectImporter.java:209)

org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter.importObject(DefaultIdentifiableObjectImporter.java:104)

org.hisp.dhis.dxf2.metadata.DefaultImportService.doImport(DefaultImportService.java:277)

org.hisp.dhis.dxf2.metadata.DefaultImportService.importObject(DefaultImportService.java:110)

The times when i did see it happen i presume it might have to do with
the following:

CategoryCombos are not marked as an `owned` property of a category
therefore these are not send back when doing the update. (See
https://play.dhis2.org/demo/api/schemas/category.json?fields=properties[fieldName,owner])

However in the merge it seems to remove all category combos? 
http://bazaar.launchpad.net/~dhis2-devs-core/dhis2/trunk/view/head:/dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java#L272

I didn't dig into the code far enough to see if that is what it actually
does. But the app at least is sending the correct payload.

** Changed in: dhis2
 Assignee: Mark Polak (markpo) => Lars Helge Øverland (larshelge)

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

Title:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

Status in DHIS:
  New

Bug description:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

  Steps to reproduce
  1. Create a Category
  2. Assign Category to CatCombo
  3. Remove or add an option from the category from step 1
  4. Notice it is no longer a part of the CatCombo Assigned in step 2

  I imagine this might remove it from all the category combos (plural)
  but I haven't tested that far yet

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

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


[Dhis2-devs] [Bug 1540854] Re: Altering a Category in 2.22 21784 removes it from the assigned category combo

2016-02-02 Thread Lars Helge Øverland
** Changed in: dhis2
 Assignee: Lars Helge Øverland (larshelge) => Morten Olav Hansen (mortenoh)

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

Title:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

Status in DHIS:
  New

Bug description:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

  Steps to reproduce
  1. Create a Category
  2. Assign Category to CatCombo
  3. Remove or add an option from the category from step 1
  4. Notice it is no longer a part of the CatCombo Assigned in step 2

  I imagine this might remove it from all the category combos (plural)
  but I haven't tested that far yet

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

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


[Dhis2-devs] [Bug 1541013] [NEW] Events visualizer duplicate units on y axis

2016-02-02 Thread Alex Vano
Public bug reported:

Hi,

I noticed on the Sierra Leone public demo instance that some graphs
duplicate the same unit on the y axis, e.g, the value "1" appears 5
times on the axis (See the attached screenshot).

I actually have the same issue on my 2.22 instance (build: 21782).

I'm using Chrome.

Is this a known issue.

Thanks,

Alex

** Affects: dhis2
 Importance: Undecided
 Status: New

** Attachment added: "Screenshot"
   
https://bugs.launchpad.net/bugs/1541013/+attachment/4562356/+files/EventsVisualizer.PNG

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

Title:
  Events visualizer duplicate units on y axis

Status in DHIS:
  New

Bug description:
  Hi,

  I noticed on the Sierra Leone public demo instance that some graphs
  duplicate the same unit on the y axis, e.g, the value "1" appears 5
  times on the axis (See the attached screenshot).

  I actually have the same issue on my 2.22 instance (build: 21782).

  I'm using Chrome.

  Is this a known issue.

  Thanks,

  Alex

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

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


Re: [Dhis2-devs] 2.23 Metadata importer rewrite and dryRuns

2016-02-02 Thread Bob Jolliffe
Calle

Here's another take on the problem.

Imagine you had a separate "metadata" instance (could variously be
called facility registry, data dictionary, indicator registry etc).
Basically a dhis2 instance with no data.  And a staging instance which
contains just a copy of the metadata instance.  Then you would always
apply your metadata imports to the staging instance.

Now what we don't have, but it seems like a very feasable app, is
something that can compare the contents of 2 instances.  Making very
clear to the user that the staging instance has more orgunits, less
orgunits or some changed orgunits for example.  And maybe some
rudimentary actions (import this, don't import that ..).

This approach might allow (i) easy user visualization of diffs, and
(ii) rollbacks, all without the need for maintaining dryRun code
within dhis2.  Keeping the dryRun logic out of dhis2 core means
keeping the metadata model relatively simple.  I can understand why
Morten would like to see it dropped. I suspect this could be managed
by implementing the differencing logic outside of the core logic as
well.  Basically doing the dryRun into a separate instance.  In fact,
for something like facility registry functionality, this might be the
only way to sensibly do it.

Just my 2c

Bob

On 2 February 2016 at 11:08, Calle Hedberg  wrote:
> Morten,
>
> I was talking about meta-data, and I'm not suggesting a roll-back feature -
> I'm suggesting a more step-wise import process where the user can see and
> control what is being imported/updated:
> - what meta-data appear as new (it might not actually be new meta-data, but
> rather just appear as new due to minor discrepancies in UIDs, names or
> codes)
> - what meta-data appear as updates (some might be wanted, some not).
>
> I'm frequently addressing these challenges by comparing external meta-data
> to DHIS2 meta-data using either PostgreSQL views or ODBC connections via MS
> Access, but that's really cumbersome. Still better than importing what turns
> out to be duplicates etc, and which later has to be cleaned up manually.
>
> A more step-wise process will also have major advantages over the current
> "import summary" in the sense that you can see exactly WHAT fields are
> updated (and presumably also filter out updates where e.g. the LastUpdated
> value is older).
>
> Regards
> Calle
>
> On 2 February 2016 at 10:29, Morten Olav Hansen  wrote:
>>
>> Hi Calle
>>
>> Yeah, I think its obvious from the quick emails we are getting that we
>> should not remove it. I would be great to have a proper rollback feature,
>> but right now this won't be that easy to add.
>>
>> (I am talking about metadata only though, you seem to also mention
>> aggregate/event data? those importers are not scheduled to be rewritten, and
>> will behave as today)
>>
>> --
>> Morten
>>
>> On Tue, Feb 2, 2016 at 3:26 PM, Calle Hedberg 
>> wrote:
>>>
>>> Morten,
>>>
>>> Dropping the dry run is OK if, and I stress if, the import process itself
>>> becomes more transparent and step-wise. Basically this means
>>> 1.
>>> Display new records coming in, with the ability to remove all or some
>>> from import
>>> 2.
>>> Display updated records coming in and the equivalent existing records,
>>> with the ability to remove all or some from import/updating.
>>>
>>> The fundamental problem with DHIS2 imports are that they are "black
>>> boxes", you cannot see what's happening until after it's done. Without even
>>> the dry run, your only "Safety net" is to back up the whole database just
>>> before importing - which is tricky to do in a production environment when
>>> manager A imports data while user B,C,D, and E are capturing data directly.
>>>
>>> Regards
>>> Calle
>>>
>>> On 2 February 2016 at 10:15, Morten Olav Hansen 
>>> wrote:

 Hi everyone

 I'm currently in the process of re-writing our DXF2 metadata importer,
 and was wondering if anyone is actually using the dryRun option? its adds
 quite a bit of complexity to the code, so it will be added only to the new
 importer if people are actually using it for imports

 --
 Morten

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

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

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21851: Added UserKeyJsonValue model, service, store, controller and tests

2016-02-02 Thread noreply
Merge authors:
  Stian Sandvold (stian-sandvold)

revno: 21851 [merge]
committer: Stian Sandvold 
branch nick: dhis2
timestamp: Tue 2016-02-02 18:30:37 +0100
message:
  Added UserKeyJsonValue model, service, store, controller and tests
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueService.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStore.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/DefaultUserKeyJsonValueService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/hibernate/
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/hibernate/HibernateUserKeyJsonValueStore.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/userkeyjsonvalue/
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/userkeyjsonvalue/hibernate/
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/userkeyjsonvalue/hibernate/UserKeyJsonValue.hbm.xml
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStoreTest.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/UserKeyJsonValueController.java
modified:
  
dhis-2/dhis-services/dhis-service-core/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
=== added directory 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue'
=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java	2016-02-02 15:41:15 +
@@ -0,0 +1,88 @@
+package org.hisp.dhis.userkeyjsonvalue;
+
+/*
+ * Copyright (c) 2004-2016, 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 com.fasterxml.jackson.annotation.JsonProperty;
+import org.hisp.dhis.common.BaseIdentifiableObject;
+import org.hisp.dhis.user.User;
+
+/**
+ * @author Stian Sandvold
+ */
+public class UserKeyJsonValue
+extends BaseIdentifiableObject
+{
+/**
+ * The user which owns this UserKeyJsonValue
+ */
+private User user;
+
+/**
+ * A key belongs to a namespace, and represent a value
+ */
+private String key;
+
+/**
+ * A value referenced by a key and user, json-formatted data stored as a string.
+ */
+private String value;
+
+@JsonProperty
+public String getKey()
+{
+return key;
+}
+
+public void setKey( String key )
+{
+this.key = key;
+}
+
+@JsonProperty
+public User getUser()
+{
+return user;
+}
+
+public void setUser( User user )
+{
+t

[Dhis2-devs] DHIS 2 for iNGOs Symposium coming up

2016-02-02 Thread Lars Helge Øverland
Hi all,

The DHIS 2 for iNGOs Symposium is coming up quickly and we've had a great
response so far. We'll have participants from over 35 organizations,
including members from USAID, CDC and WHO.

Day 1 of the Symposium will include a deep dive into four use cases from
PSI, IPPF, Jhpiego and MSF. These organisations will outline their use
cases in terms of context and process and do demos of each system, looking
at features and configuration.

Day 2 of the Symposium will include presentations from PEPFAR on DATIM and
the OpenHIE initiative, JHU NEP

and
Akros .  We'll round out day two by looking at best
practices in implementation roll-out as well as how to locate community
resources and contribute back to the community.

For those who want extra hands-on training, consider signing up for
the *Fundamentals
of DHIS 2* or the *Consuming Data in DHIS 2* course following the
symposium. More info here .

You can register for both here .

See you in Washington, D.C.!

regards,

Lars




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


[Dhis2-devs] Hibernate Exception in scheduled task

2016-02-02 Thread Lorill Crees
Hi,

We have 9 separate DHIS 2 instances that we are managing and I notice that
we are getting a recurring error logged in the tomcat logs on all instances
related to scheduled tasks (stack trace below).

We are using 2.22 revision 21782.

I'm not sure what functionality this is affecting. Should we be concerned?

Thanks,

Lorill

* ERROR 2016-02-02 02:00:00,005 Unexpected error occurred in scheduled
task. (TaskUtils.java [taskScheduler-3])

org.hibernate.HibernateException: Could not obtain transaction-synchronized
Session for current thread

at
org.springframework.orm.hibernate4.SpringSessionContext.currentSession(SpringSessionContext.java:134)

at
org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:993)

at
org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:205)

at
org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:200)

at
org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore.getAllLeCreated(HibernateIdentifiableObjectStore.java:404)

at
org.hisp.dhis.fileresource.DefaultFileResourceService.getOrphanedFileResources(DefaultFileResourceService.java:138)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)

at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)

at com.sun.proxy.$Proxy103.getOrphanedFileResources(Unknown Source)

at
org.hisp.dhis.fileresource.FileResourceCleanUpTask.run(FileResourceCleanUpTask.java:58)

at
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)

at
org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)
___
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] Hibernate Exception in scheduled task

2016-02-02 Thread Knut Staring
Hi Lorill,

This was recently replied to by Halvdan:

https://lists.launchpad.net/dhis2-users/msg09122.html

On Tue, Feb 2, 2016 at 8:18 PM, Lorill Crees  wrote:

> Hi,
>
> We have 9 separate DHIS 2 instances that we are managing and I notice that
> we are getting a recurring error logged in the tomcat logs on all instances
> related to scheduled tasks (stack trace below).
>
> We are using 2.22 revision 21782.
>
> I'm not sure what functionality this is affecting. Should we be concerned?
>
> Thanks,
>
> Lorill
>
> * ERROR 2016-02-02 02:00:00,005 Unexpected error occurred in scheduled
> task. (TaskUtils.java [taskScheduler-3])
>
> org.hibernate.HibernateException: Could not obtain
> transaction-synchronized Session for current thread
>
> at
> org.springframework.orm.hibernate4.SpringSessionContext.currentSession(SpringSessionContext.java:134)
>
> at
> org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:993)
>
> at
> org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:205)
>
> at
> org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:200)
>
> at
> org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore.getAllLeCreated(HibernateIdentifiableObjectStore.java:404)
>
> at
> org.hisp.dhis.fileresource.DefaultFileResourceService.getOrphanedFileResources(DefaultFileResourceService.java:138)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:483)
>
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
>
> at com.sun.proxy.$Proxy103.getOrphanedFileResources(Unknown Source)
>
> at
> org.hisp.dhis.fileresource.FileResourceCleanUpTask.run(FileResourceCleanUpTask.java:58)
>
> at
> org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
>
> at
> org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
>
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>
> at java.lang.Thread.run(Thread.java:745)
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Hibernate Exception in scheduled task

2016-02-02 Thread Lorill Crees
Thanks Knut.

On Tue, Feb 2, 2016 at 12:46 PM, Knut Staring  wrote:

> Hi Lorill,
>
> This was recently replied to by Halvdan:
>
> https://lists.launchpad.net/dhis2-users/msg09122.html
>
> On Tue, Feb 2, 2016 at 8:18 PM, Lorill Crees  wrote:
>
>> Hi,
>>
>> We have 9 separate DHIS 2 instances that we are managing and I notice
>> that we are getting a recurring error logged in the tomcat logs on all
>> instances related to scheduled tasks (stack trace below).
>>
>> We are using 2.22 revision 21782.
>>
>> I'm not sure what functionality this is affecting. Should we be concerned?
>>
>> Thanks,
>>
>> Lorill
>>
>> * ERROR 2016-02-02 02:00:00,005 Unexpected error occurred in scheduled
>> task. (TaskUtils.java [taskScheduler-3])
>>
>> org.hibernate.HibernateException: Could not obtain
>> transaction-synchronized Session for current thread
>>
>> at
>> org.springframework.orm.hibernate4.SpringSessionContext.currentSession(SpringSessionContext.java:134)
>>
>> at
>> org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:993)
>>
>> at
>> org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:205)
>>
>> at
>> org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:200)
>>
>> at
>> org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore.getAllLeCreated(HibernateIdentifiableObjectStore.java:404)
>>
>> at
>> org.hisp.dhis.fileresource.DefaultFileResourceService.getOrphanedFileResources(DefaultFileResourceService.java:138)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>
>> at java.lang.reflect.Method.invoke(Method.java:483)
>>
>> at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>
>> at
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
>>
>> at com.sun.proxy.$Proxy103.getOrphanedFileResources(Unknown Source)
>>
>> at
>> org.hisp.dhis.fileresource.FileResourceCleanUpTask.run(FileResourceCleanUpTask.java:58)
>>
>> at
>> org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
>>
>> at
>> org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
>>
>> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>>
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>>
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>
>> at java.lang.Thread.run(Thread.java:745)
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Hibernate Exception in scheduled task

2016-02-02 Thread Halvdan Grelland
Knut is right. This is a known issue. You will not experience any issues
except for ugly logs once every 24 hours. It will get fixed and backported
soon.
On 2 Feb 2016 9:49 p.m., "Lorill Crees"  wrote:

> Thanks Knut.
>
> On Tue, Feb 2, 2016 at 12:46 PM, Knut Staring  wrote:
>
>> Hi Lorill,
>>
>> This was recently replied to by Halvdan:
>>
>> https://lists.launchpad.net/dhis2-users/msg09122.html
>>
>> On Tue, Feb 2, 2016 at 8:18 PM, Lorill Crees  wrote:
>>
>>> Hi,
>>>
>>> We have 9 separate DHIS 2 instances that we are managing and I notice
>>> that we are getting a recurring error logged in the tomcat logs on all
>>> instances related to scheduled tasks (stack trace below).
>>>
>>> We are using 2.22 revision 21782.
>>>
>>> I'm not sure what functionality this is affecting. Should we be
>>> concerned?
>>>
>>> Thanks,
>>>
>>> Lorill
>>>
>>> * ERROR 2016-02-02 02:00:00,005 Unexpected error occurred in scheduled
>>> task. (TaskUtils.java [taskScheduler-3])
>>>
>>> org.hibernate.HibernateException: Could not obtain
>>> transaction-synchronized Session for current thread
>>>
>>> at
>>> org.springframework.orm.hibernate4.SpringSessionContext.currentSession(SpringSessionContext.java:134)
>>>
>>> at
>>> org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:993)
>>>
>>> at
>>> org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:205)
>>>
>>> at
>>> org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:200)
>>>
>>> at
>>> org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore.getAllLeCreated(HibernateIdentifiableObjectStore.java:404)
>>>
>>> at
>>> org.hisp.dhis.fileresource.DefaultFileResourceService.getOrphanedFileResources(DefaultFileResourceService.java:138)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:483)
>>>
>>> at
>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>>
>>> at
>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
>>>
>>> at com.sun.proxy.$Proxy103.getOrphanedFileResources(Unknown Source)
>>>
>>> at
>>> org.hisp.dhis.fileresource.FileResourceCleanUpTask.run(FileResourceCleanUpTask.java:58)
>>>
>>> at
>>> org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
>>>
>>> at
>>> org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
>>>
>>> at
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>>>
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>
>>> at
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>>>
>>> at
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>>>
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>
>>> at java.lang.Thread.run(Thread.java:745)
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


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

2016-02-02 Thread noreply

revno: 21852
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Tue 2016-02-02 23:45:48 +0100
message:
  Minor
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/Preheat.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/DefaultUserKeyJsonValueService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/hibernate/HibernateUserKeyJsonValueStore.java
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStoreTest.java
  
dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.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/preheat/Preheat.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/Preheat.java	2016-02-01 10:27:53 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/Preheat.java	2016-02-02 22:45:48 +
@@ -56,7 +56,6 @@
 return (T) map.get( identifier ).get( klass ).get( key );
 }
 
-@SuppressWarnings( "unchecked" )
 public  T get( PreheatIdentifier identifier, T object )
 {
 if ( object == null )

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java	2016-02-02 15:41:15 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java	2016-02-02 22:45:48 +
@@ -49,7 +49,7 @@
 private String key;
 
 /**
- * A value referenced by a key and user, json-formatted data stored as a string.
+ * A value referenced by a key and user, JSON-formatted data stored as a string.
  */
 private String value;
 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueService.java	2016-02-02 15:41:15 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueService.java	2016-02-02 22:45:48 +
@@ -37,7 +37,6 @@
  */
 public interface UserKeyJsonValueService
 {
-
 /**
  * Retrieves a list of keys from a user
  * @param user the namespace to retrieve keys from

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java	2016-01-08 16:26:00 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java	2016-02-02 22:45:48 +
@@ -43,7 +43,6 @@
  */
 public final class QueryUtils
 {
-@SuppressWarnings( { "rawtypes", "unchecked" } )
 static public  T getValue( Class klass, Object objectValue )
 {
 return getValue( klass, null, objectValue );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/DefaultUserKeyJsonValueService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/DefaultUserKeyJsonValueService.java	2016-02-02 15:41:15 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/DefaultUserKeyJsonValueService.java	2016-02-02 22:45:48 +
@@ -47,7 +47,8 @@
 this.userKeyJsonValueStore = userKeyJsonValueStore;
 }
 
-public UserKeyJsonValueStore getUserKeyJsonValueStore() {
+public UserKeyJsonValueStore getUserKeyJsonValueStore()
+{
 return this.userKeyJsonValueStore;
 }
 
@@ -86,5 +87,4 @@
 {
 userKeyJsonValueStore.delete( userKeyJsonValue );
 }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/hibernate/HibernateUserKeyJsonValueStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/hibernate/HibernateUserKeyJsonValueStore.java	2016-02-02 15:41:15 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/hibernate/HibernateUserKeyJsonValueStore.java	2016-02-02 22:45:48 +
@@ -45,11 +45,12 @@
 implements UserKeyJsonValueStore
 {
 @Override
+@SuppressWarnings("unchecked")
 public List getKeysByUser( User user )
 {
 return (List) getCriteria(
-Restrictions.eq( "user", user )
-

[Dhis2-devs] [Bug 1541131] [NEW] User filter in add/edit user group not working

2016-02-02 Thread Lars Helge Øverland
Public bug reported:

The user filter in add/edit user group not is working. There is a
mismatch between what the client sends (name:eq:somename) and what the
UserController expects (query).

** Affects: dhis2
 Importance: Medium
 Assignee: Morten Olav Hansen (mortenoh)
 Status: Confirmed

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

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

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

** Changed in: dhis2
   Status: New => Confirmed

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

Title:
  User filter in add/edit user group not working

Status in DHIS:
  Confirmed

Bug description:
  The user filter in add/edit user group not is working. There is a
  mismatch between what the client sends (name:eq:somename) and what the
  UserController expects (query).

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1541131/+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 21854: Minor

2016-02-02 Thread noreply

revno: 21854
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-02-03 00:17:55 +0100
message:
  Minor
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.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-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java	2016-02-02 23:14:48 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java	2016-02-02 23:17:55 +
@@ -289,7 +289,7 @@
 {
 if ( !userService.canAddOrUpdateUser( ugSelected ) )
 {
-throw new AccessDeniedException( "You cannot edit this user" );
+throw new AccessDeniedException( "You cannot add this user" );
 }
 
 User currentUser = currentUserService.getCurrentUser();

___
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 1541132] [NEW] New DE and CC editor switches to right click menu

2016-02-02 Thread Timothy Harding
Public bug reported:

Perhaps have the menu pop up on both? It took me far to long clicking
the "Edit" button under "Public Access" which looks like a short cut to
edit the element to realize that I had to right click, but only for this
app.


(It also prevents the normal right click inside that area, but this is a minor 
inconvenience.)

** Affects: dhis2
 Importance: Undecided
 Status: New

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

Title:
  New DE and CC editor switches to right click menu

Status in DHIS:
  New

Bug description:
  Perhaps have the menu pop up on both? It took me far to long clicking
  the "Edit" button under "Public Access" which looks like a short cut
  to edit the element to realize that I had to right click, but only for
  this app.

  
  (It also prevents the normal right click inside that area, but this is a 
minor inconvenience.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1541132/+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 21853: User management. Impl the 'managed user group' concept in the user module UI.

2016-02-02 Thread noreply

revno: 21853
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2016-02-03 00:14:48 +0100
message:
  User management. Impl the 'managed user group' concept in the user module UI.
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.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-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java	2016-02-02 23:14:48 +
@@ -54,6 +54,7 @@
 import org.hisp.dhis.user.UserSettingService;
 import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.AccessDeniedException;
 
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -286,8 +287,11 @@
 public String execute()
 throws Exception
 {
-//TODO: Allow user with F_USER_ADD_WITHIN_MANAGED_GROUP to add a user within managed groups.
-
+if ( !userService.canAddOrUpdateUser( ugSelected ) )
+{
+throw new AccessDeniedException( "You cannot edit this user" );
+}
+
 User currentUser = currentUserService.getCurrentUser();
 
 // -

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java	2016-02-02 23:14:48 +
@@ -33,6 +33,7 @@
 import org.hisp.dhis.attribute.AttributeService;
 import org.hisp.dhis.attribute.comparator.AttributeSortOrderComparator;
 import org.hisp.dhis.common.DimensionalObject;
+import org.hisp.dhis.common.IdentifiableObjectUtils;
 import org.hisp.dhis.i18n.I18nService;
 import org.hisp.dhis.i18n.locale.LocaleManager;
 import org.hisp.dhis.oust.manager.SelectionTreeManager;
@@ -47,6 +48,7 @@
 import org.hisp.dhis.user.UserSettingKey;
 import org.hisp.dhis.user.UserSettingService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.AccessDeniedException;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -221,6 +223,11 @@
 {
 user = userService.getUser( id );
 
+if ( !userService.canAddOrUpdateUser( IdentifiableObjectUtils.getUids( user.getGroups() ) ) )
+{
+throw new AccessDeniedException( "You cannot edit this user" );
+}
+
 if ( user.hasOrganisationUnit() )
 {
 selectionManager.setSelectedOrganisationUnits( user.getOrganisationUnits() );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java	2016-02-02 23:14:48 +
@@ -50,6 +50,7 @@
 import org.hisp.dhis.user.UserSettingKey;
 import org.hisp.dhis.user.UserSettingService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.AccessDeniedException;
 
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -244,8 +245,11 @@
 public String execute()
 throws Exception
 {
-//TODO: Allow user with F_USER_ADD_WITHIN_MANAGED_GROUP to update a user within managed groups.
-
+if ( !userService.canAddOrUpdateUser( ugSelected ) )
+{
+throw new AccessDeniedException( "You cannot edit this user" );
+}
+
 User currentUser = 

[Dhis2-devs] [Bug 1541132] Re: New DE and CC editor switches to right click menu

2016-02-02 Thread Lars Helge Øverland
Sorry Tim we are not planning to change that per now ;) We plan to use
right-click consistently across the system as we re-implement the
maintenance apps.

** Changed in: dhis2
   Status: New => Won't Fix

** Changed in: dhis2
   Status: Won't Fix => Invalid

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

Title:
  New DE and CC editor switches to right click menu

Status in DHIS:
  Invalid

Bug description:
  Perhaps have the menu pop up on both? It took me far to long clicking
  the "Edit" button under "Public Access" which looks like a short cut
  to edit the element to realize that I had to right click, but only for
  this app.

  
  (It also prevents the normal right click inside that area, but this is a 
minor inconvenience.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1541132/+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] Web API User Query Parameter "manage"

2016-02-02 Thread Lorill Crees
Hi,

We are using the Managed User functionality and see that we can query the
user list via the Web API with the parameter "canManage" (true/false).
/api/users?canManage=true

However some borrowed code that we have is using the parameter "manage"
(true/false).
/api/users?manage=true

I cannot find documentation on the parameter "manage" but it appears to be
filtering the user list on different criteria than the "canManage"
parameter. For example, these are a sample of the return counts for the
different calls:

/api/users (263)
/api/users/canManage=true (66)
/api/users/manage=true(8)

What is the "manage" parameter filtering on, and how is it different than
the "canManage" parameter? Is there documentation on this?
http://dhis2.github.io/dhis2-docs/2.21/en/developer/html/ch01s33.html

Thanks,

Lorill
___
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 21855: Ignore UserKeyJsonValueStoreTest for now

2016-02-02 Thread noreply

revno: 21855
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2016-02-03 09:17:44 +0700
message:
  Ignore UserKeyJsonValueStoreTest for now
modified:
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStoreTest.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStoreTest.java	2016-02-02 22:45:48 +
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStoreTest.java	2016-02-03 02:17:44 +
@@ -30,6 +30,7 @@
 
 import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.user.User;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -40,13 +41,14 @@
 /**
  * @author Stian Sandvold.
  */
-public class UserKeyJsonValueStoreTest 
+@Ignore
+public class UserKeyJsonValueStoreTest
 extends DhisSpringTest
 {
 @Autowired
 private UserKeyJsonValueStore userKeyJsonValueStore;
 
-private User user = userService.getAllUsers().get( 0 );
+private User user; //  = userService.getAllUsers().get( 0 );
 
 @Test
 public void testAddUserKeyJsonValue()

___
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 21856: bugfix for usergroup, search for users

2016-02-02 Thread noreply

revno: 21856
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2016-02-03 09:48:50 +0700
message:
  bugfix for usergroup, search for users
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.selected.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-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2016-02-02 06:34:22 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2016-02-03 02:48:50 +
@@ -44,6 +44,8 @@
 import org.hisp.dhis.importexport.ImportStrategy;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.query.Order;
+import org.hisp.dhis.query.Query;
+import org.hisp.dhis.query.QueryParserException;
 import org.hisp.dhis.schema.descriptors.UserSchemaDescriptor;
 import org.hisp.dhis.security.RestoreOptions;
 import org.hisp.dhis.security.SecurityService;
@@ -103,7 +105,7 @@
 
 @Autowired
 private OrganisationUnitService organisationUnitService;
-
+
 @Autowired
 private UserSettingService userSettingService;
 
@@ -112,7 +114,8 @@
 // -
 
 @Override
-protected List getEntityList( WebMetadata metadata, WebOptions options, List filters, List orders )
+@SuppressWarnings( "unchecked" )
+protected List getEntityList( WebMetadata metadata, WebOptions options, List filters, List orders ) throws QueryParserException
 {
 UserQueryParams params = new UserQueryParams();
 params.setQuery( options.get( "query" ) );
@@ -148,7 +151,13 @@
 params.setMax( pager.getPageSize() );
 }
 
-return userService.getUsers( params );
+List users = userService.getUsers( params );
+
+Query query = queryService.getQueryFromUrl( getEntityClass(), filters, orders );
+query.setDefaultOrder();
+query.setObjects( users );
+
+return (List) queryService.query( query );
 }
 
 @Override
@@ -356,17 +365,17 @@
 // -
 
 List settings = userSettingService.getUserSettings( existingUser );
-
+
 for ( UserSetting setting : settings )
 {
 Optional key = UserSettingKey.getByName( setting.getName() );
-
+
 if ( key.isPresent() )
 {
 userSettingService.saveUserSetting( key.get(), setting.getValue(), userReplica );
-}
+}
 }
-
+
 response.addHeader( "Location", UserSchemaDescriptor.API_ENDPOINT + "/" + userReplica.getUid() );
 webMessageService.send( WebMessageUtils.created( "User replica created" ), response, request );
 }

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.selected.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.selected.js	2016-01-13 08:24:11 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.selected.js	2016-02-03 02:48:50 +
@@ -173,7 +173,7 @@
   };
 
   if( context.like !== undefined && context.like.length > 0 ) {
-request.data.filter = 'name:like:' + context.like;
+request.data.filter = 'displayName:ilike:' + context.like;
   }
 
   context.searchButton.find('i').removeClass('fa-search');

___
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 1541131] Re: User filter in add/edit user group not working

2016-02-02 Thread Morten Olav Hansen
Fixed and backportet to 2.22. Caused by incorrect override of
AbstractCrudController.getEntityList, only custom logic without calling
proper query service to handle filters/orders.

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

Title:
  User filter in add/edit user group not working

Status in DHIS:
  Confirmed

Bug description:
  The user filter in add/edit user group not is working. There is a
  mismatch between what the client sends (name:eq:somename) and what the
  UserController expects (query).

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1541131/+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 21857: bugfix for DataElementCategory.mergeWith, don't merge catcombos.. not owned by DataElementCategory

2016-02-02 Thread noreply

revno: 21857
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2016-02-03 10:30:21 +0700
message:
  bugfix for DataElementCategory.mergeWith, don't merge catcombos.. not owned 
by DataElementCategory
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java	2016-01-11 06:37:10 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java	2016-02-03 03:30:21 +
@@ -269,10 +269,7 @@
 }
 
 removeAllCategoryOptions();
-removeAllCategoryCombos();
-
 category.getCategoryOptions().forEach( this::addCategoryOption );
-category.getCategoryCombos().forEach( this::addCategoryCombo );
 }
 }
 }

___
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 21858: Clear hibernate cache on web-api usergroup updates

2016-02-02 Thread noreply

revno: 21858
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2016-02-03 10:39:31 +0700
message:
  Clear hibernate cache on web-api usergroup updates
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserGroupController.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java	2016-02-02 06:34:22 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java	2016-02-03 03:39:31 +
@@ -35,6 +35,7 @@
 import com.google.common.base.Joiner;
 import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
+import org.hisp.dhis.cache.HibernateCacheManager;
 import org.hisp.dhis.common.BaseIdentifiableObject;
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.IdentifiableObjectManager;
@@ -151,6 +152,9 @@
 @Autowired
 protected WebMessageService webMessageService;
 
+@Autowired
+protected HibernateCacheManager hibernateCacheManager;
+
 //--
 // GET
 //--

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserGroupController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserGroupController.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserGroupController.java	2016-02-03 03:39:31 +
@@ -42,4 +42,9 @@
 public class UserGroupController
 extends AbstractCrudController
 {
+@Override
+protected void postUpdateEntity( UserGroup entity )
+{
+hibernateCacheManager.clearCache();
+}
 }

___
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 1540854] Re: Altering a Category in 2.22 21784 removes it from the assigned category combo

2016-02-02 Thread Morten Olav Hansen
Fixed and backportet to 2.22.

** Changed in: dhis2
   Status: New => Fix Released

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

Title:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

Status in DHIS:
  Fix Released

Bug description:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

  Steps to reproduce
  1. Create a Category
  2. Assign Category to CatCombo
  3. Remove or add an option from the category from step 1
  4. Notice it is no longer a part of the CatCombo Assigned in step 2

  I imagine this might remove it from all the category combos (plural)
  but I haven't tested that far yet

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1540854/+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 21859: Clear hibernate cache for struts user group updates

2016-02-02 Thread noreply

revno: 21859
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2016-02-03 10:43:11 +0700
message:
  Clear hibernate cache for struts user group updates
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/usergroup/UpdateUserGroupAction.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-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/usergroup/UpdateUserGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/usergroup/UpdateUserGroupAction.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/usergroup/UpdateUserGroupAction.java	2016-02-03 03:43:11 +
@@ -31,10 +31,12 @@
 import com.opensymphony.xwork2.Action;
 import org.apache.commons.lang3.StringUtils;
 import org.hisp.dhis.attribute.AttributeService;
+import org.hisp.dhis.cache.HibernateCacheManager;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserGroup;
 import org.hisp.dhis.user.UserGroupService;
 import org.hisp.dhis.user.UserService;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import java.util.HashSet;
 import java.util.List;
@@ -64,6 +66,9 @@
 this.attributeService = attributeService;
 }
 
+@Autowired
+private HibernateCacheManager hibernateCacheManager;
+
 // -
 // Parameters
 // -
@@ -141,6 +146,8 @@
 
 userGroupService.updateUserGroup( userGroup );
 
+hibernateCacheManager.clearCache();
+
 return SUCCESS;
 }
 }

___
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 1540854] Re: Altering a Category in 2.22 21784 removes it from the assigned category combo

2016-02-02 Thread Timothy Harding
Hello Morten, thank you for looking into this

Was the fix deployed in version newer than the current one on playdemo? I
just checked with version: 2.22 21789 in the play demo (built: 2016-02-03
03:26)

and it still did the same thing, I made the following catcombo:
https://play.dhis2.org/demo/api/categoryCombos/ytoc3Hgk19r?fields=name,id,categories[name,id,categoryOptions[name,id]],categoryOptionCombos[name,id]
[image: Inline image 1]

Then I removed three of the cat options from the category and this is what
happened:

[image: Inline image 2]

If you check the category, you will see it has the proper catoption
assignment:

[image: Inline image 3]

But it still is getting punted out of the catcombo.


*Timothy Harding*
Sr. Systems Analyst, BAO Systems
+1 202-536-1541 | thard...@baosystems.com | http://www.baosystems.com | Skype:
hardi...@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007

On Wed, Feb 3, 2016 at 10:31 AM, Morten Olav Hansen <
1540...@bugs.launchpad.net> wrote:

> Fixed and backportet to 2.22.
>
> ** Changed in: dhis2
>Status: New => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1540854
>
> Title:
>   Altering a Category in 2.22 21784 removes it from the assigned
>   category combo
>
> Status in DHIS:
>   Fix Released
>
> Bug description:
>   Altering a Category in 2.22 21784 removes it from the assigned
>   category combo
>
>   Steps to reproduce
>   1. Create a Category
>   2. Assign Category to CatCombo
>   3. Remove or add an option from the category from step 1
>   4. Notice it is no longer a part of the CatCombo Assigned in step 2
>
>   I imagine this might remove it from all the category combos (plural)
>   but I haven't tested that far yet
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1540854/+subscriptions
>


** Attachment added: "Screen Shot 2016-02-03 at 11.39.48 AM.png"
   
https://bugs.launchpad.net/bugs/1540854/+attachment/4562667/+files/Screen%20Shot%202016-02-03%20at%2011.39.48%20AM.png

** Attachment added: "Screen Shot 2016-02-03 at 11.40.46 AM.png"
   
https://bugs.launchpad.net/bugs/1540854/+attachment/4562668/+files/Screen%20Shot%202016-02-03%20at%2011.40.46%20AM.png

** Attachment added: "PastedGraphic-1.png"
   
https://bugs.launchpad.net/bugs/1540854/+attachment/4562669/+files/PastedGraphic-1.png

** Attachment added: "Screen Shot 2016-02-03 at 11.36.37 AM.png"
   
https://bugs.launchpad.net/bugs/1540854/+attachment/4562670/+files/Screen%20Shot%202016-02-03%20at%2011.36.37%20AM.png

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

Title:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

Status in DHIS:
  Fix Released

Bug description:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

  Steps to reproduce
  1. Create a Category
  2. Assign Category to CatCombo
  3. Remove or add an option from the category from step 1
  4. Notice it is no longer a part of the CatCombo Assigned in step 2

  I imagine this might remove it from all the category combos (plural)
  but I haven't tested that far yet

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

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


Re: [Dhis2-devs] [Bug 1540854] Re: Altering a Category in 2.22 21784 removes it from the assigned category combo

2016-02-02 Thread Morten Olav Hansen
You need to be on 21790 or later

--
Morten

On Wed, Feb 3, 2016 at 11:43 AM, Timothy Harding 
wrote:

> Hello Morten, thank you for looking into this
>
> Was the fix deployed in version newer than the current one on playdemo? I
> just checked with version: 2.22 21789 in the play demo (built: 2016-02-03
> 03:26)
>
> and it still did the same thing, I made the following catcombo:
>
> https://play.dhis2.org/demo/api/categoryCombos/ytoc3Hgk19r?fields=name,id,categories[name,id,categoryOptions[name,id]],categoryOptionCombos[name,id]
> [image: Inline image 1]
>
> Then I removed three of the cat options from the category and this is what
> happened:
>
> [image: Inline image 2]
>
> If you check the category, you will see it has the proper catoption
> assignment:
>
> [image: Inline image 3]
>
> But it still is getting punted out of the catcombo.
>
>
> *Timothy Harding*
> Sr. Systems Analyst, BAO Systems
> +1 202-536-1541 | thard...@baosystems.com | http://www.baosystems.com |
> Skype:
> hardi...@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007
>
> On Wed, Feb 3, 2016 at 10:31 AM, Morten Olav Hansen <
> 1540...@bugs.launchpad.net> wrote:
>
> > Fixed and backportet to 2.22.
> >
> > ** Changed in: dhis2
> >Status: New => Fix Released
> >
> > --
> > You received this bug notification because you are subscribed to the bug
> > report.
> > https://bugs.launchpad.net/bugs/1540854
> >
> > Title:
> >   Altering a Category in 2.22 21784 removes it from the assigned
> >   category combo
> >
> > Status in DHIS:
> >   Fix Released
> >
> > Bug description:
> >   Altering a Category in 2.22 21784 removes it from the assigned
> >   category combo
> >
> >   Steps to reproduce
> >   1. Create a Category
> >   2. Assign Category to CatCombo
> >   3. Remove or add an option from the category from step 1
> >   4. Notice it is no longer a part of the CatCombo Assigned in step 2
> >
> >   I imagine this might remove it from all the category combos (plural)
> >   but I haven't tested that far yet
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/dhis2/+bug/1540854/+subscriptions
> >
>
>
> ** Attachment added: "Screen Shot 2016-02-03 at 11.39.48 AM.png"
>
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562667/+files/Screen%20Shot%202016-02-03%20at%2011.39.48%20AM.png
>
> ** Attachment added: "Screen Shot 2016-02-03 at 11.40.46 AM.png"
>
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562668/+files/Screen%20Shot%202016-02-03%20at%2011.40.46%20AM.png
>
> ** Attachment added: "PastedGraphic-1.png"
>
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562669/+files/PastedGraphic-1.png
>
> ** Attachment added: "Screen Shot 2016-02-03 at 11.36.37 AM.png"
>
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562670/+files/Screen%20Shot%202016-02-03%20at%2011.36.37%20AM.png
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1540854
>
> Title:
>   Altering a Category in 2.22 21784 removes it from the assigned
>   category combo
>
> Status in DHIS:
>   Fix Released
>
> Bug description:
>   Altering a Category in 2.22 21784 removes it from the assigned
>   category combo
>
>   Steps to reproduce
>   1. Create a Category
>   2. Assign Category to CatCombo
>   3. Remove or add an option from the category from step 1
>   4. Notice it is no longer a part of the CatCombo Assigned in step 2
>
>   I imagine this might remove it from all the category combos (plural)
>   but I haven't tested that far yet
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1540854/+subscriptions
>

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

Title:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

Status in DHIS:
  Fix Released

Bug description:
  Altering a Category in 2.22 21784 removes it from the assigned
  category combo

  Steps to reproduce
  1. Create a Category
  2. Assign Category to CatCombo
  3. Remove or add an option from the category from step 1
  4. Notice it is no longer a part of the CatCombo Assigned in step 2

  I imagine this might remove it from all the category combos (plural)
  but I haven't tested that far yet

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

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


Re: [Dhis2-devs] [Bug 1540854] Re: Altering a Category in 2.22 21784 removes it from the assigned category combo

2016-02-02 Thread Timothy Harding
Okay, ill get that downloaded here soon. Thanks for the update!!!

Timothy Harding on Mobile
On Feb 3, 2016 12:10 PM, "Morten Olav Hansen" <1540...@bugs.launchpad.net>
wrote:

> You need to be on 21790 or later
>
> --
> Morten
>
> On Wed, Feb 3, 2016 at 11:43 AM, Timothy Harding 
> wrote:
>
> > Hello Morten, thank you for looking into this
> >
> > Was the fix deployed in version newer than the current one on playdemo? I
> > just checked with version: 2.22 21789 in the play demo (built: 2016-02-03
> > 03:26)
> >
> > and it still did the same thing, I made the following catcombo:
> >
> >
> https://play.dhis2.org/demo/api/categoryCombos/ytoc3Hgk19r?fields=name,id,categories[name,id,categoryOptions[name,id]],categoryOptionCombos[name,id]
> > [image: Inline image 1]
> >
> > Then I removed three of the cat options from the category and this is
> what
> > happened:
> >
> > [image: Inline image 2]
> >
> > If you check the category, you will see it has the proper catoption
> > assignment:
> >
> > [image: Inline image 3]
> >
> > But it still is getting punted out of the catcombo.
> >
> >
> > *Timothy Harding*
> > Sr. Systems Analyst, BAO Systems
> > +1 202-536-1541 | thard...@baosystems.com | http://www.baosystems.com |
> > Skype:
> > hardi...@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007
> >
> > On Wed, Feb 3, 2016 at 10:31 AM, Morten Olav Hansen <
> > 1540...@bugs.launchpad.net> wrote:
> >
> > > Fixed and backportet to 2.22.
> > >
> > > ** Changed in: dhis2
> > >Status: New => Fix Released
> > >
> > > --
> > > You received this bug notification because you are subscribed to the
> bug
> > > report.
> > > https://bugs.launchpad.net/bugs/1540854
> > >
> > > Title:
> > >   Altering a Category in 2.22 21784 removes it from the assigned
> > >   category combo
> > >
> > > Status in DHIS:
> > >   Fix Released
> > >
> > > Bug description:
> > >   Altering a Category in 2.22 21784 removes it from the assigned
> > >   category combo
> > >
> > >   Steps to reproduce
> > >   1. Create a Category
> > >   2. Assign Category to CatCombo
> > >   3. Remove or add an option from the category from step 1
> > >   4. Notice it is no longer a part of the CatCombo Assigned in step 2
> > >
> > >   I imagine this might remove it from all the category combos (plural)
> > >   but I haven't tested that far yet
> > >
> > > To manage notifications about this bug go to:
> > > https://bugs.launchpad.net/dhis2/+bug/1540854/+subscriptions
> > >
> >
> >
> > ** Attachment added: "Screen Shot 2016-02-03 at 11.39.48 AM.png"
> >
> >
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562667/+files/Screen%20Shot%202016-02-03%20at%2011.39.48%20AM.png
> >
> > ** Attachment added: "Screen Shot 2016-02-03 at 11.40.46 AM.png"
> >
> >
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562668/+files/Screen%20Shot%202016-02-03%20at%2011.40.46%20AM.png
> >
> > ** Attachment added: "PastedGraphic-1.png"
> >
> >
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562669/+files/PastedGraphic-1.png
> >
> > ** Attachment added: "Screen Shot 2016-02-03 at 11.36.37 AM.png"
> >
> >
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562670/+files/Screen%20Shot%202016-02-03%20at%2011.36.37%20AM.png
> >
> > --
> > You received this bug notification because you are a bug assignee.
> > https://bugs.launchpad.net/bugs/1540854
> >
> > Title:
> >   Altering a Category in 2.22 21784 removes it from the assigned
> >   category combo
> >
> > Status in DHIS:
> >   Fix Released
> >
> > Bug description:
> >   Altering a Category in 2.22 21784 removes it from the assigned
> >   category combo
> >
> >   Steps to reproduce
> >   1. Create a Category
> >   2. Assign Category to CatCombo
> >   3. Remove or add an option from the category from step 1
> >   4. Notice it is no longer a part of the CatCombo Assigned in step 2
> >
> >   I imagine this might remove it from all the category combos (plural)
> >   but I haven't tested that far yet
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/dhis2/+bug/1540854/+subscriptions
> >
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1540854
>
> Title:
>   Altering a Category in 2.22 21784 removes it from the assigned
>   category combo
>
> Status in DHIS:
>   Fix Released
>
> Bug description:
>   Altering a Category in 2.22 21784 removes it from the assigned
>   category combo
>
>   Steps to reproduce
>   1. Create a Category
>   2. Assign Category to CatCombo
>   3. Remove or add an option from the category from step 1
>   4. Notice it is no longer a part of the CatCombo Assigned in step 2
>
>   I imagine this might remove it from all the category combos (plural)
>   but I haven't tested that far yet
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1540854/+subscriptions
>

-- 
You received this bug notification because you are a member of DHIS 2
developers, whic

Re: [Dhis2-devs] [Bug 1540854] Re: Altering a Category in 2.22 21784 removes it from the assigned category combo

2016-02-02 Thread Morten Olav Hansen
/demo is on 21792 now, so should be OK

--
Morten

On Wed, Feb 3, 2016 at 12:23 PM, Timothy Harding 
wrote:

> Okay, ill get that downloaded here soon. Thanks for the update!!!
>
> Timothy Harding on Mobile
> On Feb 3, 2016 12:10 PM, "Morten Olav Hansen" <1540...@bugs.launchpad.net>
> wrote:
>
> > You need to be on 21790 or later
> >
> > --
> > Morten
> >
> > On Wed, Feb 3, 2016 at 11:43 AM, Timothy Harding <
> thard...@baosystems.com>
> > wrote:
> >
> > > Hello Morten, thank you for looking into this
> > >
> > > Was the fix deployed in version newer than the current one on
> playdemo? I
> > > just checked with version: 2.22 21789 in the play demo (built:
> 2016-02-03
> > > 03:26)
> > >
> > > and it still did the same thing, I made the following catcombo:
> > >
> > >
> >
> https://play.dhis2.org/demo/api/categoryCombos/ytoc3Hgk19r?fields=name,id,categories[name,id,categoryOptions[name,id]],categoryOptionCombos[name,id]
> > > [image: Inline image 1]
> > >
> > > Then I removed three of the cat options from the category and this is
> > what
> > > happened:
> > >
> > > [image: Inline image 2]
> > >
> > > If you check the category, you will see it has the proper catoption
> > > assignment:
> > >
> > > [image: Inline image 3]
> > >
> > > But it still is getting punted out of the catcombo.
> > >
> > >
> > > *Timothy Harding*
> > > Sr. Systems Analyst, BAO Systems
> > > +1 202-536-1541 | thard...@baosystems.com | http://www.baosystems.com
> |
> > > Skype:
> > > hardi...@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007
> > >
> > > On Wed, Feb 3, 2016 at 10:31 AM, Morten Olav Hansen <
> > > 1540...@bugs.launchpad.net> wrote:
> > >
> > > > Fixed and backportet to 2.22.
> > > >
> > > > ** Changed in: dhis2
> > > >Status: New => Fix Released
> > > >
> > > > --
> > > > You received this bug notification because you are subscribed to the
> > bug
> > > > report.
> > > > https://bugs.launchpad.net/bugs/1540854
> > > >
> > > > Title:
> > > >   Altering a Category in 2.22 21784 removes it from the assigned
> > > >   category combo
> > > >
> > > > Status in DHIS:
> > > >   Fix Released
> > > >
> > > > Bug description:
> > > >   Altering a Category in 2.22 21784 removes it from the assigned
> > > >   category combo
> > > >
> > > >   Steps to reproduce
> > > >   1. Create a Category
> > > >   2. Assign Category to CatCombo
> > > >   3. Remove or add an option from the category from step 1
> > > >   4. Notice it is no longer a part of the CatCombo Assigned in step 2
> > > >
> > > >   I imagine this might remove it from all the category combos
> (plural)
> > > >   but I haven't tested that far yet
> > > >
> > > > To manage notifications about this bug go to:
> > > > https://bugs.launchpad.net/dhis2/+bug/1540854/+subscriptions
> > > >
> > >
> > >
> > > ** Attachment added: "Screen Shot 2016-02-03 at 11.39.48 AM.png"
> > >
> > >
> >
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562667/+files/Screen%20Shot%202016-02-03%20at%2011.39.48%20AM.png
> > >
> > > ** Attachment added: "Screen Shot 2016-02-03 at 11.40.46 AM.png"
> > >
> > >
> >
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562668/+files/Screen%20Shot%202016-02-03%20at%2011.40.46%20AM.png
> > >
> > > ** Attachment added: "PastedGraphic-1.png"
> > >
> > >
> >
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562669/+files/PastedGraphic-1.png
> > >
> > > ** Attachment added: "Screen Shot 2016-02-03 at 11.36.37 AM.png"
> > >
> > >
> >
> https://bugs.launchpad.net/bugs/1540854/+attachment/4562670/+files/Screen%20Shot%202016-02-03%20at%2011.36.37%20AM.png
> > >
> > > --
> > > You received this bug notification because you are a bug assignee.
> > > https://bugs.launchpad.net/bugs/1540854
> > >
> > > Title:
> > >   Altering a Category in 2.22 21784 removes it from the assigned
> > >   category combo
> > >
> > > Status in DHIS:
> > >   Fix Released
> > >
> > > Bug description:
> > >   Altering a Category in 2.22 21784 removes it from the assigned
> > >   category combo
> > >
> > >   Steps to reproduce
> > >   1. Create a Category
> > >   2. Assign Category to CatCombo
> > >   3. Remove or add an option from the category from step 1
> > >   4. Notice it is no longer a part of the CatCombo Assigned in step 2
> > >
> > >   I imagine this might remove it from all the category combos (plural)
> > >   but I haven't tested that far yet
> > >
> > > To manage notifications about this bug go to:
> > > https://bugs.launchpad.net/dhis2/+bug/1540854/+subscriptions
> > >
> >
> > --
> > You received this bug notification because you are subscribed to the bug
> > report.
> > https://bugs.launchpad.net/bugs/1540854
> >
> > Title:
> >   Altering a Category in 2.22 21784 removes it from the assigned
> >   category combo
> >
> > Status in DHIS:
> >   Fix Released
> >
> > Bug description:
> >   Altering a Category in 2.22 21784 removes it from the assigned
> >   category combo
> >
> >   Steps to reproduce
> >   1. Create a Category
> >   2. Assign Category to CatC

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21860: extend /api/metadata/export endpoint to support pr class fields, filter, order

2016-02-02 Thread noreply

revno: 21860
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2016-02-03 13:57:11 +0700
message:
  extend /api/metadata/export endpoint to support pr class fields, filter, order
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryParserException.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/MetadataExportParams.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/MetadataExportService.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/metadata/MetadataExportController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/service/ContextService.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/service/DefaultContextService.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryParserException.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryParserException.java	2016-01-04 02:27:49 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryParserException.java	2016-02-03 06:57:11 +
@@ -31,7 +31,7 @@
 /**
  * @author Morten Olav Hansen 
  */
-public class QueryParserException extends Exception
+public class QueryParserException extends RuntimeException
 {
 public QueryParserException( String message )
 {

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java	2016-01-27 09:06:30 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java	2016-02-03 06:57:11 +
@@ -28,14 +28,17 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Sets;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.IdentifiableObject;
+import org.hisp.dhis.dxf2.common.OrderParams;
 import org.hisp.dhis.fieldfilter.FieldFilterService;
 import org.hisp.dhis.node.NodeUtils;
 import org.hisp.dhis.node.types.RootNode;
 import org.hisp.dhis.node.types.SimpleNode;
 import org.hisp.dhis.query.Query;
+import org.hisp.dhis.query.QueryParserException;
 import org.hisp.dhis.query.QueryService;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaService;
@@ -44,6 +47,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -138,17 +142,82 @@
 
 @Override
 @SuppressWarnings( "unchecked" )
-public MetadataExportParams getParamsFromMap( Map parameters )
+public MetadataExportParams getParamsFromMap( Map> parameters )
 {
 MetadataExportParams params = new MetadataExportParams();
-
-for ( String p : parameters.keySet() )
-{
-Schema schema = schemaService.getSchemaByPluralName( p );
-
-if ( schema != null && schema.isIdentifiableObject() && "true".equalsIgnoreCase( parameters.get( p ) ) )
-{
-params.addClass( (Class) schema.getKlass() );
+Map, Map>> map = new HashMap<>();
+
+for ( String parameterKey : parameters.keySet() )
+{
+String[] parameter = parameterKey.split( ":" );
+Schema schema = schemaService.getSchemaByPluralName( parameter[0] );
+
+if ( schema == null || !schema.isIdentifiableObject() )
+{
+continue;
+}
+
+Class klass = (Class) schema.getKlass();
+
+// class is enabled if value = true, or fields/filter/order is present
+if ( "true".equalsIgnoreCase( parameters.get( parameterKey ).get( 0 ) ) || (parameter.length > 1 && ("fields".equalsIgnoreCase( parameter[1] )
+|| "filter".equalsIgnoreCase( parameter[1] ) || "order".equalsIgnoreCase( parameter[1] ))) )
+{
+if ( !map.containsKey( klass ) ) map.put( klass, new HashMap<>() );
+}
+else
+{
+continue;
+}
+
+if ( "fields".equalsIgnoreCase( parameter[1] ) )
+{
+if ( !map.get( klass ).containsKey( "fields" ) ) m

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21861: support default fields, filter, order in metadata export /api/metadata/export

2016-02-02 Thread noreply

revno: 21861
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2016-02-03 14:29:14 +0700
message:
  support default fields, filter, order in metadata export /api/metadata/export
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/MetadataExportParams.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/metadata2/DefaultMetadataExportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java	2016-02-03 06:57:11 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java	2016-02-03 07:29:14 +
@@ -38,7 +38,6 @@
 import org.hisp.dhis.node.types.RootNode;
 import org.hisp.dhis.node.types.SimpleNode;
 import org.hisp.dhis.query.Query;
-import org.hisp.dhis.query.QueryParserException;
 import org.hisp.dhis.query.QueryService;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaService;
@@ -99,8 +98,10 @@
 }
 else
 {
-Schema schema = schemaService.getDynamicSchema( klass );
-query = Query.from( schema );
+OrderParams orderParams = new OrderParams();
+orderParams.setOrder( Sets.newHashSet( params.getDefaultOrder() ) );
+query = queryService.getQueryFromUrl( klass, params.getDefaultFilter(), orderParams.getOrders( schemaService.getDynamicSchema( klass ) ) );
+query.setDefaultOrder();
 }
 
 if ( query.getUser() == null )
@@ -147,6 +148,24 @@
 MetadataExportParams params = new MetadataExportParams();
 Map, Map>> map = new HashMap<>();
 
+if ( parameters.containsKey( "fields" ) )
+{
+params.setDefaultFields( parameters.get( "fields" ) );
+parameters.remove( "fields" );
+}
+
+if ( parameters.containsKey( "filter" ) )
+{
+params.setDefaultFilter( parameters.get( "filter" ) );
+parameters.remove( "filter" );
+}
+
+if ( parameters.containsKey( "order" ) )
+{
+params.setDefaultOrder( parameters.get( "order" ) );
+parameters.remove( "order" );
+}
+
 for ( String parameterKey : parameters.keySet() )
 {
 String[] parameter = parameterKey.split( ":" );
@@ -170,22 +189,25 @@
 continue;
 }
 
-if ( "fields".equalsIgnoreCase( parameter[1] ) )
-{
-if ( !map.get( klass ).containsKey( "fields" ) ) map.get( klass ).put( "fields", new ArrayList<>() );
-map.get( klass ).get( "fields" ).addAll( parameters.get( parameterKey ) );
-}
-
-if ( "filter".equalsIgnoreCase( parameter[1] ) )
-{
-if ( !map.get( klass ).containsKey( "filter" ) ) map.get( klass ).put( "filter", new ArrayList<>() );
-map.get( klass ).get( "filter" ).addAll( parameters.get( parameterKey ) );
-}
-
-if ( "order".equalsIgnoreCase( parameter[1] ) )
-{
-if ( !map.get( klass ).containsKey( "order" ) ) map.get( klass ).put( "order", new ArrayList<>() );
-map.get( klass ).get( "order" ).addAll( parameters.get( parameterKey ) );
+if ( parameter.length > 1 )
+{
+if ( "fields".equalsIgnoreCase( parameter[1] ) )
+{
+if ( !map.get( klass ).containsKey( "fields" ) ) map.get( klass ).put( "fields", new ArrayList<>() );
+map.get( klass ).get( "fields" ).addAll( parameters.get( parameterKey ) );
+}
+
+if ( "filter".equalsIgnoreCase( parameter[1] ) )
+{
+if ( !map.get( klass ).containsKey( "filter" ) ) map.get( klass ).put( "filter", new ArrayList<>() );
+map.get( klass ).get( "filter" ).addAll( parameters.get( parameterKey ) );
+}
+
+if ( "order".equalsIgnoreCase( parameter[1] ) )
+{
+if ( !map.get( klass ).containsKey( "order" ) ) map.get( klass ).put( "order", new ArrayList<>() );
+map.get( klass ).get( "order" ).addAll( parameters.get( parameterKey ) );
+}
 }
 }
 
@@ -204,11 +226,13 @@
 orderParams.setOrder( Sets.newHashSet( classMap

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 21862: Minor fixes

2016-02-02 Thread noreply

revno: 21862
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2016-02-03 14:40:27 +0700
message:
  Minor fixes
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/OrderParams.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.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/common/OrderParams.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/OrderParams.java	2016-01-05 09:05:54 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/OrderParams.java	2016-02-03 07:40:27 +
@@ -52,6 +52,11 @@
 {
 }
 
+public OrderParams( Set order )
+{
+this.order = order;
+}
+
 public void setOrder( Set order )
 {
 this.order = order;

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java	2016-02-03 07:29:14 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java	2016-02-03 07:40:27 +
@@ -98,10 +98,8 @@
 }
 else
 {
-OrderParams orderParams = new OrderParams();
-orderParams.setOrder( Sets.newHashSet( params.getDefaultOrder() ) );
+OrderParams orderParams = new OrderParams( Sets.newHashSet( params.getDefaultOrder() ) );
 query = queryService.getQueryFromUrl( klass, params.getDefaultFilter(), orderParams.getOrders( schemaService.getDynamicSchema( klass ) ) );
-query.setDefaultOrder();
 }
 
 if ( query.getUser() == null )
@@ -109,6 +107,7 @@
 query.setUser( defaultUser );
 }
 
+query.setDefaultOrder();
 List objects = queryService.query( query );
 log.info( "Exported " + objects.size() + " objects of type " + klass.getSimpleName() );
 metadata.put( klass, objects );
@@ -222,9 +221,7 @@
 
 if ( classMap.containsKey( "filter" ) && classMap.containsKey( "order" ) )
 {
-OrderParams orderParams = new OrderParams();
-orderParams.setOrder( Sets.newHashSet( classMap.get( "order" ) ) );
-
+OrderParams orderParams = new OrderParams( Sets.newHashSet( classMap.get( "order" ) ) );
 Query query = queryService.getQueryFromUrl( klass, classMap.get( "filter" ), orderParams.getOrders( schema ) );
 query.setDefaultOrder();
 params.addQuery( query );

___
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