Re: [Dhis2-devs] Defect in metadata import for optionSets?

2014-12-01 Thread Simanta Jyoti Handique
Hi Morten,

Some more information on this:

On an empty DHIS database, I ran the options payload only.
{
  options: [{
code: b64365ac185,
id: b64365ac185,
name: One
}, {
code: b65ad0e22c5,
id: b65ad0e22c5,
name: One
}]
}

After that, I loaded /api/options.json and found only one entry, the option
with code b65ad0e22c5. The first option was missing. It seems to be using
the name attribute (and not the code) to determine whether to create or
update the entry. Is this by design?

Regards,
Simanta



On Sat, Nov 29, 2014 at 11:55 AM, Morten Olav Hansen morte...@gmail.com
wrote:

 Hi

 Please remember that the way we handle options/optionSets have been
 changed now. You need to have options option code=codea name=Option
 A / /options optionSets optionSet optionsoption code=codea /
 /options /optionSets

 This now works as any other metadata... you first define the options, then
 create optionsets with references to these options.. this allow for option
 reuse, and also translation

 --
 Morten

 On Fri, Nov 28, 2014 at 4:28 PM, Mansi Singhal msing...@thoughtworks.com
 wrote:


 Hello Lars,

 We are trying to create 'options' and 'optionSets' on empty Database.

 Request Payload:

 {
 optionSets: [{
 id: b73c773,
 name: Hours,
 options: [{
 code: b64365ac185,
 id: b64365ac185,
 name: One
 }]
 }, {
 id: b640fd0cc0f,
 name: Minutes,
 options: [{
 code: b65ad0e22c5,
 id: b65ad0e22c5,
 name: One
 }]
 }],
 options: [{
 code: b64365ac185,
 id: b64365ac185,
 name: One
 }, {
 code: b65ad0e22c5,
 id: b65ad0e22c5,
 name: One
 }]
 }

 Api Call: /api/metadata

 After the api call, the Hour option set is empty while the Minute option
 set has One.
 Is this a defect in DHIS or we are missing something in our payload ?
 --
 Regards,
 Mansi Singhal

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



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


Re: [Dhis2-devs] Defect in metadata import for optionSets?

2014-12-01 Thread Morten Olav Hansen
This is now fixed in the latest trunk + 2.17

--
Morten

On Mon, Dec 1, 2014 at 3:19 PM, Simanta Jyoti Handique 
shandi...@thoughtworks.com wrote:

 Hi Morten,

 Some more information on this:

 On an empty DHIS database, I ran the options payload only.
 {
   options: [{
 code: b64365ac185,
 id: b64365ac185,
 name: One
 }, {
 code: b65ad0e22c5,
 id: b65ad0e22c5,
 name: One
 }]
 }

 After that, I loaded /api/options.json and found only one entry, the
 option with code b65ad0e22c5. The first option was missing. It seems to
 be using the name attribute (and not the code) to determine whether to
 create or update the entry. Is this by design?

 Regards,
 Simanta



 On Sat, Nov 29, 2014 at 11:55 AM, Morten Olav Hansen morte...@gmail.com
 wrote:

 Hi

 Please remember that the way we handle options/optionSets have been
 changed now. You need to have options option code=codea name=Option
 A / /options optionSets optionSet optionsoption code=codea /
 /options /optionSets

 This now works as any other metadata... you first define the options,
 then create optionsets with references to these options.. this allow for
 option reuse, and also translation

 --
 Morten

 On Fri, Nov 28, 2014 at 4:28 PM, Mansi Singhal msing...@thoughtworks.com
  wrote:


 Hello Lars,

 We are trying to create 'options' and 'optionSets' on empty Database.

 Request Payload:

 {
 optionSets: [{
 id: b73c773,
 name: Hours,
 options: [{
 code: b64365ac185,
 id: b64365ac185,
 name: One
 }]
 }, {
 id: b640fd0cc0f,
 name: Minutes,
 options: [{
 code: b65ad0e22c5,
 id: b65ad0e22c5,
 name: One
 }]
 }],
 options: [{
 code: b64365ac185,
 id: b64365ac185,
 name: One
 }, {
 code: b65ad0e22c5,
 id: b65ad0e22c5,
 name: One
 }]
 }

 Api Call: /api/metadata

 After the api call, the Hour option set is empty while the Minute option
 set has One.
 Is this a defect in DHIS or we are missing something in our payload ?
 --
 Regards,
 Mansi Singhal

 ___
 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 17634: set unique-names = false on Option class

