Re: [Dhis2-devs] [Bug 1483215] Re: Exception while Importing Meta Data

2015-10-07 Thread Furqonuddin Ramdhani
Hi All,

is this bug already solved ? I still have this problem when importing my
metadata from version 2.19 to 2.20,

 ERROR 2015-10-08 06:07:57,109 ERROR: duplicate key value violates unique
constraint "uk_pbj3u1nk9vnuof8f47utvowmv"
  Detail: Key (name)=(default) already exists. (SqlExceptionHelper.java
[taskScheduler-2])
* ERROR 2015-10-08 06:07:57,111 Unexpected error occurred in scheduled
task. (TaskUtils.java [taskScheduler-2])
org.springframework.dao.DataIntegrityViolationException: could not execute
statement; SQL [n/a]; constraint [uk_pbj3u1nk9vnuof8f47utvowmv]; nested
exception is org.hibernate.exception.ConstraintViolationException: could
not execute statement

any suggestion ?

Thanks

On Fri, Sep 18, 2015 at 3:21 PM, jason.p.pickering <
1483...@bugs.launchpad.net> wrote:

> ** Changed in: dhis2
>Status: New => Fix Released
>
> --
> You received this bug notification because you are a member of DHIS 2
> developers, which is subscribed to DHIS.
> https://bugs.launchpad.net/bugs/1483215
>
> Title:
>   Exception while Importing Meta Data
>
> Status in DHIS:
>   Fix Released
>
> Bug description:
>   Hi,
>
>   Created a new Database with 5 Category Options, 2 Categories and 1
>   Category Combination, 1 data element, 2 dataset and 2 organisation
>   units.
>
>   Exported meta data with Import/Export App by selecting all
>   options(default selection) and got metadata.xml (zip file) and created
>   a fresh instance with empty database and tried to import the metadata
>   zip file to that and found following Exception.
>
>
>   * INFO  2015-08-10 16:36:44,952 User 'admin' started import at Mon Aug
> 10 16:36:
>   44 IST 2015 (DefaultImportService.java [taskScheduler-1])
>   * INFO  2015-08-10 16:36:44,954 [Level: INFO, category: METADATA_IMPORT,
> time: M
>   on Aug 10 16:36:44 IST 2015, message: Importing meta-data]
> (InMemoryNotifier.jav
>   a [taskScheduler-1])
>   * INFO  2015-08-10 16:36:44,958 Building object-bridge maps
> (preheatCache: true)
>   . (DefaultObjectBridge.java [taskScheduler-1])
>   * INFO  2015-08-10 16:36:45,170 Building object-bridge maps took 0.22
> seconds. (
>   DefaultObjectBridge.java [taskScheduler-1])
>   * INFO  2015-08-10 16:36:45,170 [Level: INFO, category: METADATA_IMPORT,
> time: M
>   on Aug 10 16:36:45 IST 2015, message: Importing 2 OrganisationUnits]
> (InMemoryNo
>   tifier.java [taskScheduler-1])
>   * INFO  2015-08-10 16:36:45,186 [Level: INFO, category: METADATA_IMPORT,
> time: M
>   on Aug 10 16:36:45 IST 2015, message: Importing 2
> OrganisationUnitLevels] (InMem
>   oryNotifier.java [taskScheduler-1])
>   * INFO  2015-08-10 16:36:45,201 [Level: INFO, category: METADATA_IMPORT,
> time: M
>   on Aug 10 16:36:45 IST 2015, message: Importing 6 CategoryOptions]
> (InMemoryNoti
>   fier.java [taskScheduler-1])
>   * INFO  2015-08-10 16:36:45,201 [Level: INFO, category: METADATA_IMPORT,
> time: M
>   on Aug 10 16:36:45 IST 2015, message: Importing 3 Categories]
> (InMemoryNotifier.
>   java [taskScheduler-1])
>   * INFO  2015-08-10 16:36:45,201 [Level: INFO, category: METADATA_IMPORT,
> time: M
>   on Aug 10 16:36:45 IST 2015, message: Importing 2 CategoryCombos]
> (InMemoryNotif
>   ier.java [taskScheduler-1])
>   * INFO  2015-08-10 16:36:45,217 [Level: INFO, category: METADATA_IMPORT,
> time: M
>   on Aug 10 16:36:45 IST 2015, message: Importing 7 CategoryOptionCombos]
> (InMemor
>   yNotifier.java [taskScheduler-1])
>   * INFO  2015-08-10 16:36:45,218 [Level: INFO, category: METADATA_IMPORT,
> time: M
>   on Aug 10 16:36:45 IST 2015, message: Importing 1 DataElements]
> (InMemoryNotifie
>   r.java [taskScheduler-1])
>   * INFO  2015-08-10 16:36:45,218 [Level: INFO, category: METADATA_IMPORT,
> time: M
>   on Aug 10 16:36:45 IST 2015, message: Importing 1 Users]
> (InMemoryNotifier.java
>   [taskScheduler-1])
>   * INFO  2015-08-10 16:36:45,218 [Level: INFO, category: METADATA_IMPORT,
> time: M
>   on Aug 10 16:36:45 IST 2015, message: Importing 1 DataSets]
> (InMemoryNotifier.ja
>   va [taskScheduler-1])
>   * WARN  2015-08-10 16:36:45,265 SQL Error: 0, SQLState: 23505
> (SqlExceptionHelpe
>   r.java [taskScheduler-1])
>   * ERROR 2015-08-10 16:36:45,265 ERROR: duplicate key value violates
> unique const
>   raint "uk_pbj3u1nk9vnuof8f47utvowmv"
> Detail: Key (name)=(default) already exists. (SqlExceptionHelper.java
> [taskSch
>   eduler-1])
>   * ERROR 2015-08-10 16:36:45,265 Unexpected error occurred in scheduled
> task. (Ta
>   skUtils.java [taskScheduler-1])
>   org.hibernate.exception.ConstraintViolationException: could not execute
> statemen
>   t
>   at
> org.hibernate.exception.internal.SQLStateConversionDelegate.convert(S
>   QLStateConversionDelegate.java:129)
>   at
> org.hibernate.exception.internal.StandardSQLExceptionConverter.conver
>   t(StandardSQLExceptionConverter.java:49)
>   at
> org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlException
>   Helper.java:124)
>   at
> 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20575: Made uploads from DHIS2 to file store (local or external providers alike) asynchronous. When a Fi...

2015-10-07 Thread noreply

revno: 20575
committer: Halvdan Hoem Grelland 
branch nick: dhis2
timestamp: Thu 2015-10-08 01:01:57 +0200
message:
  Made uploads from DHIS2 to file store (local or external providers alike) 
asynchronous. When a FileResource is posted the supplied content is verified to 
the best of our abilities and a FileResource metadata object is created, saved 
and immediately returned to the requester. In the meantime the supplied file is 
temporarily saved to disk on the server and an upload/put to the file store is 
performed in a background thread. Whilst the file is not yet uploaded/arrived 
at the destination file store it will have a FileResourceStorageStatus of 
PENDING and any GET of the file will be blocked (since there is no resource to 
return yet), yet the FileResource can still be referenced in a DataValue. Upon 
completed (or failed) upload of the resource the status is switched to STORED 
and GETs will return the content.
added:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceStorageStatus.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/FileResourceUploadCallbackProvider.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResource.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/fileresource/hibernate/FileResource.hbm.xml
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileResourceController.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/fileresource/FileResource.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResource.java	2015-10-01 07:51:29 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResource.java	2015-10-07 23:01:57 +
@@ -76,6 +76,11 @@
  */
 private FileResourceDomain domain;
 
+/**
+ * Current storage status of content.
+ */
+private FileResourceStorageStatus storageStatus = FileResourceStorageStatus.NONE;
+
 // -
 // Constructors
 // -
@@ -175,6 +180,19 @@
 return assigned;
 }
 
+public void setStorageStatus( FileResourceStorageStatus storageStatus )
+{
+this.storageStatus = storageStatus;
+}
+
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+public FileResourceStorageStatus getStorageStatus()
+{
+return storageStatus;
+}
+
 public void setAssigned( boolean assigned )
 {
 this.assigned = assigned;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java	2015-10-07 13:46:41 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java	2015-10-07 23:01:57 +
@@ -30,6 +30,7 @@
 
 import com.google.common.io.ByteSource;
 
+import java.io.File;
 import java.net.URI;
 
 /**
@@ -55,6 +56,16 @@
 String saveFileResourceContent( String key, ByteSource content, long size, String contentMd5 );
 
 /**
+ * Save the content of the file to the file store.
+ * @param key the key to use. Must be unique in the file store.
+ * @param file the file. The file will be consumed and deleted upon completion.
+ * @param size the byte length of the file.
+ * @param contentMd5 the MD5 digest of the file.
+ * @return the key on success or null if saving failed.
+ */
+String saveFileResourceContent( String key, File file, long size, String contentMd5 );
+
+/**
  * Delete the content bytes of a file resource.
  * @param key the key.
  */

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceService.java	

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20555: add missing @Scanned annotation for userAuthorityGroup.programs

2015-10-07 Thread noreply

revno: 20555
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-10-07 14:03:31 +0700
message:
  add missing @Scanned annotation for userAuthorityGroup.programs
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.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/UserAuthorityGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java	2015-10-05 07:55:19 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java	2015-10-07 07:03:31 +
@@ -79,6 +79,7 @@
 @Scanned
 private Set dataSets = new HashSet<>();
 
+@Scanned
 private Set programs = new HashSet<>();
 
 // -
@@ -255,8 +256,7 @@
 }
 else if ( strategy.isMerge() )
 {
-description = userAuthorityGroup.getDescription() == null ? description : userAuthorityGroup
-.getDescription();
+description = userAuthorityGroup.getDescription() == null ? description : userAuthorityGroup.getDescription();
 }
 
 removeAllAuthorities();

