Re: [Dhis2-devs] Dataentry: translation of dataset name not shown
Great Lars, thank you! Víctor On 22 June 2015 at 17:24, Lars Helge Øverland larshe...@gmail.com wrote: Hi Victor, good spot. This is fixed now in trunk (r 19491) and 2.19. regards, Lars On Mon, Jun 22, 2015 at 1:51 PM, Victor Garcia vgarcia...@gmail.com wrote: Hi all, I have noticed that the translations of dataset name are not shown in the dataentry screen (the dropdown in the green box where you select the data set). However, if you log in with a user that has the ALL authority, the translations are correctly shown. I am using latest 2.19. Tried cleaning browser and dhis cache, but without success. Regards, Víctor ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- 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 19491: Centralized logic for getting data sets for current user. Added i18n.
revno: 19491 committer: Lars Helge Overland larshe...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 17:17:36 +0200 message: Centralized logic for getting data sets for current user. Added i18n. modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/CurrentUserService.java dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/DefaultAggregatedOrgUnitDataValueService.java dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultCurrentUserService.java dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.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/user/CurrentUserService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/CurrentUserService.java 2015-06-01 19:49:10 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/CurrentUserService.java 2015-06-22 15:17:36 + @@ -28,8 +28,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.util.List; import java.util.Set; +import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.organisationunit.OrganisationUnit; /** @@ -78,4 +80,10 @@ * Indicates whether the current user has been granted the given authority. */ boolean currenUserIsAuthorized( String auth ); + +/** + * Returns the data sets associated with the current user. If the current + * user has the ALL authority then all data sets are returned. + */ +ListDataSet getCurrentUserDataSets(); } === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/DefaultAggregatedOrgUnitDataValueService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/DefaultAggregatedOrgUnitDataValueService.java 2015-01-17 07:41:26 + +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/DefaultAggregatedOrgUnitDataValueService.java 2015-06-22 15:17:36 + @@ -37,6 +37,9 @@ import org.hisp.dhis.organisationunit.OrganisationUnitGroup; import org.hisp.dhis.period.Period; +/** + * @author Lars Helge Overland + */ public class DefaultAggregatedOrgUnitDataValueService implements AggregatedOrgUnitDataValueService { === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultCurrentUserService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultCurrentUserService.java 2015-06-01 19:49:10 + +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultCurrentUserService.java 2015-06-22 15:17:36 + @@ -29,15 +29,22 @@ */ import java.util.HashSet; +import java.util.List; import java.util.Set; +import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.i18n.I18nService; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.security.spring.AbstractSpringSecurityCurrentUserService; import org.springframework.transaction.annotation.Transactional; +import com.google.common.collect.Lists; + +import static org.hisp.dhis.i18n.I18nUtils.i18n; + /** * @author Torgeir Lorange Ostby - * @version $Id: DefaultCurrentUserService.java 5708 2008-09-16 14:28:32Z larshelg $ */ @Transactional public class DefaultCurrentUserService @@ -54,6 +61,20 @@ this.userService = userService; } +private DataSetService dataSetService; + +public void setDataSetService( DataSetService dataSetService ) +{ +this.dataSetService = dataSetService; +} + +private I18nService i18nService; + +public void setI18nService( I18nService service ) +{ +i18nService = service; +} + // - // CurrentUserService implementation // - @@ -81,21 +102,9 @@ @Override public boolean currentUserIsSuper() { -String username = getCurrentUsername(); - -if ( username == null ) -{ -return false; -} - -UserCredentials userCredentials = userService.getUserCredentialsByUsername( username ); - -if ( userCredentials == null ) -{ -return false; -} - -return userCredentials.isSuper(); +User user = getCurrentUser(); + +return user != null user.isSuper(); } @Override @@ -113,4 +122,24 @@ return user != null
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19493: Compilation fix
revno: 19493 committer: Lars Helge Overland larshe...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 18:08:25 +0200 message: Compilation fix modified: dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/MockCurrentUserService.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-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/MockCurrentUserService.java' --- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/MockCurrentUserService.java 2015-06-01 19:49:10 + +++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/MockCurrentUserService.java 2015-06-22 16:08:25 + @@ -30,14 +30,18 @@ import java.util.Arrays; import java.util.HashSet; +import java.util.List; import java.util.Set; +import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.user.User; import org.hisp.dhis.user.UserAuthorityGroup; import org.hisp.dhis.user.UserCredentials; +import com.google.common.collect.Lists; + /** * @author Lars Helge Overland */ @@ -112,4 +116,10 @@ { return true; } + +@Override +public ListDataSet getCurrentUserDataSets() +{ +return Lists.newArrayList(); +} } ___ 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] Dataentry: translation of dataset name not shown
Hi Victor, good spot. This is fixed now in trunk (r 19491) and 2.19. regards, Lars On Mon, Jun 22, 2015 at 1:51 PM, Victor Garcia vgarcia...@gmail.com wrote: Hi all, I have noticed that the translations of dataset name are not shown in the dataentry screen (the dropdown in the green box where you select the data set). However, if you log in with a user that has the ALL authority, the translations are correctly shown. I am using latest 2.19. Tried cleaning browser and dhis cache, but without success. Regards, Víctor ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- Lars Helge Øverland Lead developer, DHIS 2 University of Oslo Skype: larshelgeoverland http://www.dhis2.org https://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 19492: Removed unused dep
revno: 19492 committer: Lars Helge Overland larshe...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 17:21:26 +0200 message: Removed unused dep modified: dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java 2015-06-22 15:17:36 + +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java 2015-06-22 15:21:26 + @@ -50,7 +50,6 @@ import org.hisp.dhis.dataelement.DataElementCategoryService; import org.hisp.dhis.dataelement.DataElementService; import org.hisp.dhis.dataset.DataSet; -import org.hisp.dhis.dataset.DataSetService; import org.hisp.dhis.expression.ExpressionService; import org.hisp.dhis.indicator.Indicator; import org.hisp.dhis.indicator.IndicatorService; @@ -94,13 +93,6 @@ this.expressionService = expressionService; } -private DataSetService dataSetService; - -public void setDataSetService( DataSetService dataSetService ) -{ -this.dataSetService = dataSetService; -} - private DataElementCategoryService categoryService; public void setCategoryService( DataElementCategoryService categoryService ) === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml 2015-06-06 11:44:58 + +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml 2015-06-22 15:21:26 + @@ -10,7 +10,6 @@ property name=dataElementService ref=org.hisp.dhis.dataelement.DataElementService / property name=indicatorService ref=org.hisp.dhis.indicator.IndicatorService / property name=expressionService ref=org.hisp.dhis.expression.ExpressionService / -property name=dataSetService ref=org.hisp.dhis.dataset.DataSetService / property name=categoryService ref=org.hisp.dhis.dataelement.DataElementCategoryService / property name=currentUserService ref=org.hisp.dhis.user.CurrentUserService / /bean ___ 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 19494: Resource tables, added extra check for uniqueness among daily periods to avoid exceptions
revno: 19494 committer: Lars Helge Overland larshe...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 22:07:56 +0200 message: Resource tables, added extra check for uniqueness among daily periods to avoid exceptions added: dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/collection/ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/collection/UniqueArrayListTest.java modified: dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/UniqueArrayList.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-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java' --- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java 2015-04-16 21:24:00 + +++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java 2015-06-22 20:07:56 + @@ -50,6 +50,7 @@ import org.hisp.dhis.common.IdentifiableObjectManager; import org.hisp.dhis.common.IdentifiableObjectUtils; import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator; +import org.hisp.dhis.commons.collection.UniqueArrayList; import org.hisp.dhis.dataapproval.DataApprovalLevelService; import org.hisp.dhis.dataelement.CategoryOptionGroup; import org.hisp.dhis.dataelement.CategoryOptionGroupSet; @@ -424,7 +425,7 @@ resourceTableStore.createDatePeriodStructure(); // - -// Populate table +// Populate table, uniqueness check as some calendars produce duplicates // - ListPeriodType periodTypes = PeriodType.getAvailablePeriodTypes(); @@ -434,7 +435,7 @@ Date startDate = new Cal( 1975, 1, 1, true ).time(); //TODO Date endDate = new Cal( 2025, 1, 1, true ).time(); -ListPeriod days = new DailyPeriodType().generatePeriods( startDate, endDate ); +ListPeriod days = new UniqueArrayList( new DailyPeriodType().generatePeriods( startDate, endDate ) ); Calendar calendar = PeriodType.getCalendar(); === modified file 'dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/UniqueArrayList.java' --- dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/UniqueArrayList.java 2015-06-16 17:57:23 + +++ dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/UniqueArrayList.java 2015-06-22 20:07:56 + @@ -39,7 +39,18 @@ */ public class UniqueArrayListE extends ArrayListE -{ +{ +public UniqueArrayList() +{ +super(); +} + +public UniqueArrayList( Collection? extends E c ) +{ +super(); +addAll( c ); +} + @Override public boolean add( E e ) { === added directory 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/collection' === added file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/collection/UniqueArrayListTest.java' --- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/collection/UniqueArrayListTest.java 1970-01-01 00:00:00 + +++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/collection/UniqueArrayListTest.java 2015-06-22 20:07:56 + @@ -0,0 +1,117 @@ +package org.hisp.dhis.system.collection; + +/* + * Copyright (c) 2004-2015, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF
Re: [Dhis2-devs] [Dhis2-users] dhis2 2.18, 2.17. 2.16 reporting Error. Please Help.
Hi Fatema, we have made a fix to prevent time zone issues for resource table generation in 2.18 and 2.19 now. regards, Lars On Wed, Jun 17, 2015 at 11:57 AM, Uddin Fatema fatema...@gmail.com wrote: Yes Lars i found same error in 2.18 too. Actually I updated version in 2.18 in test server but still time zone error remains for (UTC+60 )Dhaka . You know that some time zone has time zone problem in resource table generation. So I Changes time zone UTC+6:30) Yaangoon) and update resource table and analytic. And still I found same error which is described me and Nayeem Al Miftah. Thanks On Wed, Jun 17, 2015 at 3:44 PM, Nayeem Al Mifthah n.mift...@gmail.com wrote: Dear Lars There are monthly datasets on which a data entry operator input 50 in a cell. Analytic shows that same number as 51.7 in those months which have 31 days (Jan, Mar, May, July, Aug, Oct, Dec), Also it shows less value in February as it have 28 days. It has happened as the analytic table calculate the data as Ms. Fatema has described. Nayeem Al Mifthah HMIS Consultant Management Information System Directorate General of Health Services (DGHS), Bangladesh Supported by: UNICEF-Bangladesh Email: n.mift...@gmail.com | nay...@mis.dghs.gov.bd Cell:+8801914030574 On Wed, Jun 17, 2015 at 3:19 PM, Lars Helge Øverland larshe...@gmail.com wrote: Hi Fatema, do you think you could explain a bit more about the data elements and calculation? Do you think you cold try with 2.18 / 2.19 ? regards, Lars On Wed, Jun 17, 2015 at 11:06 AM, Uddin Fatema fatema...@gmail.com wrote: Dear All, Data Analytic table retrieve wrong data in Pivot table, data visualizer and GIS and same error remain 2.17 and 2.16 too Here i attach screen short of Pivote Table Analysis and Data Entry Screen In pivote table value shows = 51.7 but originally dataentry screen shows = 50 Calculation it is dividing daysxvalue / 30 = 50* 31/30 = 51.7 But it should do daysxvalue/daysno = 50*31/31 =50 Please have a look on it. Thanks Fatema --- Forwarded message -- rom: Uddin Fatema fatema...@gmail.com Date: Tue, May 5, 2015 at 5:56 PM Subject: DHIS2 2.16 Data Analytic table retrieve wrong data in Pivot table, data visualizer and GIS. To: Jan Henrik Øverland janhenrik.overl...@gmail.com Dear Jan, DHIS2 2.16 analytics (pivote table, data-visualizer and gis mapping retrieve wrong data from Analytics_2015 or all analytics table. The problem is in analytics table it store daysxvalue , daysno and value column but when it retrieve data for pivote table, data-visualizer and gis that time it is dividing daysxvalue / 30 But it should do daysxvalue/daysno As a result in pivot table, data visualizer and gis mapping shows wrong data. Could you please solved it additionally, can you please tell me in source code in which file i have to change. Thanks a lot in advance. Regards, *Fatema Uddin* Technical Advisor (HIS)-Support to the Health Sector Program II Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH German House House 10/A-2, Road 90 Gulshan 2, Dhaka 1212, Bangladesh T +880 9666701000 F +880 28823099 M +880 19 6206 4721 I www.giz.de https://owa.giz.de/owa/redir.aspx?C=mPQMujasE0-yL6Aa4ocPcnkcfUThJNEIi4h1DwsYjO3Ua20UR_COt6aTH1s4JIdR4p-jCoFsP6A.URL=http%3a%2f%2fwww.giz.de%2f -- Regards, *Fatema Uddin* Technical Advisor (HIS)-Support to the Health Sector Program II Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH German House House 10/A-2, Road 90 Gulshan 2, Dhaka 1212, Bangladesh T +880 9666701000 F +880 28823099 M +880 19 6206 4721 I www.giz.de https://owa.giz.de/owa/redir.aspx?C=mPQMujasE0-yL6Aa4ocPcnkcfUThJNEIi4h1DwsYjO3Ua20UR_COt6aTH1s4JIdR4p-jCoFsP6A.URL=http%3a%2f%2fwww.giz.de%2f -- Lars Helge Øverland Lead developer, DHIS 2 University of Oslo Skype: larshelgeoverland http://www.dhis2.org https://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 -- Regards, *Fatema Uddin* Technical Advisor (HIS)-Support to the Health Sector Program II Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH German House House 10/A-2, Road 90 Gulshan 2, Dhaka 1212, Bangladesh T +880 9666701000 F +880 28823099 M +880 19 6206 4721 I www.giz.de https://owa.giz.de/owa/redir.aspx?C=mPQMujasE0-yL6Aa4ocPcnkcfUThJNEIi4h1DwsYjO3Ua20UR_COt6aTH1s4JIdR4p-jCoFsP6A.URL=http%3a%2f%2fwww.giz.de%2f -- Lars Helge Øverland Lead developer, DHIS 2 University of Oslo Skype: larshelgeoverland http://www.dhis2.org https://www.dhis2.org ___ Mailing
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19495: Analytics, simplified code related to query planning and grouping by data type
revno: 19495 committer: Lars Helge Overland larshe...@gmail.com branch nick: dhis2 timestamp: Tue 2015-06-23 00:31:16 +0200 message: Analytics, simplified code related to query planning and grouping by data type modified: dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.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-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java' --- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java 2015-06-18 21:47:26 + +++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java 2015-06-22 22:31:16 + @@ -265,27 +265,17 @@ ListDataQueryParams groupedByAggregationType = groupByAggregationType( byDataType ); for ( DataQueryParams byAggregationType : groupedByAggregationType ) -{ -if ( byAggregationType.isDisaggregation() ) -{ -ListDataQueryParams groupedByDataPeriodType = groupByDataPeriodType( byAggregationType ); - -for ( DataQueryParams byDataPeriodType : groupedByDataPeriodType ) -{ -byDataPeriodType.setPartitions( byPartition.getPartitions() ); -byDataPeriodType.setPeriodType( byPeriodType.getPeriodType() ); -byDataPeriodType.setAggregationType( byAggregationType.getAggregationType() ); - -queries.add( byDataPeriodType ); -} -} -else -{ -byAggregationType.setPartitions( byPartition.getPartitions() ); -byAggregationType.setPeriodType( byPeriodType.getPeriodType() ); - -queries.add( byAggregationType ); -} +{ +ListDataQueryParams groupedByDataPeriodType = groupByDataPeriodType( byAggregationType ); + +for ( DataQueryParams byDataPeriodType : groupedByDataPeriodType ) +{ +byDataPeriodType.setPartitions( byPartition.getPartitions() ); +byDataPeriodType.setPeriodType( byPeriodType.getPeriodType() ); +byDataPeriodType.setAggregationType( byAggregationType.getAggregationType() ); + +queries.add( byDataPeriodType ); +} } } } @@ -647,13 +637,14 @@ /** * Groups the given query in sub queries based on the period type of its - * data elements. Sets the data period type on each query. + * data elements. Sets the data period type on each query. This only applies + * if the aggregation type of the query involves disaggregation. */ private ListDataQueryParams groupByDataPeriodType( DataQueryParams params ) { ListDataQueryParams queries = new ArrayList(); -if ( params.getDataElements().isEmpty() ) +if ( params.getDataElements().isEmpty() || !params.isDisaggregation() ) { queries.add( params.instance() ); return queries; ___ 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 19483: event-capture: added missing service
revno: 19483 committer: Abyot Asalefew Gizaw aby...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 09:04:03 +0200 message: event-capture: added missing service modified: dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/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-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js 2015-06-21 22:18:40 + +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js 2015-06-22 07:04:03 + @@ -174,6 +174,55 @@ }; }) +/* factory for handling program related meta-data */ +.factory('MetaDataFactory', function($q, $rootScope, ECStorageService) { + +return { +get: function(store, uid){ + +var def = $q.defer(); + +ECStorageService.currentStore.open().done(function(){ +ECStorageService.currentStore.get(store, uid).done(function(pv){ +$rootScope.$apply(function(){ +def.resolve(pv); +}); +}); +}); +return def.promise; +}, +getByProgram: function(store, program){ +var def = $q.defer(); +var objs = []; + +ECStorageService.currentStore.open().done(function(){ +ECStorageService.currentStore.getAll(store, program).done(function(data){ +angular.forEach(data, function(o){ +if(o.program.id === program){ +objs.push(o); +} +}); +$rootScope.$apply(function(){ +def.resolve(objs); +}); +}); +}); +return def.promise; +}, +getAll: function(store){ +var def = $q.defer(); +ECStorageService.currentStore.open().done(function(){ +ECStorageService.currentStore.getAll(store).done(function(objs){ +$rootScope.$apply(function(){ +def.resolve(objs); +}); +}); +}); +return def.promise; +} +}; +}) + /* factory for handling events */ .factory('DHIS2EventFactory', function($http, $q, ECStorageService, $rootScope) { ___ 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] Dataentry: translation of dataset name not shown
Hi all, I have noticed that the translations of dataset name are not shown in the dataentry screen (the dropdown in the green box where you select the data set). However, if you log in with a user that has the ALL authority, the translations are correctly shown. I am using latest 2.19. Tried cleaning browser and dhis cache, but without success. Regards, Víctor ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19490: tracker-capture: removed trackedEntityForm as forms are now part of program
revno: 19490 committer: Abyot Asalefew Gizaw aby...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 14:07:24 +0200 message: tracker-capture: removed trackedEntityForm as forms are now part of program modified: dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 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-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js 2015-06-17 08:54:51 + +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js 2015-06-22 12:07:24 + @@ -8,7 +8,6 @@ AttributesFactory, DHIS2EventFactory, TEService, -TEFormService, CustomFormService, EnrollmentService, DialogService, @@ -102,15 +101,15 @@ var mode = _mode ? _mode : 'ENROLLMENT'; AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){ $scope.attributes = atts; -$scope.customFormExists = false; -if($scope.selectedProgram $scope.selectedProgram.id){ -TEFormService.getByProgram($scope.selectedProgram, $scope.attributes).then(function(teForm){ -if(angular.isObject(teForm)){ -$scope.customFormExists = true; -$scope.trackedEntityForm = teForm; -$scope.customForm = CustomFormService.getForTrackedEntity($scope.trackedEntityForm, mode); -} -}); +$scope.customFormExists = false; +if($scope.selectedProgram $scope.selectedProgram.id $scope.selectedProgram.dataEntryForm $scope.selectedProgram.dataEntryForm.htmlCode){ +$scope.customFormExists = true; +$scope.trackedEntityForm = $scope.selectedProgram.dataEntryForm; +$scope.trackedEntityForm.attributes = $scope.attributes; +$scope.trackedEntityForm.selectIncidentDatesInFuture = $scope.selectedProgram.selectIncidentDatesInFuture; +$scope.trackedEntityForm.selectEnrollmentDatesInFuture = $scope.selectedProgram.selectEnrollmentDatesInFuture; +$scope.trackedEntityForm.displayIncidentDate = $scope.selectedProgram.displayIncidentDate; +$scope.customForm = CustomFormService.getForTrackedEntity($scope.trackedEntityForm, mode); } }); }; === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2015-06-21 22:18:40 + +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2015-06-22 12:07:24 + @@ -10,7 +10,7 @@ var store = new dhis2.storage.Store({ name: dhis2tc, adapters: [dhis2.storage.IndexedDBAdapter, dhis2.storage.DomSessionStorageAdapter, dhis2.storage.InMemoryAdapter], -objectStores: ['programs', 'programStages', 'trackedEntities', 'trackedEntityForms', 'attributes', 'relationshipTypes', 'optionSets', 'programValidations', 'ouLevels', 'programRuleVariables', 'programRules','constants'] +objectStores: ['programs', 'programStages', 'trackedEntities', 'attributes', 'relationshipTypes', 'optionSets', 'programValidations', 'ouLevels', 'programRuleVariables', 'programRules','constants'] }); return{ currentStore: store @@ -629,36 +629,6 @@ }; }) -/* Service for getting tracked entity Form */ -.factory('TEFormService', function(TCStorageService, $q, $rootScope) { - -return { -getByProgram: function(program, attributes){ - -var def = $q.defer(); - -TCStorageService.currentStore.open().done(function(){ -TCStorageService.currentStore.get('trackedEntityForms', program.id).done(function(teForm){ -$rootScope.$apply(function(){ -var
[Dhis2-devs] Accessing HTML Reports through Web API !
Hi We are planning to refactor our java based report module to a DHIS2 Web Application. For this we need access to the HTML Reports through the Web API. Going by the documentation it seems that it is not yet possible to do this. Will DHIS2 have WEB API support around the reports module in the near future? Regards harsh ___ 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 19489: reorganized oauth2 components, moved into its own module (dhis-web-uaa), needed since spring-sec-...
revno: 19489 committer: Morten Olav Hansen morte...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 17:11:42 +0700 message: reorganized oauth2 components, moved into its own module (dhis-web-uaa), needed since spring-sec-oauth2 assumes a very different spring mvc setup (its included controllers depend on view resolvers etc), means you need to access /uaa/oauth/* for oauth2 instead of /api/oauth/* added: dhis-2/dhis-web/dhis-web-uaa/ dhis-2/dhis-web/dhis-web-uaa/pom.xml dhis-2/dhis-web/dhis-web-uaa/src/ dhis-2/dhis-web/dhis-web-uaa/src/main/ dhis-2/dhis-web/dhis-web-uaa/src/main/java/ dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/ dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/ dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/ dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/ dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/uaa/ dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/uaa/oauth2/ dhis-2/dhis-web/dhis-web-uaa/src/main/resources/ dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/ dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/ dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/webapi-uaa.xml dhis-2/dhis-web/dhis-web-uaa/src/main/resources/struts.xml dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/ dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/ dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/classes/ dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/classes/velocity.properties dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/uaa/ dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/web.xml dhis-2/dhis-web/dhis-web-uaa/src/test/ dhis-2/dhis-web/dhis-web-uaa/src/test/java/ dhis-2/dhis-web/dhis-web-uaa/src/test/resources/ modified: dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java dhis-2/dhis-web/dhis-web-portal/pom.xml dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml dhis-2/dhis-web/pom.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-api/src/main/resources/META-INF/dhis/servlet.xml' --- dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml 2015-06-21 12:44:37 + +++ dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml 2015-06-22 10:11:42 + @@ -3,11 +3,11 @@ xmlns=http://www.springframework.org/schema/beans; xmlns:context=http://www.springframework.org/schema/context; xmlns:mvc=http://www.springframework.org/schema/mvc; - xmlns:sec=http://www.springframework.org/schema/security; xmlns:oauth=http://www.springframework.org/schema/security/oauth2; + xmlns:sec=http://www.springframework.org/schema/security; xsi:schemaLocation=http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd -http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2.xsd; +http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd; sec:global-method-security pre-post-annotations=enabled / @@ -135,16 +135,5 @@ bean class=org.hisp.dhis.webapi.view.CsvGridView / /list /property - /bean - - !-- OAuth2 -- - oauth:authorization-server client-details-service-ref=clientDetailsService token-services-ref=tokenServices -oauth:authorization-code / -oauth:implicit / -oauth:refresh-token / -oauth:password authentication-manager-ref=authenticationManager / - /oauth:authorization-server - !-- End OAuth2 -- - /beans === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2015-06-21 12:44:37 + +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2015-06-22 10:11:42 + @@ -18,8 +18,8 @@ oauth:resource-server id=resourceServerFilter token-services-ref=tokenServices
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19484: Compilation fix
revno: 19484 committer: Lars Helge Overland larshe...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 10:07:22 +0200 message: Compilation fix modified: dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.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/common/IdentifiableObjectManagerTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java 2015-06-22 01:59:59 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java 2015-06-22 08:07:22 + @@ -28,7 +28,18 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import com.google.common.collect.Sets; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.GregorianCalendar; +import java.util.List; +import java.util.Set; + import org.hibernate.SessionFactory; import org.hisp.dhis.DhisSpringTest; import org.hisp.dhis.acl.AccessStringHelper; @@ -47,14 +58,7 @@ import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.GregorianCalendar; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import static org.junit.Assert.*; +import com.google.common.collect.Sets; /** * @author Morten Olav Hansen morte...@gmail.com @@ -102,7 +106,6 @@ assertEquals( dataElementGroupB, identifiableObjectManager.getObject( dataElementGroupIdB, DataElementGroup.class.getSimpleName() ) ); } -/* @Test public void testGetWithClasses() { @@ -111,16 +114,12 @@ dataElementService.addDataElement( dataElementA ); dataElementService.addDataElement( dataElementB ); - -SetClass? extends IdentifiableObject classes = new HashSet(); -classes.add( DataElement.class ); -classes.add( DataSet.class ); -classes.add( Indicator.class ); - -assertEquals( dataElementA, identifiableObjectManager.get( DataDimension.DATA_DIMENSION_CLASSES, dataElementA.getUid() ) ); -assertEquals( dataElementB, identifiableObjectManager.get( DataDimension.DATA_DIMENSION_CLASSES, dataElementB.getUid() ) ); + +SetClassIdentifiableObject classes = IdentifiableObjectUtils.asTypedClassSet( DataElement.class, DataSet.class, Indicator.class ); + +assertEquals( dataElementA, identifiableObjectManager.get( classes, dataElementA.getUid() ) ); +assertEquals( dataElementB, identifiableObjectManager.get( classes, dataElementB.getUid() ) ); } -*/ @Test public void publicAccessSetIfNoUser() ___ 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 19487: bug fix for trueOnly data elements in custom form
revno: 19487 committer: Abyot Asalefew Gizaw aby...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 11:30:56 +0200 message: bug fix for trueOnly data elements in custom form 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-06-22 08:45:36 + +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-06-22 09:30:56 + @@ -323,7 +323,7 @@ ' blur-or-change=saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')' + commonInputFieldProperty + ' '; } -else if (prStDe.dataElement.type.type === trueOnly) { +else if (prStDe.dataElement.type === trueOnly) { newInputField = 'input type=checkbox ' + ' ng-change=saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')' + commonInputFieldProperty + ' '; ___ 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 19485: event-capture: program indicators are now available during data entry
revno: 19485 committer: Abyot Asalefew Gizaw aby...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 10:45:36 +0200 message: event-capture: program indicators are now available during data entry added: dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/buttons-section.html dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/comments-section.html dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/indicators-section.html modified: dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties 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/views/defaultForm.html dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/ec-custom-form.html dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js 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-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties 2015-06-15 11:04:20 + +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties 2015-06-22 08:45:36 + @@ -140,4 +140,5 @@ unsaved_data_exists_proceed=Unsaved data exists. Do you want to proceed? proceed=Proceed lacking_required_authority_to_add_update_event=Lacking required authority to add/update event. -select_or_search=Select or search from the list \ No newline at end of file +select_or_search=Select or search from the list +indicators=Indicators \ No newline at end of file === 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-06-18 10:33:59 + +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-06-22 08:45:36 + @@ -105,6 +105,7 @@ $scope.resetOu = false; $scope.selectedProgramStage = null; $scope.programValidations = []; +$scope.programIndicators = []; $scope.dhis2Events = []; $scope.currentEvent = {}; $scope.currentEventOriginialValue = {}; @@ -194,7 +195,10 @@ MetaDataFactory.getByProgram('programValidations', $scope.selectedProgram.id).then(function(pvs){ $scope.programValidations = pvs; -$scope.loadEvents(); +MetaDataFactory.getByProgram('programIndicators', $scope.selectedProgram.id).then(function(pis){ +$scope.programIndicators = pis; +$scope.loadEvents(); +}); }); }); } @@ -945,9 +949,14 @@ }); $scope.executeRules = function() { +$scope.currentEvent.event = !$scope.currentEvent.event ? 'SINGLE_EVENT' : $scope.currentEvent.event; $scope.eventsByStage = []; $scope.eventsByStage[$scope.selectedProgramStage.id] = [$scope.currentEvent]; -TrackerRulesExecutionService.executeRules($scope.selectedProgram.id,$scope.currentEvent,$scope.eventsByStage,$scope.prStDes,null); +TrackerRulesExecutionService.executeRules($scope.selectedProgram.id,$scope.currentEvent,$scope.eventsByStage,$scope.prStDes,null,false); +}; + +$scope.formatNumberResult = function(val){ +return dhis2.validation.isNumber(val) ? val : ''; }; //check if field is hidden === added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/buttons-section.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/buttons-section.html 1970-01-01 00:00:00 + +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/buttons-section.html 2015-06-22 08:45:36 + @@ -0,0 +1,12 @@ +div style=clear: both; +span ng-if=editingEventInFull +button type=button ng-click=updateEvent() class=button hideInPrint{{'update'| translate}}/button +button type=button ng-click=cancel() class=button hideInPrint{{'cancel'| translate}}/button +/span +span ng-if=eventRegistration +button
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 19486: Analytics, using getNoAcl to avoid sharing issues during event analytics table generation
revno: 19486 committer: Lars Helge Overland larshe...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 11:21:54 +0200 message: Analytics, using getNoAcl to avoid sharing issues during event analytics table generation modified: dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.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-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java' --- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java 2015-06-18 21:47:26 + +++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java 2015-06-22 09:21:54 + @@ -40,18 +40,16 @@ import org.hisp.dhis.analytics.AnalyticsTable; import org.hisp.dhis.common.ValueType; +import org.hisp.dhis.commons.collection.ListUtils; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet; import org.hisp.dhis.organisationunit.OrganisationUnitLevel; import org.hisp.dhis.period.Period; import org.hisp.dhis.period.PeriodType; import org.hisp.dhis.program.Program; -import org.hisp.dhis.program.ProgramService; import org.hisp.dhis.system.util.DateUtils; -import org.hisp.dhis.commons.collection.ListUtils; import org.hisp.dhis.system.util.MathUtils; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.transaction.annotation.Transactional; @@ -63,9 +61,6 @@ public class JdbcEventAnalyticsTableManager extends AbstractJdbcTableManager { -@Autowired -private ProgramService programService; - // - // Implementation // - @@ -102,7 +97,7 @@ for ( Integer id : programs ) { -Program program = programService.getProgram( id ); +Program program = idObjectManager.getNoAcl( Program.class, id ); AnalyticsTable table = new AnalyticsTable( baseName, null, period, program ); ListString[] dimensionColumns = getDimensionColumns( table ); ___ 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] Accessing HTML Reports through Web API !
Hi Harsh, depends what you mean. You can easily get the HTML content for a standard report directly from the api/reports resource. The HTML content for a standard report is just a property on report called designContent: https://apps.dhis2.org/dev/api/reports/AMERNML55Tg The context code we have for selecting org unit/period is very basic and something you could easily re-implement in your own data reports app. regards, Lars On Mon, Jun 22, 2015 at 11:20 AM, Harsh Atal harsh.a...@gmail.com wrote: Hi We are planning to refactor our java based report module to a DHIS2 Web Application. For this we need access to the HTML Reports through the Web API. Going by the documentation it seems that it is not yet possible to do this. Will DHIS2 have WEB API support around the reports module in the near future? Regards harsh ___ 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 https://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] Accessing HTML Reports through Web API !
Okay good. Lars On Mon, Jun 22, 2015 at 11:47 AM, Harsh Atal harsh.a...@gmail.com wrote: Thank You Lars! This is exactly what we needed. Sorry I missed it in the documentation. Regards harsh On 22 June 2015 at 15:03, Lars Helge Øverland larshe...@gmail.com wrote: Hi Harsh, depends what you mean. You can easily get the HTML content for a standard report directly from the api/reports resource. The HTML content for a standard report is just a property on report called designContent: https://apps.dhis2.org/dev/api/reports/AMERNML55Tg The context code we have for selecting org unit/period is very basic and something you could easily re-implement in your own data reports app. regards, Lars On Mon, Jun 22, 2015 at 11:20 AM, Harsh Atal harsh.a...@gmail.com wrote: Hi We are planning to refactor our java based report module to a DHIS2 Web Application. For this we need access to the HTML Reports through the Web API. Going by the documentation it seems that it is not yet possible to do this. Will DHIS2 have WEB API support around the reports module in the near future? Regards harsh ___ 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 https://www.dhis2.org -- Lars Helge Øverland Lead developer, DHIS 2 University of Oslo Skype: larshelgeoverland http://www.dhis2.org https://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 19488: minor
revno: 19488 committer: Abyot Asalefew Gizaw aby...@gmail.com branch nick: dhis2 timestamp: Mon 2015-06-22 12:06:28 +0200 message: minor 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-06-22 09:30:56 + +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-06-22 10:06:28 + @@ -256,6 +256,7 @@ newInputField = 'input type=text ' + this.getAttributesAsString(attributes) + ' ng-model=currentEvent.' + fieldId + '' + +' style=width:100%; ' + ' input-field-id=' + fieldId + '' + ' d2-date ' + ' d2-date-validator ' + ___ 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 1454443] Re: Yes only data elements in tracker custom forms not rendered
revno: 19487 ** Changed in: dhis2 Assignee: (unassigned) = Abyot Asalefew Gizaw (abyot) ** Changed in: dhis2 Status: New = Fix Committed -- You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. https://bugs.launchpad.net/bugs/1454443 Title: Yes only data elements in tracker custom forms not rendered Status in DHIS 2: Fix Committed Bug description: Yes only data elements in tracker custom forms show up as empty input boxes, not checkboxes as expected. To manage notifications about this bug go to: https://bugs.launchpad.net/dhis2/+bug/1454443/+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] Accessing HTML Reports through Web API !
Thank You Lars! This is exactly what we needed. Sorry I missed it in the documentation. Regards harsh On 22 June 2015 at 15:03, Lars Helge Øverland larshe...@gmail.com wrote: Hi Harsh, depends what you mean. You can easily get the HTML content for a standard report directly from the api/reports resource. The HTML content for a standard report is just a property on report called designContent: https://apps.dhis2.org/dev/api/reports/AMERNML55Tg The context code we have for selecting org unit/period is very basic and something you could easily re-implement in your own data reports app. regards, Lars On Mon, Jun 22, 2015 at 11:20 AM, Harsh Atal harsh.a...@gmail.com wrote: Hi We are planning to refactor our java based report module to a DHIS2 Web Application. For this we need access to the HTML Reports through the Web API. Going by the documentation it seems that it is not yet possible to do this. Will DHIS2 have WEB API support around the reports module in the near future? Regards harsh ___ 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 https://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 19496: oauth2 authorized_code grant_type, wip
revno: 19496 committer: Morten Olav Hansen morte...@gmail.com branch nick: dhis2 timestamp: Tue 2015-06-23 11:12:17 +0700 message: oauth2 authorized_code grant_type, wip removed: dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/uaa/ added: dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/uaa/oauth2/ConfirmAccessController.java dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/dhis-web-uaa/ dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/dhis-web-uaa/confirm_access.vm modified: dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/webapi-uaa.xml -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2015-06-22 10:11:42 + +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2015-06-23 04:12:17 + @@ -25,6 +25,19 @@ sec:custom-filter ref=clientCredentialsTokenEndpointFilter before=BASIC_AUTH_FILTER / sec:access-denied-handler ref=oauthAccessDeniedHandler / /sec:http + + sec:http pattern=/uaa/oauth/authorize/** authentication-manager-ref=authenticationManager disable-url-rewriting=true +sec:intercept-url pattern=/uaa/oauth/authorize/** access=IS_AUTHENTICATED_FULLY / +sec:http-basic / +sec:anonymous / + +!-- +form-login authentication-failure-url=/login.jsp?authentication_error=true + default-target-url=http://www.ourwebsite.com/; login-page=/login.jsp + login-processing-url=/login.do / + -- + /sec:http + !-- End OAuth2 -- bean id=mappedRedirectStrategy class=org.hisp.dhis.security.MappedRedirectStrategy === added file 'dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/uaa/oauth2/ConfirmAccessController.java' --- dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/uaa/oauth2/ConfirmAccessController.java 1970-01-01 00:00:00 + +++ dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/uaa/oauth2/ConfirmAccessController.java 2015-06-23 04:12:17 + @@ -0,0 +1,52 @@ +package org.hisp.dhis.web.uaa.oauth2; + +/* + * Copyright (c) 2004-2015, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.Map; + +/** + * @author Morten Olav Hansen morte...@gmail.com + */ +@Controller +@RequestMapping( value = /oauth/confirm_access, method = RequestMethod.GET ) +public class ConfirmAccessController +{ +@RequestMapping +public String confirmAccess( Model model, @RequestParam MapString, String rpParameters ) +{ +model.addAllAttributes( rpParameters ); +return confirm_access; +} +} === modified file 'dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/webapi-uaa.xml' --- dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/webapi-uaa.xml