2014-12-01 Thread noreply

revno: 17634
committer: Morten Olav Hansen morte...@gmail.com
branch nick: dhis2
timestamp: Mon 2014-12-01 15:36:34 +0700
message:
  set unique-names = false on Option class
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/Option.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/option/Option.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/Option.java	2014-11-11 06:54:03 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/Option.java	2014-12-01 08:36:34 +
@@ -53,6 +53,12 @@
 }
 
 @Override
+public boolean haveUniqueNames()
+{
+return false;
+}
+
+@Override
 public boolean haveUniqueCode()
 {
 return false;

___
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] DHIS 2.17 - Tracker Input Type Error

2014-12-01 Thread Pamod Amarakoon
Dear All,

Following upgrade of DHIS2 instance to 2.17 from 2.16 I'm experiencing
input type error for data inserted into tracker data entry form as follows.





Data elements have been defined in number format.

I have another instance of tracker data entry form which also receives same
error on data input.

What may be causing this?

Thanks a lot .

-- 
Pamod
___
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] Server Periods not Syncing with the user Date settings

2014-12-01 Thread Prosper BT
Dear Developers,

I have always known that this problem exists, but when it begins messing up
data analytics then we need to worry and look out for a permanent solution
to this problem.

What is happening is that for say monthly reporting, if an enduser sets his
date in the future, he can enter future data and when you do analytics that
data will be missed out  for a particular past month.

Shouldn't the system be restricting periods as picked from the central
server? but having suggested that we also worry about offline entry unless
we are able to sync periods together with Orgunits and Data sets?

Regards

-- 
Prosper Behumbiize, MPH
Phone:+256 414 320076
Cell: +256 772 139037
 +256 752 751776
___
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] Defect in metadata import for optionSets?

2014-12-01 Thread Simanta Jyoti Handique
Great, thanks!

On Mon, Dec 1, 2014 at 2:06 PM, Morten Olav Hansen morte...@gmail.com
wrote:

 This is now fixed in the latest trunk + 2.17

 --
 Morten

 On Mon, Dec 1, 2014 at 3:19 PM, Simanta Jyoti Handique 
 shandi...@thoughtworks.com wrote:

 Hi Morten,

 Some more information on this:

 On an empty DHIS database, I ran the options payload only.
 {
   options: [{
 code: b64365ac185,
 id: b64365ac185,
 name: One
 }, {
 code: b65ad0e22c5,
 id: b65ad0e22c5,
 name: One
 }]
 }

 After that, I loaded /api/options.json and found only one entry, the
 option with code b65ad0e22c5. The first option was missing. It seems to
 be using the name attribute (and not the code) to determine whether to
 create or update the entry. Is this by design?

 Regards,
 Simanta



 On Sat, Nov 29, 2014 at 11:55 AM, Morten Olav Hansen morte...@gmail.com
 wrote:

 Hi

 Please remember that the way we handle options/optionSets have been
 changed now. You need to have options option code=codea name=Option
 A / /options optionSets optionSet optionsoption code=codea /
 /options /optionSets

 This now works as any other metadata... you first define the options,
 then create optionsets with references to these options.. this allow for
 option reuse, and also translation

 --
 Morten

 On Fri, Nov 28, 2014 at 4:28 PM, Mansi Singhal 
 msing...@thoughtworks.com wrote:


 Hello Lars,

 We are trying to create 'options' and 'optionSets' on empty Database.

 Request Payload:

 {
 optionSets: [{
 id: b73c773,
 name: Hours,
 options: [{
 code: b64365ac185,
 id: b64365ac185,
 name: One
 }]
 }, {
 id: b640fd0cc0f,
 name: Minutes,
 options: [{
 code: b65ad0e22c5,
 id: b65ad0e22c5,
 name: One
 }]
 }],
 options: [{
 code: b64365ac185,
 id: b64365ac185,
 name: One
 }, {
 code: b65ad0e22c5,
 id: b65ad0e22c5,
 name: One
 }]
 }

 Api Call: /api/metadata

 After the api call, the Hour option set is empty while the Minute
 option set has One.
 Is this a defect in DHIS or we are missing something in our payload ?
 --
 Regards,
 Mansi Singhal

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





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


Re: [Dhis2-devs] Server Periods not Syncing with the user Date settings