___
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 20556: add missing @Scanned annotation for Program.programIndicators

2015-10-07 Thread noreply

revno: 20556
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-10-07 14:04:18 +0700
message:
  add missing @Scanned annotation for Program.programIndicators
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.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/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2015-10-07 03:23:23 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2015-10-07 07:04:18 +
@@ -97,6 +97,7 @@
 @Scanned
 private Set userRoles = new HashSet<>();
 
+@Scanned
 private Set programIndicators = new HashSet<>();
 
 private Boolean onlyEnrollOnce = 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


Re: [Dhis2-devs] [Dhis2-users] SMS on GIS

2015-10-07 Thread Bridget Magoba
Thanks Riddy



From: riddy ndoma [mailto:riddynd...@gmail.com]
Sent: Wednesday, October 7, 2015 9:41 AM
To: Bridget Magoba
Cc: DHIS 2 developers; dhis1-users
Subject: RE: [Dhis2-users] SMS on GIS



Data sent by SMS and data entered via Dataentry form, it's Data in the 
system(Data value). Possible to see it on Map.

Cheers,

On Oct 7, 2015 7:37 AM, "Bridget Magoba"  > wrote:

I haven’t yet implemented it but I was inquiring if the sms sent can be 
configured to populate the map in GIS to show concentration in a particular org 
unit?



The way GIS works, data entered in populated on the map, can sms do the same?



Thanks



From: riddy ndoma [mailto:riddynd...@gmail.com  ]
Sent: Wednesday, October 7, 2015 9:28 AM
To: Bridget Magoba
Cc: DHIS 2 developers; dhis1-users
Subject: RE: [Dhis2-users] SMS on GIS



The SMS is a way of put data  in System like the Data entry form. It's possible.
Where's your problem?
Cheers,

On Oct 7, 2015 7:05 AM, "Bridget Magoba"  > wrote:

Dear Riddy,

That is exactly what I want.



thanks



From: riddy ndoma [mailto:riddynd...@gmail.com  ]
Sent: Wednesday, October 7, 2015 9:00 AM
To: Bridget Magoba
Cc: DHIS 2 developers; dhis1-users
Subject: Re: [Dhis2-users] SMS on GIS



Hi Bridget, what do you want exactly? Send data by SMS and see it on SIG?
Cheers,

On Oct 6, 2015 11:03 AM, "Bridget Magoba"  > wrote:

Dear all,



Am planning to implement SMS in my DHIS2 instance, Can the SMSs sent be 
populated on the map using GIS in DHIS2?



Thanks



Magoba Bridget

Database Manager

MIFUMI

Mobile: +256 774659892 

Tel: +256 414666946  /392174242

P.O Box 274, Tororo

Plot 13, Martyrs’ Drive, Ntinda

Kampala

www.mifumi.org 





  _


 

This email has been checked for viruses by Avast antivirus software.
www.avast.com 




___
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



  _


 

This email has been checked for viruses by Avast antivirus software.
www.avast.com 





  _


 

This email has been checked for viruses by Avast antivirus software.
www.avast.com 





---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
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 20561: tracker-capture: fetch uniquness related properties for tracked entity instance attributes

2015-10-07 Thread noreply

revno: 20561
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Wed 2015-10-07 11:09:53 +0200
message:
  tracker-capture: fetch uniquness related properties for tracked entity 
instance attributes
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-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-tracker-capture/scripts/tracker-capture.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js	2015-09-24 13:34:47 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js	2015-10-07 09:09:53 +
@@ -455,7 +455,7 @@
 dhis2.tc.store.get('attributes', teAttribute.id).done(function(obj) {
 if((!obj || obj.version !== teAttribute.version) && attributesInPromise.indexOf(teAttribute.id) === -1) {
 attributesInPromise.push( teAttribute.id );
-promise = promise.then( getD2Object( teAttribute.id, 'attributes', '../api/trackedEntityAttributes', 'fields=id,name,code,version,description,valueType,optionSetValue,confidential,inherit,sortOrderInVisitSchedule,sortOrderInListNoProgram,displayOnVisitSchedule,displayInListNoProgram,unique,optionSet[id,version]', 'idb' ) );
+promise = promise.then( getD2Object( teAttribute.id, 'attributes', '../api/trackedEntityAttributes', 'fields=id,name,code,version,description,valueType,optionSetValue,confidential,inherit,sortOrderInVisitSchedule,sortOrderInListNoProgram,displayOnVisitSchedule,displayInListNoProgram,unique,programScope,orgunitScope,confidential,optionSet[id,version]', 'idb' ) );
 }
 d.resolve();
 });

___
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 20557: minor rename in Program serialization, Program.instanceReminder is now exported as Program.tracke...

2015-10-07 Thread noreply

revno: 20557
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2015-10-07 14:06:47 +0700
message:
  minor rename in Program serialization, Program.instanceReminder is now 
exported as Program.trackedEntityInstanceReminders
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.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/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2015-10-07 07:04:18 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2015-10-07 07:06:47 +
@@ -494,9 +494,10 @@
 this.onlyEnrollOnce = onlyEnrollOnce;
 }
 
-@JsonProperty
+@JsonProperty( "trackedEntityInstanceReminders" )
 @JsonView( { DetailedView.class, ExportView.class } )
-@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlElementWrapper( localName = "trackedEntityInstanceReminders", namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlProperty( localName = "trackedEntityInstanceReminder", namespace = DxfNamespaces.DXF_2_0 )
 public Set getInstanceReminders()
 {
 return instanceReminders;

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


Re: [Dhis2-devs] [Dhis2-users] DHIS2 incoming SMS

2015-10-07 Thread J. Paul Mutali
Thanks all,

I have tried all the options but no luck.

I get a reply message like this: DHIS: null, and the number comes with a +
sign and DHIS fails to process the message.





On Tue, Oct 6, 2015 at 4:49 AM, Long Ngo Thanh 
wrote:

> Hi Paul,
>
> Could you please try this:
>
> Enable the "*Allow users to grant own user roles*" in Setting > Access
>
> This is related to the logic that the system look for user.
>
> Long
>
>
> On Tue, Oct 6, 2015 at 4:43 AM riddy ndoma  wrote:
>
>> Hi Paul.
>> Can you try to use directly the country code without "+" or "00"?  It
>> works well with the old version I think.
>>
>> Cheers,
>> On Oct 5, 2015 4:23 PM, "J. Paul Mutali"  wrote:
>>
>>> Hi there,
>>>
>>> We re testing receiving data in DHIS from sms,
>>> we have set up the datasets, and we are using the Generic HTTP gateway
>>> for SMS using the DHIS2 SMS gateway app on an android phone.
>>>
>>> the strange this is that the message are being received in DHIS, but the
>>> phone  number sending has +, and then the user is unkown and the status is
>>> failed.
>>>
>>> When you change the user phone and add the + , the username displays
>>> correctly but the the status is still failed, and re-import and it warns 
>>> "*no
>>> user associated with this phone number*"
>>> Any idea on how to fix this?
>>> We are using
>>> DHIS: ver 2.20
>>> Build: 19850
>>>
>>> thanks,
>>>
>>> Jp Mutali
>>>
>>> Kigali - Rwanda
>>>
>>> ___
>>>
>> Mailing list: https://launchpad.net/~dhis2-users
>>> Post to : dhis2-us...@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] SMS on GIS

2015-10-07 Thread Bridget Magoba
Dear Riddy,

That is exactly what I want.



thanks



From: riddy ndoma [mailto:riddynd...@gmail.com]
Sent: Wednesday, October 7, 2015 9:00 AM
To: Bridget Magoba
Cc: DHIS 2 developers; dhis1-users
Subject: Re: [Dhis2-users] SMS on GIS



Hi Bridget, what do you want exactly? Send data by SMS and see it on SIG?
Cheers,

On Oct 6, 2015 11:03 AM, "Bridget Magoba"  > wrote:

Dear all,



Am planning to implement SMS in my DHIS2 instance, Can the SMSs sent be 
populated on the map using GIS in DHIS2?



Thanks



Magoba Bridget

Database Manager

MIFUMI

Mobile: +256 774659892 

Tel: +256 414666946  /392174242

P.O Box 274, Tororo

Plot 13, Martyrs’ Drive, Ntinda

Kampala

www.mifumi.org 





  _


 

This email has been checked for viruses by Avast antivirus software.
www.avast.com 




___
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



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
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 20559: UserAuthorityGroup, renamed users -> user serialized name to userObject to avoid conflicts

2015-10-07 Thread noreply

revno: 20559
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2015-10-07 10:48:41 +0200
message:
  UserAuthorityGroup, renamed users -> user serialized name to userObject to 
avoid conflicts
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.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/UserAuthorityGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java	2015-10-07 07:03:31 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java	2015-10-07 08:48:41 +
@@ -178,9 +178,10 @@
 }
 
 @JsonProperty
