[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19673: event-capture: use the new webmessage api response

2015-07-17 Thread noreply

revno: 19673
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Fri 2015-07-17 09:28:57 +0200
message:
  event-capture: use the new webmessage api response
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.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-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-07-02 07:19:49 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-07-17 07:28:57 +
@@ -563,10 +563,10 @@
 
 //send the new event to server
 DHIS2EventFactory.create(dhis2Event).then(function(data) {
-if (data.importSummaries[0].status === 'ERROR') {
+if (data.response.importSummaries[0].status === 'ERROR') {
 var dialogOptions = {
 headerText: 'event_registration_error',
-bodyText: data.importSummaries[0].description
+bodyText: data.message
 };
 
 DialogService.showDialog({}, dialogOptions);
@@ -574,7 +574,7 @@
 else {
 
 //add the new event to the grid
-newEvent.event = data.importSummaries[0].reference;
+newEvent.event = data.response.importSummaries[0].reference;
 if( !$scope.dhis2Events ){
 $scope.dhis2Events = [];   
 }

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js	2015-07-13 07:37:11 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js	2015-07-17 07:28:57 +
@@ -350,7 +350,6 @@
 var p = d.promise();
 dhis2.ec.store.get('programStages', program.programStages[0].id).done(function(obj) {
 if(!obj || obj.version !== program.programStages[0].version) {
-//promise = promise.then( getProgramStage( program.programStages[0].id ) );
 promise = promise.then( getD2Object( program.programStages[0].id, 'programStages', '../api/programStages', 'fields=id,name,version,description,reportDateDescription,captureCoordinates,dataEntryForm,minDaysFromStart,repeatable,preGenerateUID,programStageSections[id,name,programStageDataElements[dataElement[id]]],programStageDataElements[displayInReports,sortOrder,allowProvidedElsewhere,allowFutureDate,compulsory,dataElement[id,name,type,optionSetValue,numberType,textType,formName,optionSet[id]]]', 'idb' ) );
 }
 
@@ -377,20 +376,6 @@
 return mainPromise;
 }
 
-/*function getProgramStage( id )
-{
-return function() {
-return $.ajax( {
-url: '../api/programStages.json?filter=id:eq:' + id +'&fields=id,name,version,description,reportDateDescription,captureCoordinates,dataEntryForm,minDaysFromStart,repeatable,preGenerateUID,programStageSections[id,name,programStageDataElements[dataElement[id]]],programStageDataElements[displayInReports,sortOrder,allowProvidedElsewhere,allowFutureDate,compulsory,dataElement[id,name,type,optionSetValue,numberType,textType,formName,optionSet[id]]]',
-type: 'GET'
-}).done( function( response ){
-_.each( _.values( response.programStages ), function( programStage ) {
-dhis2.ec.store.set( 'programStages', programStage );
-});
-});
-};
-}*/
-
 function getOptionSets( programs )
 {
 if( !programs ){
@@ -417,7 +402,6 @@
 dhis2.ec.store.get('optionSets', prStDe.dataElement.optionSet.id).done(function(obj) {
 if( (!obj || obj.version !== prStDe.dataElement.optionSet.version) && optionSetsInPromise.indexOf(prStDe.dataElement.optionSet.id) === -1) {
 optionSetsInPromise.push( prStDe.dataElement.optionSet.id );
-//promise = promise.then( getOptionSet( prStDe.dataElement.optionSet.id ) );
 promise = promise.then( getD2Object( prStDe.dataElement.optionSet.id, 'optionSets', '../api/optionSets', 'fields=id,name,version,options[id,name,code]', 'idb' ) );
 }
 

[Dhis2-devs] Missing Authority (permission) for Aggregate Data Capture

2015-07-17 Thread Sam Kasozi
Dear all,

The 'Add/Update Data Value' authority is no-longer sufficient to allow for
Data capture. One has to add the 'ALL' authority meaning the data entrant
has access to all functions.

This also applies to the Demo server.


regards,

Sam Kasozi
Information Systems Consultant
HISP Uganda | GHSI - Uganda MOH - PH Emergency Operation Center
+256 788 993565 | +256 757 662752
kaso...@gmail.com | skas...@pheoc.go.ug  | Skype:
sam.kasoziug
___
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 19674: rule engine evaluation result now gets rounded to two decimals

2015-07-17 Thread noreply

revno: 19674
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Fri 2015-07-17 10:14:27 +0200
message:
  rule engine evaluation result now gets rounded to two decimals
modified:
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.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-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js	2015-07-15 14:30:32 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js	2015-07-17 08:14:27 +
@@ -1107,6 +1107,9 @@
 var dhisfunctionsevaluated = runDhisFunctions(expression, variablesHash, flag);
 answer = eval(dhisfunctionsevaluated);
 }
+if(dhis2.validation.isNumber(answer)){
+answer = Number(answer).toFixed(2);
+}
 return answer;
 }; 
 

___
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 1453569] Re: Sharing Feature not working for Dashboards

2015-07-17 Thread Dapo Adejumo
Great! Thanks Morten, will test and give feedback.

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

Title:
  Sharing Feature not working for Dashboards

Status in DHIS:
  Fix Committed

Bug description:
  Dashboards do not respect sharing settings when configured .  For
  instance users who have not been given the authority to edit a
  dashboard can do so . Replicated on the demo server ( To do this ,
  create a dashboard and assign only read permissions to "public" , then
  create a new user and login - new user can edit contents of dashboard
  )

  Affects 2.18 Rev 18411

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

2015-07-17 Thread Asiz koju
Dear developers,I am trying to develop a custom form for my aggregate. i have 
created data elements-> created data set. And i am trying to develop custom 
form. i have completed my form to certain limit and instead of 'Save and Close' 
i use 'Save' (quite frequently) but when i refresh the page all my work were 
gone and there was a plain page with nothing. 
Regards,Utsav
  ___
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] Multiple org unit selector

2015-07-17 Thread Navneet Kumar Pandey
Hi,

Do someone has idea about best way to get/implement multiple org unit
selector ( as shown in the image below) in the app side, either in JS or
Angular?

Thanks in advance.
Regards,
Navneet
[image: Inline image 1]
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Fwd: multiple org unit selector

2015-07-17 Thread Knut Staring
Hi,

Does someone have suggestions for how to best implement multiple org unit
selector ( as shown in the image below) in the app side, either in JS or
Angular?

Thanks in advance.
Regards,
Navneet
[image: Inline image 1]




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


[Dhis2-devs] DHIS2 Numerator + Denominators

2015-07-17 Thread Greg Rowles
Hi Devs

I know v2.20 had plans for exposing numerator and denominator values and
that this will probably be moved to a later version but is there an easy
way to extract these values from within the database using custom views?
Can one not 'freeze' the analytics process and draw out temporary objects
or similar?

Regards,
Greg

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


Re: [Dhis2-devs] DHIS2 Numerator + Denominators

2015-07-17 Thread Lars Helge Øverland
Hi Greg,

yes we have pushed this feature to 2.21 due to time pressure. I recommend
that you simply create additional indicators, one for each real indicator
numerator and denominator.

Example:

IndicatorA = A + B / C + D

IndicatorANum = A + B
IndicatorADen = C + D

Then include all of them in your analytics request, and compute the final
value on your side.

regards,

Lars


On Fri, Jul 17, 2015 at 1:03 PM, Greg Rowles  wrote:

> Hi Devs
>
> I know v2.20 had plans for exposing numerator and denominator values and
> that this will probably be moved to a later version but is there an easy
> way to extract these values from within the database using custom views?
> Can one not 'freeze' the analytics process and draw out temporary objects
> or similar?
>
> Regards,
> Greg
>
> --
> *Health Information Systems Program - South Africa*
> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - -
> - *
> Mobile  :073 246 2992
> Landline:   021 554 3130
> Fax:  086 733 8432
> Skype:  gregory_rowles
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


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


[Dhis2-devs] Managed users

2015-07-17 Thread Guy Ekani
Hello,
Please could someone can give me the best way or a step by step guide on how to 
implement "managed users" in DHIS 2.18 ?
In dont see the step in the documentation 
(https://www.dhis2.org/doc/snapshot/en/user/html/ch07.html#d5e1596)
Sincerely,
 = EKANI Guy 
 



___
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 1453569] Re: Sharing Feature not working for Dashboards

2015-07-17 Thread Wilfred Senyoni
Morten can you back-port this fix to 2.18. We are facing this challenge
with our National server.

Cheers

Wilfred F. Senyoni
Computer Science and Engineering Department
College of Information and Communication Technologies
University of Dar es salaam

On Fri, Jul 17, 2015 at 11:53 AM, Dapo Adejumo <1453...@bugs.launchpad.net>
wrote:

> Great! Thanks Morten, will test and give feedback.
>
> --
> You received this bug notification because you are a member of DHIS 2
> developers, which is subscribed to DHIS.
> https://bugs.launchpad.net/bugs/1453569
>
> Title:
>   Sharing Feature not working for Dashboards
>
> Status in DHIS:
>   Fix Committed
>
> Bug description:
>   Dashboards do not respect sharing settings when configured .  For
>   instance users who have not been given the authority to edit a
>   dashboard can do so . Replicated on the demo server ( To do this ,
>   create a dashboard and assign only read permissions to "public" , then
>   create a new user and login - new user can edit contents of dashboard
>   )
>
>   Affects 2.18 Rev 18411
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1453569/+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
>
___
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 1453569] [NEW] Sharing Feature not working for Dashboards

2015-07-17 Thread Morten Olav Hansen
It should already be in 2.18, please download latest and try

On Friday, July 17, 2015, Wilfred Senyoni  wrote:

> Morten can you back-port this fix to 2.18. We are facing this challenge
> with our National server.
>
> Cheers
>
> Wilfred F. Senyoni
> Computer Science and Engineering Department
> College of Information and Communication Technologies
> University of Dar es salaam
>
> On Fri, Jul 17, 2015 at 11:53 AM, Dapo Adejumo <1453...@bugs.launchpad.net
> > wrote:
>
>> Great! Thanks Morten, will test and give feedback.
>>
>> --
>> You received this bug notification because you are a member of DHIS 2
>> developers, which is subscribed to DHIS.
>> https://bugs.launchpad.net/bugs/1453569
>>
>> Title:
>>   Sharing Feature not working for Dashboards
>>
>> Status in DHIS:
>>   Fix Committed
>>
>> Bug description:
>>   Dashboards do not respect sharing settings when configured .  For
>>   instance users who have not been given the authority to edit a
>>   dashboard can do so . Replicated on the demo server ( To do this ,
>>   create a dashboard and assign only read permissions to "public" , then
>>   create a new user and login - new user can edit contents of dashboard
>>   )
>>
>>   Affects 2.18 Rev 18411
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/dhis2/+bug/1453569/+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
>>
>
>

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