2014-12-01 Thread Lars Helge Øverland
Hi Prosper,

you are right. Since data entry works offline we need to use the client
clock for the data entry periods. However we can do

- a check on the client side comparing server time to client computer time
and ask the user to update if not in sync.

- a check on the server when saving data using the data set(s) of the data
elements and look for restrictions for future data. If the data set is
locked for future periods we can deny saving of data.

Blueprint here:
https://blueprints.launchpad.net/dhis2/+spec/future-data-check

We can put it in for 2.18.

Lars




On Mon, Dec 1, 2014 at 11:34 AM, Prosper BT ptb3...@gmail.com wrote:

 Dear Developers,

 I have always known that this problem exists, but when it begins messing
 up data analytics then we need to worry and look out for a permanent
 solution to this problem.

 What is happening is that for say monthly reporting, if an enduser sets
 his date in the future, he can enter future data and when you do analytics
 that data will be missed out  for a particular past month.

 Shouldn't the system be restricting periods as picked from the central
 server? but having suggested that we also worry about offline entry unless
 we are able to sync periods together with Orgunits and Data sets?

 Regards

 --
 Prosper Behumbiize, MPH
 Phone:+256 414 320076
 Cell: +256 772 139037
  +256 752 751776


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


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


Re: [Dhis2-devs] Server Periods not Syncing with the user Date settings

2014-12-01 Thread Prosper BT
Thanks Lars,

For now we have to call on all enduser involved in data entry to ensure
that their systems dates are correct.

Was able to quickly notice this because one of my dashboard shows reporting
rates for last month, and today I see some reporting rates percentage for
last month which ended last night and analytics only run in the night.
Since we only run analytics at night, there was no way this could have
happened. When I drilled to see the facility found some had entered data on
November 10, 2014.

Regards



On Mon, Dec 1, 2014 at 2:32 PM, Lars Helge Øverland larshe...@gmail.com
wrote:

 Hi Prosper,

 you are right. Since data entry works offline we need to use the client
 clock for the data entry periods. However we can do

 - a check on the client side comparing server time to client computer time
 and ask the user to update if not in sync.

 - a check on the server when saving data using the data set(s) of the data
 elements and look for restrictions for future data. If the data set is
 locked for future periods we can deny saving of data.

 Blueprint here:
 https://blueprints.launchpad.net/dhis2/+spec/future-data-check

 We can put it in for 2.18.

 Lars




 On Mon, Dec 1, 2014 at 11:34 AM, Prosper BT ptb3...@gmail.com wrote:

 Dear Developers,

 I have always known that this problem exists, but when it begins messing
 up data analytics then we need to worry and look out for a permanent
 solution to this problem.

 What is happening is that for say monthly reporting, if an enduser sets
 his date in the future, he can enter future data and when you do analytics
 that data will be missed out  for a particular past month.

 Shouldn't the system be restricting periods as picked from the central
 server? but having suggested that we also worry about offline entry unless
 we are able to sync periods together with Orgunits and Data sets?

 Regards

 --
 Prosper Behumbiize, MPH
 Phone:+256 414 320076
 Cell: +256 772 139037
  +256 752 751776


 ___
 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





-- 
Prosper Behumbiize, MPH
Phone:+256 414 320076
Cell: +256 772 139037
 +256 752 751776
___
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] Server Periods not Syncing with the user Date settings

2014-12-01 Thread Lars Helge Øverland
Sure - no doubt this could happen.

Lars