-@JsonView( { DetailedView.class } )
+@JsonSerialize( contentAs = BaseIdentifiableObject.class )
+@JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlElementWrapper( localName = "users", namespace = DxfNamespaces.DXF_2_0 )
-@JacksonXmlProperty( localName = "user", namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlProperty( localName = "userObject", namespace = DxfNamespaces.DXF_2_0 )
 public List getUsers()
 {
 List users = new ArrayList<>();

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


Re: [Dhis2-devs] [Dhis2-users] SMS on GIS

2015-10-07 Thread riddy ndoma
Hi Bridget, what do you want exactly? Send data by SMS and see it on SIG?
Cheers,
On Oct 6, 2015 11:03 AM, "Bridget Magoba"  wrote:

> Dear all,
>
>
>
> Am planning to implement SMS in my DHIS2 instance, Can the SMSs sent be
> populated on the map using GIS in DHIS2?
>
>
>
> Thanks
>
>
>
> Magoba Bridget
>
> Database Manager
>
> MIFUMI
>
> Mobile: +256 774659892
>
> Tel: +256 414666946/392174242
>
> P.O Box 274, Tororo
>
> Plot 13, Martyrs’ Drive, Ntinda
>
> Kampala
>
> www.mifumi.org
>
>
>
>
> --
> [image: Avast logo] 
>
> This email has been checked for viruses by Avast antivirus software.
> www.avast.com 
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] SMS on GIS

2015-10-07 Thread riddy ndoma
The SMS is a way of put data  in System like the Data entry form. It's
possible.
Where's your problem?
Cheers,
On Oct 7, 2015 7:05 AM, "Bridget Magoba"  wrote:

> Dear Riddy,
>
> That is exactly what I want.
>
>
>
> thanks
>
>
>
> *From:* riddy ndoma [mailto:riddynd...@gmail.com]
> *Sent:* Wednesday, October 7, 2015 9:00 AM
> *To:* Bridget Magoba
> *Cc:* DHIS 2 developers; dhis1-users
> *Subject:* Re: [Dhis2-users] SMS on GIS
>
>
>
> Hi Bridget, what do you want exactly? Send data by SMS and see it on SIG?
> Cheers,
>
> On Oct 6, 2015 11:03 AM, "Bridget Magoba" 
> wrote:
>
> Dear all,
>
>
>
> Am planning to implement SMS in my DHIS2 instance, Can the SMSs sent be
> populated on the map using GIS in DHIS2?
>
>
>
> Thanks
>
>
>
> Magoba Bridget
>
> Database Manager
>
> MIFUMI
>
> Mobile: +256 774659892
>
> Tel: +256 414666946/392174242
>
> P.O Box 274, Tororo
>
> Plot 13, Martyrs’ Drive, Ntinda
>
> Kampala
>
> www.mifumi.org
>
>
>
>
> --
>
> [image: Image removed by sender. Avast logo]
> 
>
> This email has been checked for viruses by Avast antivirus software.
> www.avast.com 
>
>
>
>
> ___
> 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
>
>
>
> --
> [image: Avast logo] 
>
> This email has been checked for viruses by Avast antivirus software.
> www.avast.com 
>
>
___
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 20558: When uploading files, the file parameter is now required. The response after uploading a file is ...

2015-10-07 Thread noreply
Merge authors:
  Stian Sandvold (stian-sandvold)

revno: 20558 [merge]
committer: Stian Sandvold 
branch nick: dhis2
timestamp: Wed 2015-10-07 10:43:13 +0200
message:
  When uploading files, the file parameter is now required. The response after 
uploading a file is now HttpStatus.NO_CONTENT, the same as AppController
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.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/StaticContentController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java	2015-10-06 18:24:42 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java	2015-10-07 08:36:33 +
@@ -50,10 +50,7 @@
 import org.springframework.stereotype.Controller;
 import org.springframework.util.MimeType;
 import org.springframework.util.MimeTypeUtils;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import com.google.common.collect.ImmutableMap;
@@ -150,10 +147,11 @@
  * @throws WebMessageException
  * @throws IOException
  */
+@ResponseStatus( HttpStatus.NO_CONTENT )
 @RequestMapping( value = "/{key}", method = RequestMethod.POST )
 public void updateStaticContent(
 @PathVariable( "key" ) String key,
-@RequestParam( value = "file", required = false ) MultipartFile file )
+@RequestParam( value = "file", required = true ) MultipartFile file )
 throws WebMessageException, IOException
 {
 if ( file == null || file.isEmpty() )

___
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 20560: Including dynamic part of error and warning messages where present

2015-10-07 Thread noreply

revno: 20560
committer: Markus Bekken 
branch nick: dhis2
timestamp: Wed 2015-10-07 10:51:26 +0200
message:
  Including dynamic part of error and warning messages where present
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-tracker-capture/components/dataentry/dataentry-controller.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-10-01 10:07:00 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-10-07 08:51:26 +
@@ -1027,14 +1027,14 @@
 if(effect.action === "SHOWERROR" && effect.dataElement.id){
 var dialogOptions = {
 headerText: 'validation_error',
-bodyText: effect.content
+bodyText: effect.content + effect.data
 };
 DialogService.showDialog({}, dialogOptions);
 
 $scope.currentEvent[effect.dataElement.id] = $scope.currentEventOriginialValue[effect.dataElement.id];
 }
 if(effect.action === "SHOWWARNING"){
-$scope.warningMessages.push(effect.content);
+$scope.warningMessages.push(effect.content + effect.data);
 }
 }
 });