On Mon, Dec 1, 2014 at 2:43 PM, Prosper BT ptb3...@gmail.com wrote:

 Thanks Lars,

 For now we have to call on all enduser involved in data entry to ensure
 that their systems dates are correct.

 Was able to quickly notice this because one of my dashboard shows
 reporting rates for last month, and today I see some reporting rates
 percentage for last month which ended last night and analytics only run in
 the night. Since we only run analytics at night, there was no way this
 could have happened. When I drilled to see the facility found some had
 entered data on November 10, 2014.

 Regards



 On Mon, Dec 1, 2014 at 2:32 PM, Lars Helge Øverland larshe...@gmail.com
 wrote:

 Hi Prosper,

 you are right. Since data entry works offline we need to use the client
 clock for the data entry periods. However we can do

 - a check on the client side comparing server time to client computer
 time and ask the user to update if not in sync.

 - a check on the server when saving data using the data set(s) of the
 data elements and look for restrictions for future data. If the data set is
 locked for future periods we can deny saving of data.

 Blueprint here:
 https://blueprints.launchpad.net/dhis2/+spec/future-data-check

 We can put it in for 2.18.

 Lars




 On Mon, Dec 1, 2014 at 11:34 AM, Prosper BT ptb3...@gmail.com wrote:

 Dear Developers,

 I have always known that this problem exists, but when it begins messing
 up data analytics then we need to worry and look out for a permanent
 solution to this problem.

 What is happening is that for say monthly reporting, if an enduser sets
 his date in the future, he can enter future data and when you do analytics
 that data will be missed out  for a particular past month.

 Shouldn't the system be restricting periods as picked from the central
 server? but having suggested that we also worry about offline entry unless
 we are able to sync periods together with Orgunits and Data sets?

 Regards

 --
 Prosper Behumbiize, MPH
 Phone:+256 414 320076
 Cell: +256 772 139037
  +256 752 751776


 ___
 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





 --
 Prosper Behumbiize, MPH
 Phone:+256 414 320076
 Cell: +256 772 139037
  +256 752 751776


___
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] Freestyling Charts in DHIS2 with custom views

2014-12-01 Thread Greg Rowles
Hi Guys

Can anyone point me to code samples / documentation on how to build custom
charts with code libraries in DHIS2? We need to do some complex queries
that include a) date-difference calculations, b) running (raw data) totals,
and c) run-time ratios (% of total)...

Regards,
Greg

-- 

Business Intelligence Planner
*Health Information Systems Programme*
*- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - - - *
Mobile  :073 246 2992
Landline:   021 554 3130
Fax:  086 733 8432
Skype:  gregory_rowles
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Bug 1246220] Re: Problem with pivot tables when exporting/importing configs

2014-12-01 Thread Pierre Dane
no
:)

On Thu, Nov 27, 2014 at 2:02 PM, Martin Brocker mar...@jembi.org
wrote:

 Hey Pierre

 I'm not sure if this email was meant to come to me?

 Warm Regards,
 Martin

 On Thu, Nov 27, 2014 at 1:49 PM, Pierre Dane pie...@jembi.org wrote:

  woo hoo - some action! :)
  MOH in Mozambique has vetoed using offline DHIS2 instances on Jorn's
 advice
  so this suddenly became a lot less of an issue for us . but still
 it's
  important when moving pivot tables from dev systems into production.
 
  How long are you going to be in Johannesburg for - both weeks? I'll be
  there definitely for the second, maybe the tail end of the first too.
 
  laters
 
 
  On Thu, Nov 27, 2014 at 12:44 PM, Lars Helge Øverland 
 larshe...@gmail.com
  
  wrote:
 
   ** Changed in: dhis2
   Milestone: 2.16 = 2.18
  
   --
   You received this bug notification because you are subscribed to the
 bug
   report.
   https://bugs.launchpad.net/bugs/1246220
  
   Title:
 Problem with pivot tables when exporting/importing configs
  
   Status in DHIS 2:
 Confirmed
  
   Bug description:
 I found a problem with “pivot table with details “ when importing new
 configurations using dhis 2.13.
  
 My case: I have configured an pivot table in an 2.13 dhis instance
 and
   everything is fine.
 I exported and imported the configuration in another instance (same
   version), the pivot table appears unconfigured.
  
  
 DHIS2 Version: 2.13
 Building: 12768
  
   To manage notifications about this bug go to:
   https://bugs.launchpad.net/dhis2/+bug/1246220/+subscriptions
  
 
  --
  You received this bug notification because you are subscribed to the bug
  report.
  https://bugs.launchpad.net/bugs/1246220
 
  Title:
Problem with pivot tables when exporting/importing configs
 
  Status in DHIS 2:
Confirmed
 
  Bug description:
I found a problem with “pivot table with details “ when importing new
configurations using dhis 2.13.
 
My case: I have configured an pivot table in an 2.13 dhis instance and
  everything is fine.
I exported and imported the configuration in another instance (same
  version), the pivot table appears unconfigured.
 
 
DHIS2 Version: 2.13
Building: 12768
 
  To manage notifications about this bug go to:
  https://bugs.launchpad.net/dhis2/+bug/1246220/+subscriptions
 

 --
 You received this bug notification because you are subscribed to the bug
 report.
 https://bugs.launchpad.net/bugs/1246220

 Title:
   Problem with pivot tables when exporting/importing configs

 Status in DHIS 2:
   Confirmed

 Bug description:
   I found a problem with “pivot table with details “ when importing new
   configurations using dhis 2.13.

   My case: I have configured an pivot table in an 2.13 dhis instance and
 everything is fine.
   I exported and imported the configuration in another instance (same
 version), the pivot table appears unconfigured.


   DHIS2 Version: 2.13
   Building: 12768

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