=== modified file '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-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-10-06 15:14:42 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-10-07 08:51:26 +
@@ -120,7 +120,7 @@
 if (effect.dataElement) {
 
 if(effect.ineffect) {
-$scope.errorMessages[effect.dataElement.id] = effect.content;
+$scope.errorMessages[effect.dataElement.id] = effect.content + effect.data;
 } else {
 $scope.errorMessages[effect.dataElement.id] = false;
 }
@@ -131,7 +131,7 @@
 } else if (effect.action === "SHOWWARNING") {
 if (effect.dataElement) {
 if(effect.ineffect) {
-$scope.warningMessages[effect.dataElement.id] = effect.content;
+$scope.warningMessages[effect.dataElement.id] = effect.content + effect.data;
 } else {
 $scope.warningMessages[effect.dataElement.id] = 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


Re: [Dhis2-devs] [Bug 1483215] Re: Exception while Importing Meta Data

2015-10-07 Thread Furqonuddin Ramdhani
Thanks Morten, it works.

Regards,
Furqon

On Thu, Oct 8, 2015 at 8:51 AM, Morten Olav Hansen 
wrote:

> Hi
>
> This is not an ideal solution, but could you take your XML file and find
> all category/options with name "default" and remove them? hopefully it
> should work after that, we did fix a bug similar to this a few weeks ago..
> but I'm hearing some people still have issues with it, so I will have
> another look
>
> --
> Morten
>
> On Thu, Oct 8, 2015 at 6:32 AM, Furqonuddin Ramdhani 
> wrote:
>
>> Hi All,
>>
>> is this bug already solved ? I still have this problem when importing my
>> metadata from version 2.19 to 2.20,
>>
>>  ERROR 2015-10-08 06:07:57,109 ERROR: duplicate key value violates unique
>> constraint "uk_pbj3u1nk9vnuof8f47utvowmv"
>>   Detail: Key (name)=(default) already exists. (SqlExceptionHelper.java
>> [taskScheduler-2])
>> * ERROR 2015-10-08 06:07:57,111 Unexpected error occurred in scheduled
>> task. (TaskUtils.java [taskScheduler-2])
>> org.springframework.dao.DataIntegrityViolationException: could not
>> execute statement; SQL [n/a]; constraint [uk_pbj3u1nk9vnuof8f47utvowmv];
>> nested exception is org.hibernate.exception.ConstraintViolationException:
>> could not execute statement
>>
>> any suggestion ?
>>
>> Thanks
>>
>> On Fri, Sep 18, 2015 at 3:21 PM, jason.p.pickering <
>> 1483...@bugs.launchpad.net> wrote:
>>
>>> ** Changed in: dhis2
>>>Status: New => Fix Released
>>>
>>> --
>>> You received this bug notification because you are a member of DHIS 2
>>> developers, which is subscribed to DHIS.
>>>
>>> https://bugs.launchpad.net/bugs/1483215
>>>
>>> Title:
>>>   Exception while Importing Meta Data
>>>
>>> Status in DHIS:
>>>   Fix Released
>>>
>>> Bug description:
>>>   Hi,
>>>
>>>   Created a new Database with 5 Category Options, 2 Categories and 1
>>>   Category Combination, 1 data element, 2 dataset and 2 organisation
>>>   units.
>>>
>>>   Exported meta data with Import/Export App by selecting all
>>>   options(default selection) and got metadata.xml (zip file) and created
>>>   a fresh instance with empty database and tried to import the metadata
>>>   zip file to that and found following Exception.
>>>
>>>
>>>   * INFO  2015-08-10 16:36:44,952 User 'admin' started import at Mon Aug
>>> 10 16:36:
>>>   44 IST 2015 (DefaultImportService.java [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:44,954 [Level: INFO, category:
>>> METADATA_IMPORT, time: M
>>>   on Aug 10 16:36:44 IST 2015, message: Importing meta-data]
>>> (InMemoryNotifier.jav
>>>   a [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:44,958 Building object-bridge maps
>>> (preheatCache: true)
>>>   . (DefaultObjectBridge.java [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:45,170 Building object-bridge maps took 0.22
>>> seconds. (
>>>   DefaultObjectBridge.java [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:45,170 [Level: INFO, category:
>>> METADATA_IMPORT, time: M
>>>   on Aug 10 16:36:45 IST 2015, message: Importing 2 OrganisationUnits]
>>> (InMemoryNo
>>>   tifier.java [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:45,186 [Level: INFO, category:
>>> METADATA_IMPORT, time: M
>>>   on Aug 10 16:36:45 IST 2015, message: Importing 2
>>> OrganisationUnitLevels] (InMem
>>>   oryNotifier.java [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:45,201 [Level: INFO, category:
>>> METADATA_IMPORT, time: M
>>>   on Aug 10 16:36:45 IST 2015, message: Importing 6 CategoryOptions]
>>> (InMemoryNoti
>>>   fier.java [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:45,201 [Level: INFO, category:
>>> METADATA_IMPORT, time: M
>>>   on Aug 10 16:36:45 IST 2015, message: Importing 3 Categories]
>>> (InMemoryNotifier.
>>>   java [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:45,201 [Level: INFO, category:
>>> METADATA_IMPORT, time: M
>>>   on Aug 10 16:36:45 IST 2015, message: Importing 2 CategoryCombos]
>>> (InMemoryNotif
>>>   ier.java [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:45,217 [Level: INFO, category:
>>> METADATA_IMPORT, time: M
>>>   on Aug 10 16:36:45 IST 2015, message: Importing 7
>>> CategoryOptionCombos] (InMemor
>>>   yNotifier.java [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:45,218 [Level: INFO, category:
>>> METADATA_IMPORT, time: M
>>>   on Aug 10 16:36:45 IST 2015, message: Importing 1 DataElements]
>>> (InMemoryNotifie
>>>   r.java [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:45,218 [Level: INFO, category:
>>> METADATA_IMPORT, time: M
>>>   on Aug 10 16:36:45 IST 2015, message: Importing 1 Users]
>>> (InMemoryNotifier.java
>>>   [taskScheduler-1])
>>>   * INFO  2015-08-10 16:36:45,218 [Level: INFO, category:
>>> METADATA_IMPORT, time: M
>>>   on Aug 10 16:36:45 IST 2015, message: Importing 1 DataSets]
>>> (InMemoryNotifier.ja
>>>   va [taskScheduler-1])
>>>   * WARN  2015-08-10 16:36:45,265 SQL Error: 0, SQLState: 23505
>>> (SqlExceptionHelpe
>>>   r.java [taskScheduler-1])
>>>   * ERROR 2015-08-10 16:36:45,265 ERROR: duplicate 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20576: adding back package-info.java in sms config package, should not have been removed

2015-10-07 Thread noreply

revno: 20576
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Thu 2015-10-08 09:09:43 +0700
message:
  adding back package-info.java in sms config package, should not have been 
removed
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/package-info.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
=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/package-info.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/package-info.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/package-info.java	2015-10-08 02:09:43 +
@@ -0,0 +1,44 @@
+/**
+ * @author bobj
+ */
+
+@XmlSchema(
+		namespace = "http://dhis2.org/schema/dxf/2.0;,
+		xmlns = {   
+			@XmlNs(namespaceURI = "http://dhis2.org/schema/dxf/2.0;, prefix = "d")  
+		},
+		elementFormDefault = XmlNsForm.QUALIFIED) 
+
+package org.hisp.dhis.sms.config;
+
+/*
+ * 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 javax.xml.bind.annotation.XmlSchema;
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;

___
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 20577: minor fix in property introspector, also treat customtype as single column type (in our case, it ...

2015-10-07 Thread noreply

revno: 20577
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Thu 2015-10-08 11:16:40 +0700
message:
  minor fix in property introspector, also treat customtype as single column 
type (in our case, it is used only for enums)
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java	2015-09-13 21:12:28 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java	2015-10-08 04:16:40 +
@@ -40,6 +40,7 @@
 import org.hibernate.persister.entity.Joinable;
 import org.hibernate.type.AssociationType;
 import org.hibernate.type.CollectionType;
+import org.hibernate.type.CustomType;
 import org.hibernate.type.DoubleType;
 import org.hibernate.type.IntegerType;
 import org.hibernate.type.LongType;
@@ -57,6 +58,7 @@
 import org.hisp.dhis.common.DimensionalObject;
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.NameableObject;
+import org.hisp.dhis.dataelement.DataElement;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;
 import org.springframework.orm.hibernate4.LocalSessionFactoryBean;
@@ -274,7 +276,7 @@
 property.setOneToOne( true );
 }
 
-if ( SingleColumnType.class.isInstance( type ) )
+if ( SingleColumnType.class.isInstance( type ) || CustomType.class.isInstance( type ) )
 {
 Column column = (Column) hibernateProperty.getColumnIterator().next();
 

___
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 1483215] Re: Exception while Importing Meta Data

2015-10-07 Thread Morten Olav Hansen
Hi

This is not an ideal solution, but could you take your XML file and find
all category/options with name "default" and remove them? hopefully it
should work after that, we did fix a bug similar to this a few weeks ago..
but I'm hearing some people still have issues with it, so I will have
another look

--
Morten

On Thu, Oct 8, 2015 at 6:32 AM, Furqonuddin Ramdhani 
wrote:

> Hi All,
>
> is this bug already solved ? I still have this problem when importing my
> metadata from version 2.19 to 2.20,
>
>  ERROR 2015-10-08 06:07:57,109 ERROR: duplicate key value violates unique
> constraint "uk_pbj3u1nk9vnuof8f47utvowmv"
>   Detail: Key (name)=(default) already exists. (SqlExceptionHelper.java
> [taskScheduler-2])
> * ERROR 2015-10-08 06:07:57,111 Unexpected error occurred in scheduled
> task. (TaskUtils.java [taskScheduler-2])
> org.springframework.dao.DataIntegrityViolationException: could not execute
> statement; SQL [n/a]; constraint [uk_pbj3u1nk9vnuof8f47utvowmv]; nested
> exception is org.hibernate.exception.ConstraintViolationException: could
> not execute statement
>
> any suggestion ?
>
> Thanks
>
> On Fri, Sep 18, 2015 at 3:21 PM, jason.p.pickering <
> 1483...@bugs.launchpad.net> wrote:
>
>> ** Changed in: dhis2
>>Status: New => Fix Released
>>
>> --
>> You received this bug notification because you are a member of DHIS 2
>> developers, which is subscribed to DHIS.
>>
>> https://bugs.launchpad.net/bugs/1483215
>>
>> Title:
>>   Exception while Importing Meta Data
>>
>> Status in DHIS:
>>   Fix Released
>>
>> Bug description:
>>   Hi,
>>
>>   Created a new Database with 5 Category Options, 2 Categories and 1
>>   Category Combination, 1 data element, 2 dataset and 2 organisation
>>   units.
>>
>>   Exported meta data with Import/Export App by selecting all
>>   options(default selection) and got metadata.xml (zip file) and created
>>   a fresh instance with empty database and tried to import the metadata
>>   zip file to that and found following Exception.
>>
>>
>>   * INFO  2015-08-10 16:36:44,952 User 'admin' started import at Mon Aug
>> 10 16:36:
>>   44 IST 2015 (DefaultImportService.java [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:44,954 [Level: INFO, category:
>> METADATA_IMPORT, time: M
>>   on Aug 10 16:36:44 IST 2015, message: Importing meta-data]
>> (InMemoryNotifier.jav
>>   a [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:44,958 Building object-bridge maps
>> (preheatCache: true)
>>   . (DefaultObjectBridge.java [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:45,170 Building object-bridge maps took 0.22
>> seconds. (
>>   DefaultObjectBridge.java [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:45,170 [Level: INFO, category:
>> METADATA_IMPORT, time: M
>>   on Aug 10 16:36:45 IST 2015, message: Importing 2 OrganisationUnits]
>> (InMemoryNo
>>   tifier.java [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:45,186 [Level: INFO, category:
>> METADATA_IMPORT, time: M
>>   on Aug 10 16:36:45 IST 2015, message: Importing 2
>> OrganisationUnitLevels] (InMem
>>   oryNotifier.java [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:45,201 [Level: INFO, category:
>> METADATA_IMPORT, time: M
>>   on Aug 10 16:36:45 IST 2015, message: Importing 6 CategoryOptions]
>> (InMemoryNoti
>>   fier.java [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:45,201 [Level: INFO, category:
>> METADATA_IMPORT, time: M
>>   on Aug 10 16:36:45 IST 2015, message: Importing 3 Categories]
>> (InMemoryNotifier.
>>   java [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:45,201 [Level: INFO, category:
>> METADATA_IMPORT, time: M
>>   on Aug 10 16:36:45 IST 2015, message: Importing 2 CategoryCombos]
>> (InMemoryNotif
>>   ier.java [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:45,217 [Level: INFO, category:
>> METADATA_IMPORT, time: M
>>   on Aug 10 16:36:45 IST 2015, message: Importing 7 CategoryOptionCombos]
>> (InMemor
>>   yNotifier.java [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:45,218 [Level: INFO, category:
>> METADATA_IMPORT, time: M
>>   on Aug 10 16:36:45 IST 2015, message: Importing 1 DataElements]
>> (InMemoryNotifie
>>   r.java [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:45,218 [Level: INFO, category:
>> METADATA_IMPORT, time: M
>>   on Aug 10 16:36:45 IST 2015, message: Importing 1 Users]
>> (InMemoryNotifier.java
>>   [taskScheduler-1])
>>   * INFO  2015-08-10 16:36:45,218 [Level: INFO, category:
>> METADATA_IMPORT, time: M
>>   on Aug 10 16:36:45 IST 2015, message: Importing 1 DataSets]
>> (InMemoryNotifier.ja
>>   va [taskScheduler-1])
>>   * WARN  2015-08-10 16:36:45,265 SQL Error: 0, SQLState: 23505
>> (SqlExceptionHelpe
>>   r.java [taskScheduler-1])
>>   * ERROR 2015-08-10 16:36:45,265 ERROR: duplicate key value violates
>> unique const
>>   raint "uk_pbj3u1nk9vnuof8f47utvowmv"
>> Detail: Key (name)=(default) already exists. (SqlExceptionHelper.java
>> [taskSch
>>   eduler-1])
>>   * ERROR 2015-08-10 16:36:45,265 Unexpected error occurred in scheduled
>> 

[Dhis2-devs] question on individual section

2015-10-07 Thread channara rin
HI DHIS2 family,
i have one question relate to individual trackers.
1.Example: if we track all information about Children's profile and receive
health services. and then those children is grow up and get married. and
then get pregnant. so we have another program relate to pregnant women
program. so how can we move to new program? or we need to create profile
again to new program?

2.i have one data element is need to know the remaining of trackers that
didn't come to get ART/Pre-ART service every quaterly. so to do aggregate
function to that Data Element?


thank you
CHANNARA
___
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 20562: tracker-capture: removed unneccessary code

2015-10-07 Thread noreply

revno: 20562
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Wed 2015-10-07 11:14:45 +0200
message:
  tracker-capture: removed unneccessary code
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html


--
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/default-registration-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html	2015-10-06 10:52:09 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html	2015-10-07 09:14:45 +
@@ -119,8 +119,6 @@
 {{errorMessages[attribute.id]}}
 
 
- 
-
 
 


___
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 20563: Minor

2015-10-07 Thread noreply

revno: 20563
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2015-10-07 11:31:10 +0200
message:
  Minor
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/Setting.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/setting/Setting.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/Setting.java	2015-10-06 22:15:19 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/Setting.java	2015-10-07 09:31:10 +
@@ -55,7 +55,6 @@
 EMAIL_HOST_NAME( "keyEmailHostName" ),
 EMAIL_PORT( "keyEmailPort", 587, Integer.class ),
 EMAIL_USERNAME( "keyEmailUsername" ),
-EMAIL_PASSWORD( "keyEmailPassword" ),
 EMAIL_TLS( "keyEmailTls", Boolean.TRUE, Boolean.class ),
 EMAIL_SENDER( "keyEmailSender" ),
 INSTANCE_BASE_URL( "keyInstanceBaseUrl" ),

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


Re: [Dhis2-devs] [Dhis2-users] Web Portal with DHIS2

2015-10-07 Thread Jan Henrik Øverland
Hi Hannan,

You need to use version 2.20.

On Mon, Oct 5, 2015 at 1:43 PM, Hannan Khan  wrote:

> I am facing the same problem: One script following the manual is:
>
> 
> 
> 
>   http://dhis2-cdn.org/v219/ext/resources/css/ext-plugin-gray.css; />
>   http://dhis2-cdn.org/v219/ext/ext-all.js";>
>   http://dhis2-cdn.org/v219/plugin/chart.js";>
>
>   
> var base = "http://103.247.238.82:8080/dhismohfw/";;
>
> // Login - if OK, call the setLinks function
>
> Ext.onReady( function() {
>   Ext.Ajax.request({
> url: base + "dhis-web-commons-security/login.action",
> method: "POST",
> params: { j_username: "view", j_password: "DGHS1234" },
> crossDomain: true,
> success: setLinks
>   });
> });
>
> function setLinks() {
>
>   // Referring to an existing chart through the id parameter, render
> to "chart1" div
>
>   DHIS.getChart({ url: base, el: "chart1", id: "SYELB2ltOpL" });
>
>   // Full chart configuration, render to "chart2" div
>
>   DHIS.getChart({
> url: base,
> el: "chart2",
> type: "stackedBar",
> columns: [ // Chart series
>   {dimension: "de", items: [{id: "Fnsa8A43USl"}, {id:
> "CRZkTTALRSb"}]}
> ],
> rows: [ // Chart categories
>   {dimension: "pe", items: [{id: "LAST_12_MONTHS"}]}
> ],
> filters: [
>   {dimension: "ou", items: [{id: "USER_ORGUNIT"}]}
> ],
> // All following options are optional
> crossDomain: true,
> showData: false,
> targetLineValue: 70,
> baseLineValue: 20,
> showTrendLine: true,
> hideLegend: true,
> title: "My chart title",
> domainAxisTitle: "Periods",
> rangeAxisTitle: "Percent"
>   });
> }
>   
> 
>
> 
>   
>   
> 
> 
>
> generating the error "XMLHttpRequest cannot load
> http://103.247.238.82:8080/dhismohfw/dhis-web-commons-security/login.action.
> Response for preflight is invalid (redirect)"
>
> If i use code as Jan suggests:
>
> 
> 
> 
>   http://dhis2-cdn.org/v219/ext/resources/css/ext-plugin-gray.css; />
>   http://dhis2-cdn.org/v219/ext/ext-all.js";>
>   http://dhis2-cdn.org/v219/plugin/chart.js";>
> 
> 
> 
> 
> var url = "http://103.248.238.82:8080/dhismohfw/";,
> username = "view",
> password = "DGHS1234";
>
> Ext.onReady(function() {
>
> DHIS.getChart({
> url: url,
> el: "chart1",
> id: "SYELB2ltOpL",
> crossDomain: true,
> username: username,
> password: password
> });
>
> });
>   
>
> 
> 
>
> then the following error occurs.
>
> GET
> http://103.248.238.82:8080/dhismohfw/api/me/user-account.jsonp?callback=Ext.data.JsonP.callback1&_dc=1444041788222
> net::ERR_CONNECTION_TIMED_OUTExt.Element.addMethods.appendTo @
> ext-all.js:15Ext.Element.addMethods.appendChild @
> ext-all.js:15Ext.define.request @ ext-all.js:15a @
> chart.js:1DV.plugin.getChart @ chart.js:1(anonymous function) @
> testchart1.html:16(anonymous function) @ ext-all.js:15b @ ext-all.js:15
> ext-all.js:15 GET
> http://103.248.238.82:8080/dhismohfw/api/organisationUnits.jsonp?userOnly=t…[id,name]=false=Ext.data.JsonP.callback2&_dc=1444041788230
> net::ERR_CONNECTION_TIMED_OUTExt.Element.addMethods.appendTo @
> ext-all.js:15Ext.Element.addMethods.appendChild @
> ext-all.js:15Ext.define.request @ ext-all.js:15a @
> chart.js:1DV.plugin.getChart @ chart.js:1(anonymous function) @
> testchart1.html:16(anonymous function) @ ext-all.js:15b @ ext-all.js:15
> ext-all.js:15 GET
> http://103.248.238.82:8080/dhismohfw/api/dimensions.jsonp?links=false=false=Ext.data.JsonP.callback3&_dc=1444041788231
> net::ERR_CONNECTION_TIMED_OUTExt.Element.addMethods.appendTo @
> ext-all.js:15Ext.Element.addMethods.appendChild @
> ext-all.js:15Ext.define.request @ ext-all.js:15a @
> chart.js:1DV.plugin.getChart @ chart.js:1(anonymous function) @
> testchart1.html:16(anonymous function) @ ext-all.js:15b @ ext-all.js:15
>
> Please help me to solve this.
>
> On Fri, Oct 2, 2015 at 8:18 PM, Guy Ekani  wrote:
>
>> Thank's Jan !
>>
>> It's working with https://dhis2-cdn.org/v217/plugin/table.js on Google
>> Chrome,
>>
>> But not Displaying in Mozilla Firefox !
>>
>> May God Bless you all
>>
>> =
>> EKANI Guy
>>
>>
>>
>>
>>
>>
>>
>>
>> Le Vendredi 2 octobre 2015 15h08, Jan Henrik Øverland <
>> janhenrik.overl...@gmail.com> a écrit :
>>
>>
>> You need to add exactly
>>
>> http://localhost:8082
>>
>> (without the final /) to the CORS whitelist.
>>
>> On Fri, Oct 2, 2015 at 4:50 PM, Guy Ekani  wrote:
>>
>> Now I have the following errors in DHIS-Live 2.20(19682)/PosgreSQL :
>>
>> 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20566: Added support for ListenableFuture in Scheduler and implemented in SpringScheduler. New method im...

2015-10-07 Thread noreply

revno: 20566
committer: Halvdan Hoem Grelland 
branch nick: dhis2
timestamp: Wed 2015-10-07 15:25:14 +0200
message:
  Added support for ListenableFuture in Scheduler and implemented in 
SpringScheduler. New method immediately executes and returns a 
ListenableFuture, allowing callbacks to be registered for task completion.
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/Scheduler.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.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-system/src/main/java/org/hisp/dhis/system/scheduling/Scheduler.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/Scheduler.java	2015-09-14 18:06:48 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/Scheduler.java	2015-10-07 13:25:14 +
@@ -28,6 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.springframework.util.concurrent.ListenableFuture;
+
+import java.util.concurrent.Callable;
+
 /**
  * Scheduler for managing the scheduling and execution of tasks.
  *
@@ -52,6 +56,15 @@
  * @task the task to execute.
  */
 void executeTask( Runnable task );
+
+/**
+ * Execute the given task immediately and return a ListenableFuture.
+ *
+ * @param callable the task to execute.
+ * @param  return type of the supplied callable.
+ * @return a ListenableFuture representing the result of the task.
+ */
+ ListenableFuture executeTask( Callable callable );
 
 /**
  * Schedule the given task for future execution. The task can be referenced

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java	2015-06-05 12:56:34 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java	2015-10-07 13:25:14 +
@@ -31,13 +31,15 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.concurrent.Callable;
 import java.util.concurrent.ScheduledFuture;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.core.task.TaskExecutor;
+import org.springframework.core.task.AsyncListenableTaskExecutor;
 import org.springframework.scheduling.TaskScheduler;
 import org.springframework.scheduling.support.CronTrigger;
+import org.springframework.util.concurrent.ListenableFuture;
 
 /**
  * {@link Scheduler} implementation for use within the Spring framework.
@@ -61,9 +63,9 @@
 this.taskScheduler = taskScheduler;
 }
 
-private TaskExecutor taskExecutor;
+private AsyncListenableTaskExecutor taskExecutor;
 
-public void setTaskExecutor( TaskExecutor taskExecutor )
+public void setTaskExecutor( AsyncListenableTaskExecutor taskExecutor )
 {
 this.taskExecutor = taskExecutor;
 }
@@ -79,6 +81,12 @@
 }
 
 @Override
+public  ListenableFuture executeTask( Callable callable )
+{
+return taskExecutor.submitListenable( callable );
+}
+
+@Override
 public boolean scheduleTask( String key, Runnable task, String cronExpr )
 {
 if ( key != null && !futures.containsKey( key ) )

___
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 20570: Simplify boolean expressions

2015-10-07 Thread noreply

revno: 20570
committer: Halvdan Hoem Grelland 
branch nick: dhis2
timestamp: Wed 2015-10-07 15:48:07 +0200
message:
  Simplify boolean expressions
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.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-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java	2015-10-07 13:46:41 +
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java	2015-10-07 13:48:07 +
@@ -110,7 +110,7 @@
 {
 ScheduledFuture future = futures.get( key );
 
-boolean result = future != null ? future.cancel( true ) : false;
+boolean result = future != null && future.cancel( true );
 
 futures.remove( key );
 
@@ -133,7 +133,7 @@
 
 ScheduledFuture future = futures.get( key );
 
-boolean result = future != null ? future.cancel( true ) : false;
+boolean result = future != null && future.cancel( true );
 
 keys.remove();
 

___
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 20564: TEI query. Optional inclusion of relationships.

2015-10-07 Thread noreply

revno: 20564
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2015-10-07 14:34:21 +0200
message:
  TEI query. Optional inclusion of relationships.
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/TrackedEntityInstanceService.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityInstanceController.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java	2015-10-02 09:07:28 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java	2015-10-07 12:34:21 +
@@ -28,7 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.google.common.collect.Lists;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
 import org.hisp.dhis.common.CodeGenerator;
 import org.hisp.dhis.common.IdentifiableObjectManager;
 import org.hisp.dhis.commons.collection.CachingMap;
@@ -51,12 +56,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
+import com.google.common.collect.Lists;
 
 /**
  * @author Morten Olav Hansen 
@@ -103,9 +103,16 @@
 // -
 
 @Override
-public List getTrackedEntityInstances( List trackedEntityInstances )
+public List getTrackedEntityInstances( List trackedEntityInstances, boolean includeRelationships )
 {
-return trackedEntityInstances.stream().map( this::getTrackedEntityInstance ).collect( Collectors.toList() );
+List teiItems = new ArrayList<>();
+
+for ( org.hisp.dhis.trackedentity.TrackedEntityInstance trackedEntityInstance : trackedEntityInstances )
+{
+teiItems.add( getTrackedEntityInstance( trackedEntityInstance, includeRelationships ) );
+}
+
+return teiItems;
 }
 
 @Override
@@ -121,7 +128,7 @@
 }
 
 @Override
-public TrackedEntityInstance getTrackedEntityInstance( org.hisp.dhis.trackedentity.TrackedEntityInstance entityInstance, boolean expandRelative )
+public TrackedEntityInstance getTrackedEntityInstance( org.hisp.dhis.trackedentity.TrackedEntityInstance entityInstance, boolean includeRelationships )
 {
 if ( entityInstance == null )
 {
@@ -136,19 +143,21 @@
 trackedEntityInstance.setLastUpdated( entityInstance.getLastUpdated().toString() );
 trackedEntityInstance.setInactive( entityInstance.isInactive() );
 
-Collection relationships = relationshipService.getRelationshipsForTrackedEntityInstance( entityInstance );
-
-for ( Relationship entityRelationship : relationships )
-{
-org.hisp.dhis.dxf2.events.trackedentity.Relationship relationship = new org.hisp.dhis.dxf2.events.trackedentity.Relationship();
-relationship.setDisplayName( entityRelationship.getRelationshipType().getDisplayName() );
-relationship.setTrackedEntityInstanceA( entityRelationship.getEntityInstanceA().getUid() );
-relationship.setTrackedEntityInstanceB( entityRelationship.getEntityInstanceB().getUid() );
-
-relationship.setRelationship( entityRelationship.getRelationshipType().getUid() );
-
-if ( expandRelative )
+if ( includeRelationships )
+{
+//TODO include relationships in data model and void transactional query in for-loop
+
+Collection relationships = relationshipService.getRelationshipsForTrackedEntityInstance( entityInstance );
+
+for ( Relationship entityRelationship : relationships )
 {
+org.hisp.dhis.dxf2.events.trackedentity.Relationship relationship = new org.hisp.dhis.dxf2.events.trackedentity.Relationship();
+relationship.setDisplayName( entityRelationship.getRelationshipType().getDisplayName() );
+

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20568: Undo wrongful commit

2015-10-07 Thread noreply

revno: 20568
committer: Halvdan Hoem Grelland 
branch nick: dhis2
timestamp: Wed 2015-10-07 15:46:41 +0200
message:
  Undo wrongful commit
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileResourceController.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/fileresource/FileResourceContentStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java	2015-10-07 13:43:35 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java	2015-10-07 13:46:41 +
@@ -30,7 +30,6 @@
 
 import com.google.common.io.ByteSource;
 
-import java.io.IOException;
 import java.net.URI;
 
 /**
@@ -55,8 +54,6 @@
  */
 String saveFileResourceContent( String key, ByteSource content, long size, String contentMd5 );
 
-String saveFileResourceContent2( String key, ByteSource content, long size, String contentMd5 ) throws IOException;
-
 /**
  * Delete the content bytes of a file resource.
  * @param key the key.

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java	2015-10-07 13:43:35 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java	2015-10-07 13:46:41 +
@@ -36,7 +36,6 @@
 
 import com.google.common.io.ByteSource;
 
-import java.io.IOException;
 import java.net.URI;
 import java.util.List;
 
@@ -88,22 +87,8 @@
 {
 String storageKey = getRelativeStorageKey( fileResource );
 
-//String key = fileResourceContentStore.saveFileResourceContent(
-//storageKey, content, fileResource.getContentLength(), fileResource.getContentMd5() );
-
-//
-String key = null;
-
-try
-{
-key = fileResourceContentStore.saveFileResourceContent2(
-storageKey, content, fileResource.getContentLength(), fileResource.getContentMd5() );
-}
-catch ( IOException e )
-{
-e.printStackTrace();
-}
-//
+String key = fileResourceContentStore.saveFileResourceContent(
+storageKey, content, fileResource.getContentLength(), fileResource.getContentMd5() );
 
 if ( key == null )
 {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java	2015-10-07 13:43:35 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java	2015-10-07 13:46:41 +
@@ -29,17 +29,13 @@
  */
 
 import com.google.common.hash.HashCode;
-import com.google.common.io.ByteSink;
 import com.google.common.io.ByteSource;
-import com.google.common.io.FileWriteMode;
-import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.input.NullInputStream;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.external.location.LocationManager;
 import org.hisp.dhis.hibernate.HibernateConfigurationProvider;
-import org.hisp.dhis.system.scheduling.Scheduler;
 import org.jclouds.ContextBuilder;
 import org.jclouds.blobstore.BlobRequestSigner;
 import org.jclouds.blobstore.BlobStore;
@@ -52,22 +48,16 @@
 import org.jclouds.filesystem.reference.FilesystemConstants;
 import org.jclouds.http.HttpRequest;
 import org.joda.time.Minutes;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.concurrent.ListenableFuture;
-import org.springframework.util.concurrent.ListenableFutureCallback;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URI;
-import java.nio.file.Files;
-import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import 

[Dhis2-devs] Updating the password of one user using PATCH in the Web API (2.20)

2015-10-07 Thread Jose Garcia Muñoz
Hi Morten, all,

We need to update the passwords of several users using the Web API. We are
trying the following API call:

curl -X PATCH -d @file.json -u myuser:mypass
http://localhost:8080/dhis/api/users/yhQ0Ma7CLNw/userCredentials -H
"Content-Type: application/json"

Where the json file is:

{"username":"theuser", "name":"user name", "password":"thenewpassword",
"code":"theuser","created":"2015-03-16T14:00:24.057+"}

however I am getting the following message:

{"httpStatus":"OK","httpStatusCode":200,"status":"OK","message":"Import was
successful.","response":{"responseType":"ImportTy
peSummary","status":"SUCCESS","importCount":{"imported":0,"updated":0,"ignored":1,"deleted":0},"type":"User","importConflicts
":[{"object":"theuser","value":"User is missing userCredentials part."}]}}

Any ideas? Am I missing something?

I have also noted, that this call
http://localhost:8080/dhis/api/users/yhQ0Ma7CLNw/userCredentials.json is
not returning the username field, but instead seems to be returned in the
code??

userCredentials:
{

   - code: "theuser", //Shouldn't be username instead of code???
   - created: "2015-03-16T14:00:24.057+",
   - name: "Peter",
   - selfRegistered: false,
   - -..


Many thanks for your help

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


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20565: TEI query. Removing lazy=false for attributeValues in hibernate mapping. Using eager fetching wit...

2015-10-07 Thread noreply

revno: 20565
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2015-10-07 15:22:46 +0200
message:
  TEI query. Removing lazy=false for attributeValues in hibernate mapping. 
Using eager fetching with join in HQL query to avoid n queries per attribute 
per TEI.
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityInstance.hbm.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-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2015-09-24 08:32:10 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2015-10-07 13:22:46 +
@@ -121,7 +121,7 @@
 
 private String buildTrackedEntityInstanceHql( TrackedEntityInstanceQueryParams params )
 {
-String hql = "from TrackedEntityInstance tei";
+String hql = "from TrackedEntityInstance tei inner join fetch tei.attributeValues";
 SqlHelper hlp = new SqlHelper( true );
 
 if ( params.hasTrackedEntity() )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityInstance.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityInstance.hbm.xml	2015-08-25 21:48:10 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityInstance.hbm.xml	2015-10-07 13:22:46 +
@@ -14,7 +14,7 @@
 
 	
 	
-
+
   
   
 

___
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 20567: Minor: simplify expressions

2015-10-07 Thread noreply

revno: 20567
committer: Halvdan Hoem Grelland 
branch nick: dhis2
timestamp: Wed 2015-10-07 15:43:35 +0200
message:
  Minor: simplify expressions
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileResourceController.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/fileresource/FileResourceContentStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java	2015-10-06 22:00:49 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java	2015-10-07 13:43:35 +
@@ -30,6 +30,7 @@
 
 import com.google.common.io.ByteSource;
 
+import java.io.IOException;
 import java.net.URI;
 
 /**
@@ -54,6 +55,8 @@
  */
 String saveFileResourceContent( String key, ByteSource content, long size, String contentMd5 );
 
+String saveFileResourceContent2( String key, ByteSource content, long size, String contentMd5 ) throws IOException;
+
 /**
  * Delete the content bytes of a file resource.
  * @param key the key.

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java	2015-10-06 22:00:49 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java	2015-10-07 13:43:35 +
@@ -36,6 +36,7 @@
 
 import com.google.common.io.ByteSource;
 
+import java.io.IOException;
 import java.net.URI;
 import java.util.List;
 
@@ -87,8 +88,22 @@
 {
 String storageKey = getRelativeStorageKey( fileResource );
 
-String key = fileResourceContentStore.saveFileResourceContent(
-storageKey, content, fileResource.getContentLength(), fileResource.getContentMd5() );
+//String key = fileResourceContentStore.saveFileResourceContent(
+//storageKey, content, fileResource.getContentLength(), fileResource.getContentMd5() );
+
+//
+String key = null;
+
+try
+{
+key = fileResourceContentStore.saveFileResourceContent2(
+storageKey, content, fileResource.getContentLength(), fileResource.getContentMd5() );
+}
+catch ( IOException e )
+{
+e.printStackTrace();
+}
+//
 
 if ( key == null )
 {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java	2015-10-06 22:00:49 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java	2015-10-07 13:43:35 +
@@ -29,13 +29,17 @@
  */
 
 import com.google.common.hash.HashCode;
+import com.google.common.io.ByteSink;
 import com.google.common.io.ByteSource;
+import com.google.common.io.FileWriteMode;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.input.NullInputStream;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.external.location.LocationManager;
 import org.hisp.dhis.hibernate.HibernateConfigurationProvider;
+import org.hisp.dhis.system.scheduling.Scheduler;
 import org.jclouds.ContextBuilder;
 import org.jclouds.blobstore.BlobRequestSigner;
 import org.jclouds.blobstore.BlobStore;
@@ -48,16 +52,22 @@
 import org.jclouds.filesystem.reference.FilesystemConstants;
 import org.jclouds.http.HttpRequest;
 import org.joda.time.Minutes;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.concurrent.ListenableFuture;
+import org.springframework.util.concurrent.ListenableFutureCallback;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URI;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20569: event-capture: replaced detection of input field interaction with native angualr function

2015-10-07 Thread noreply

revno: 20569
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Wed 2015-10-07 15:47:02 +0200
message:
  event-capture: replaced detection of input field interaction with native 
angualr function
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/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/eventList.html
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/angular-forms/error-messages.html
  
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/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-10-07 08:51:26 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-10-07 13:47:02 +
@@ -966,14 +966,6 @@
 }
 });
 
-$scope.interacted = function(field) {
-var status = false;
-if(field){
-status = $scope.outerForm.submitted || field.$dirty;
-}
-return status;
-};
-
 //listen for rule effect changes
 $scope.$on('ruleeffectsupdated', function(event, args) {
 $scope.warningMessages = [];

=== modified file '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/defaultForm.html	2015-09-25 13:33:59 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html	2015-10-07 13:47:02 +
@@ -34,7 +34,7 @@
name="eventDate" 
input-field-id='eventDate' 
class="form-control">
- 
+ 
 
 
 
@@ -49,7 +49,7 @@
d2-coordinate-validator
ng-required="false"
class="form-control"/>
-
+
 
 
 
@@ -64,7 +64,7 @@
d2-coordinate-validator
ng-required="false"
class="form-control"/>
-
+
 
 
 
@@ -239,7 +239,7 @@
 class="form-control"> 
 
 
- 
+ 
 
 
 
@@ -274,7 +274,7 @@
name="eventDate" 
input-field-id='eventDate' 
class="form-control">
- 
+ 
 
 
 
@@ -289,7 +289,7 @@
d2-coordinate-validator
ng-required="false"
class="form-control"/>
-
+
 
 
 
@@ -304,7 +304,7 @@
d2-coordinate-validator
ng-required="false"
class="form-control"/>
-
+
 
 
 
@@ -504,7 +504,7 @@
 class="form-control"/> 
 
 
- 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20571: event-capture: put back own function instead of native angular for detecting input field interaction

2015-10-07 Thread noreply

revno: 20571
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Wed 2015-10-07 16:23:42 +0200
message:
  event-capture: put back own function instead of native angular for detecting 
input field interaction
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/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/eventList.html
  
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/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-10-07 13:47:02 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-10-07 14:23:42 +
@@ -966,6 +966,14 @@
 }
 });
 
+$scope.interacted = function(field) {
+var status = false;
+if(field){
+status = $scope.outerForm.submitted || field.$dirty;
+}
+return status;
+};
+
 //listen for rule effect changes
 $scope.$on('ruleeffectsupdated', function(event, args) {
 $scope.warningMessages = [];

=== modified file '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/defaultForm.html	2015-10-07 13:47:02 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html	2015-10-07 14:23:42 +
@@ -34,7 +34,7 @@
name="eventDate" 
input-field-id='eventDate' 
class="form-control">
- 
+ 
 
 
 
@@ -49,7 +49,7 @@
d2-coordinate-validator
ng-required="false"
class="form-control"/>
-
+
 
 
 
@@ -64,7 +64,7 @@
d2-coordinate-validator
ng-required="false"
class="form-control"/>
-
+
 
 
 
@@ -239,7 +239,7 @@
 class="form-control"> 
 
 
- 
+ 
 
 
 
@@ -274,7 +274,7 @@
name="eventDate" 
input-field-id='eventDate' 
class="form-control">
- 
+ 
 
 
 
@@ -289,7 +289,7 @@
d2-coordinate-validator
ng-required="false"
class="form-control"/>
-
+
 
 
 
@@ -304,7 +304,7 @@
d2-coordinate-validator
ng-required="false"
class="form-control"/>
-
+
 
 
 
@@ -504,7 +504,7 @@
 class="form-control"/> 
 
 
- 
+ 
  

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20572: event-capture: missing translation

2015-10-07 Thread noreply

revno: 20572
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Wed 2015-10-07 16:25:46 +0200
message:
  event-capture: missing translation
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.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-10-07 14:23:42 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-10-07 14:25:46 +
@@ -174,7 +174,7 @@
 $scope.eventGridColumns.push({name: 'form_id', id: 'uid', valueType: 'TEXT', compulsory: false, filterWithRange: false, showFilter: false, show: false});
 $scope.filterTypes['uid'] = 'TEXT';
 
-$scope.eventGridColumns.push({name: $scope.selectedProgramStage.reportDateDescription ? $scope.selectedProgramStage.reportDateDescription : 'incident_date', id: 'eventDate', valueType: 'DATE', filterWithRange: true, compulsory: false, showFilter: false, show: true});
+$scope.eventGridColumns.push({name: $scope.selectedProgramStage.reportDateDescription ? $scope.selectedProgramStage.reportDateDescription : $translate.instant('incident_date'), id: 'eventDate', valueType: 'DATE', filterWithRange: true, compulsory: false, showFilter: false, show: true});
 $scope.filterTypes['eventDate'] = 'DATE';
 $scope.filterText['eventDate']= {};
 

___
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 20573: SMS services, code style

2015-10-07 Thread noreply

revno: 20573
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Wed 2015-10-07 16:40:33 +0200
message:
  SMS services, code style
removed:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/package-info.java
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/SmsTransportProviderNotFoundException.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/BulkSmsGatewayConfig.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/ClickatellGatewayConfig.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/GenericHttpGatewayConfig.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/SMPPGatewayConfig.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/SmsConfigurable.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/SmsConfiguration.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/SmsConfigurationManager.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/incoming/IncomingSms.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/incoming/IncomingSmsListener.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/incoming/IncomingSmsService.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/incoming/SmsMessageEncoding.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/outbound/OutboundSms.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/DatabaseSupportedInternalMemoryMessageQueue.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/DefaultSmsSender.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/SmsPublisher.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/command/SMSSpecialCharacter.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/AdvanceHttpPostGateWay.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/DefaultSmsConfigurationManager.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/GateWayFactory.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/SimplisticHttpGetGateWay.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/hibernate/HibernateIncomingSmsStore.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/DHISMessageAlertListener.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/DataValueSMSListener.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/J2MEDataValueSMSListener.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/TrackedEntityRegistrationSMSListener.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/UnregisteredSMSListener.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/outbound/DefaultOutboundSmsService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/outbound/DefaultOutboundSmsTransportService.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/sms/SmsTransportProviderNotFoundException.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/SmsTransportProviderNotFoundException.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/SmsTransportProviderNotFoundException.java	2015-10-07 14:40:33 +
@@ -29,7 +29,7 @@
  */
 
 /**
- * SmsServiceException signalling no transport provider available to sms service
+ * SmsServiceException signaling no transport provider available to SMS service
  */
 public class SmsTransportProviderNotFoundException
 extends SmsServiceException

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/BulkSmsGatewayConfig.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/BulkSmsGatewayConfig.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/BulkSmsGatewayConfig.java	2015-10-07 14:40:33 +
@@ -80,5 +80,4 @@
 {
 return true;
 }
-
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/ClickatellGatewayConfig.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/ClickatellGatewayConfig.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/ClickatellGatewayConfig.java	2015-10-07 14:40:33 +
@@ -80,5 +80,4 @@
 {
 return true;
 }
-
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/config/GenericHttpGatewayConfig.java'
--- 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 20574: tracker-capture: moved code form controllers to service

2015-10-07 Thread noreply

revno: 20574
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Wed 2015-10-07 17:13:26 +0200
message:
  tracker-capture: moved code form controllers to service
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/teiadd/tei-add-controller.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.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/views/advanced-search.html


--
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/default-registration-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html	2015-10-07 09:14:45 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html	2015-10-07 15:13:26 +
@@ -7,7 +7,7 @@
 
 
 
-
@@ -39,6 +42,9 @@
name="foo" 
class="form-control" 
ng-model="selectedTei[attribute.id]" 
+   ng-model-options="{ updateOn: 'blur' }"
+   d2-attribute-validator 
+   attribute-data="attribute" 
ng-disabled="editingDisabled" 
ng-change="teiValueUpdated(selectedTei, attribute.id)"
ng-required="attribute.mandatory || attribute.unique"/>
@@ -46,6 +52,9 @@
 
 
@@ -69,6 +83,9 @@
name="foo" 
class="form-control" 
ng-model="selectedTei[attribute.id]" 
+   ng-model-options="{ updateOn: 'blur' }" 
+   d2-attribute-validator 
+   attribute-data="attribute" 
ng-disabled="editingDisabled" 
ng-blur="teiValueUpdated(selectedTei, attribute.id)"
ng-required="attribute.mandatory || attribute.unique"/>
@@ -78,6 +95,9 @@
name="foo" 
class="form-control" 
ng-model="selectedTei[attribute.id]" 
+   ng-model-options="{ updateOn: 'blur' }" 
+   d2-attribute-validator 
+   attribute-data="attribute" 
ng-disabled="editingDisabled" 
ng-blur="teiValueUpdated(selectedTei, attribute.id)"
ng-required="attribute.mandatory || attribute.unique">   
@@ -88,6 +108,10 @@
name="foo" 
class="form-control-trimmed" 
ng-model="selectedTei[attribute.id]" 
+   ng-model-options="{ updateOn: 'blur' }" 
+   d2-attribute-validator 
+   attribute-data="attribute" 
+   ng-model-options="{ updateOn: 'blur' }"
ng-disabled="true" 
ng-blur="teiValueUpdated(selectedTei, attribute.id)"
style="width:75%;"
@@ -104,6 +128,9 @@
name="foo" 
class="form-control" 
ng-model="selectedTei[attribute.id]" 
+   ng-model-options="{ updateOn: 'blur' }" 
+   d2-attribute-validator 
+   attribute-data="attribute" 
ng-disabled="editingDisabled" 
ng-blur="teiValueUpdated(selectedTei, attribute.id)"
ng-required="attribute.mandatory || attribute.unique"/>

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/teiadd/tei-add-controller.js'
--- 

Re: [Dhis2-devs] [Dhis2-users] SMS on GIS

2015-10-07 Thread Bridget Magoba
I haven’t yet implemented it but I was inquiring if the sms sent can be 
configured to populate the map in GIS to show concentration in a particular org 
unit?



The way GIS works, data entered in populated on the map, can sms do the same?



Thanks



From: riddy ndoma [mailto:riddynd...@gmail.com]
Sent: Wednesday, October 7, 2015 9:28 AM
To: Bridget Magoba
Cc: DHIS 2 developers; dhis1-users
Subject: RE: [Dhis2-users] SMS on GIS



The SMS is a way of put data  in System like the Data entry form. It's possible.
Where's your problem?
Cheers,

On Oct 7, 2015 7:05 AM, "Bridget Magoba"  > wrote:

Dear Riddy,

That is exactly what I want.



thanks



From: riddy ndoma [mailto:riddynd...@gmail.com  ]
Sent: Wednesday, October 7, 2015 9:00 AM
To: Bridget Magoba
Cc: DHIS 2 developers; dhis1-users
Subject: Re: [Dhis2-users] SMS on GIS



Hi Bridget, what do you want exactly? Send data by SMS and see it on SIG?
Cheers,

On Oct 6, 2015 11:03 AM, "Bridget Magoba"  > wrote:

Dear all,



Am planning to implement SMS in my DHIS2 instance, Can the SMSs sent be 
populated on the map using GIS in DHIS2?



Thanks



Magoba Bridget

Database Manager

MIFUMI

Mobile: +256 774659892 

Tel: +256 414666946  /392174242

P.O Box 274, Tororo

Plot 13, Martyrs’ Drive, Ntinda

Kampala

www.mifumi.org 





  _


 

This email has been checked for viruses by Avast antivirus software.
www.avast.com 




___
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



  _


 

This email has been checked for viruses by Avast antivirus software.
www.avast.com 





---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
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