Title:
  Problem with pivot tables when exporting/importing configs

Status in DHIS 2:
  Confirmed

Bug description:
  I found a problem with “pivot table with details “ when importing new
  configurations using dhis 2.13.

  My case: I have configured an pivot table in an 2.13 dhis instance and 
everything is fine. 
  I exported and imported the configuration in another instance (same version), 
the pivot table appears unconfigured. 

  
  DHIS2 Version: 2.13
  Building: 12768

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1246220/+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] Freestyling Charts in DHIS2 with custom views

2014-12-01 Thread Jason Pickering
Hi Greg,
Many ways to skin that cat, but of course, there is always R.

https://www.dhis2.org/doc/snapshot/en/developer/html/apa.html

describes a number of different approaches, which we have used to solve
these types of problems, particularly the aggregation of time-series.

Regards,
Jason


On Mon, Dec 1, 2014 at 4:01 PM, Greg Rowles greg.row...@gmail.com wrote:

 Hi Guys

 Can anyone point me to code samples / documentation on how to build custom
 charts with code libraries in DHIS2? We need to do some complex queries
 that include a) date-difference calculations, b) running (raw data) totals,
 and c) run-time ratios (% of total)...

 Regards,
 Greg

 --

 Business Intelligence Planner
 *Health Information Systems Programme*
 *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - -
 - *
 Mobile  :073 246 2992
 Landline:   021 554 3130
 Fax:  086 733 8432
 Skype:  gregory_rowles

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




-- 
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+46764147049
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 17635: minor bugfix

2014-12-01 Thread noreply

revno: 17635
committer: Morten Olav Hansen morte...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-12-02 12:31:26 +0700
message:
  minor bugfix
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm	2014-11-03 13:35:42 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm	2014-12-02 05:31:26 +
@@ -24,7 +24,7 @@
 	
 tr
 tdlabel for=name$i18n.getString( name ) em title=$i18n.getString( required ) class=required*/em/label/td
-tdinput type=text id=name name=name value=$encoder.htmlEncode(caseAggregation.name)/td
+tdinput type=text id=name name=name value=$encoder.htmlEncode($caseAggregation.name)/td
 /tr
 
 tr

___
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 17636: include special filtering for /api/dimensions/id/items?filter=name:like:XXX

2014-12-01 Thread noreply

revno: 17636
committer: Morten Olav Hansen morte...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-12-02 13:11:18 +0700
message:
  include special filtering for /api/dimensions/id/items?filter=name:like:XXX
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DimensionController.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/DimensionController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DimensionController.java	2014-12-01 05:43:13 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DimensionController.java	2014-12-02 06:11:18 +
@@ -28,8 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.google.common.base.Enums;
-import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
 import org.hisp.dhis.common.DimensionService;
 import org.hisp.dhis.common.DimensionalObject;
@@ -39,7 +37,6 @@
 import org.hisp.dhis.common.PagerUtils;
 import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.node.config.InclusionStrategy;
 import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.hisp.dhis.webapi.webdomain.WebMetaData;
 import org.hisp.dhis.webapi.webdomain.WebOptions;
@@ -55,6 +52,7 @@
 import javax.servlet.http.HttpServletResponse;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -97,6 +95,28 @@
 WebOptions options = new WebOptions( parameters );
 ListNameableObject items = dimensionService.getCanReadDimensionItems( uid );
 
+if ( parameters.containsKey( filter ) )
+{
+String filter = parameters.get( filter );
+
+if ( filter.startsWith( name:like: ) )
+{
+filter = filter.substring( name:like:.length() );
+
+IteratorNameableObject iterator = items.iterator();
+
+while ( iterator.hasNext() )
+{
+NameableObject nameableObject = iterator.next();
+
+if ( !nameableObject.getName().toLowerCase().contains( filter.toLowerCase() ) )
+{
+iterator.remove();
+}
+}
+}
+}
+
 WebMetaData metaData = new WebMetaData();
 Collections.sort( items, IdentifiableObjectNameComparator.INSTANCE );
 

___
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