Pushing events through the API without the eventdate

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

Regards

Jose

Hi Jose

Yes, I see that we actually allow null for eventDates (and we don’t default to anything).

Maybe it would make sense to default to current date? we do that for dueDate, Abyot you agree?

···

On Tue, May 10, 2016 at 10:46 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

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

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

Hi Morten,

many thanks for your quick answer. I think it is ok to default to current date. (or at least I can not think in why not?)

Would it be possible to have it backported to 2.22 as well? It is a bit urgent and important for us :slight_smile: (otherwise we may have some issues with our android apps)

Thanks guys

Jose

···

On Tue, May 10, 2016 at 6:09 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Yes, I see that we actually allow null for eventDates (and we don’t default to anything).

Maybe it would make sense to default to current date? we do that for dueDate, Abyot you agree?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, May 10, 2016 at 10:46 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

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

Hi,

I haven’t done this fix yet, but I think until we have a better solution I will set it to current date, saving it as null in the database is not a good option.

···

On Wed, May 11, 2016 at 10:37 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

many thanks for your quick answer. I think it is ok to default to current date. (or at least I can not think in why not?)

Would it be possible to have it backported to 2.22 as well? It is a bit urgent and important for us :slight_smile: (otherwise we may have some issues with our android apps)

Thanks guys

Jose

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, May 10, 2016 at 6:09 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Yes, I see that we actually allow null for eventDates (and we don’t default to anything).

Maybe it would make sense to default to current date? we do that for dueDate, Abyot you agree?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, May 10, 2016 at 10:46 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

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

This is now fixed and backported down to 2.21, please give our servers some time to build new WAR files.

···

On Wed, May 11, 2016 at 10:39 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi,

I haven’t done this fix yet, but I think until we have a better solution I will set it to current date, saving it as null in the database is not a good option.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:37 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

many thanks for your quick answer. I think it is ok to default to current date. (or at least I can not think in why not?)

Would it be possible to have it backported to 2.22 as well? It is a bit urgent and important for us :slight_smile: (otherwise we may have some issues with our android apps)

Thanks guys

Jose

On Tue, May 10, 2016 at 6:09 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Yes, I see that we actually allow null for eventDates (and we don’t default to anything).

Maybe it would make sense to default to current date? we do that for dueDate, Abyot you agree?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, May 10, 2016 at 10:46 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

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

Great! Thanks Morten

···

On Wed, May 11, 2016 at 5:48 AM, Morten Olav Hansen morten@dhis2.org wrote:

This is now fixed and backported down to 2.21, please give our servers some time to build new WAR files.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:39 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi,

I haven’t done this fix yet, but I think until we have a better solution I will set it to current date, saving it as null in the database is not a good option.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:37 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

many thanks for your quick answer. I think it is ok to default to current date. (or at least I can not think in why not?)

Would it be possible to have it backported to 2.22 as well? It is a bit urgent and important for us :slight_smile: (otherwise we may have some issues with our android apps)

Thanks guys

Jose

On Tue, May 10, 2016 at 6:09 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Yes, I see that we actually allow null for eventDates (and we don’t default to anything).

Maybe it would make sense to default to current date? we do that for dueDate, Abyot you agree?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, May 10, 2016 at 10:46 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

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

Hi Jose

Sorry, had to revert this for now, according to Markus we have some hardcoded logic around this in our TC/EC clients, which might cause issues. Markus will fix it, and the re-apply the patch when he can.

···

On Wed, May 11, 2016 at 10:51 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Great! Thanks Morten

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 5:48 AM, Morten Olav Hansen morten@dhis2.org wrote:

This is now fixed and backported down to 2.21, please give our servers some time to build new WAR files.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:39 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi,

I haven’t done this fix yet, but I think until we have a better solution I will set it to current date, saving it as null in the database is not a good option.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:37 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

many thanks for your quick answer. I think it is ok to default to current date. (or at least I can not think in why not?)

Would it be possible to have it backported to 2.22 as well? It is a bit urgent and important for us :slight_smile: (otherwise we may have some issues with our android apps)

Thanks guys

Jose

On Tue, May 10, 2016 at 6:09 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Yes, I see that we actually allow null for eventDates (and we don’t default to anything).

Maybe it would make sense to default to current date? we do that for dueDate, Abyot you agree?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, May 10, 2016 at 10:46 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

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

Ok, thanks Morten,

Looking forward for that patch (it is a bit urgent for us :slight_smile: ).

Thanks guys!

···

On Wed, May 11, 2016 at 8:27 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Sorry, had to revert this for now, according to Markus we have some hardcoded logic around this in our TC/EC clients, which might cause issues. Markus will fix it, and the re-apply the patch when he can.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:51 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Great! Thanks Morten

On Wed, May 11, 2016 at 5:48 AM, Morten Olav Hansen morten@dhis2.org wrote:

This is now fixed and backported down to 2.21, please give our servers some time to build new WAR files.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:39 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi,

I haven’t done this fix yet, but I think until we have a better solution I will set it to current date, saving it as null in the database is not a good option.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:37 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

many thanks for your quick answer. I think it is ok to default to current date. (or at least I can not think in why not?)

Would it be possible to have it backported to 2.22 as well? It is a bit urgent and important for us :slight_smile: (otherwise we may have some issues with our android apps)

Thanks guys

Jose

On Tue, May 10, 2016 at 6:09 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Yes, I see that we actually allow null for eventDates (and we don’t default to anything).

Maybe it would make sense to default to current date? we do that for dueDate, Abyot you agree?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, May 10, 2016 at 10:46 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

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

Hi Jose

Could you pinpoint where in the TC app this is required? according to Markus, it shouldn’t be…

···

On Thu, May 12, 2016 at 4:59 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Ok, thanks Morten,

Looking forward for that patch (it is a bit urgent for us :slight_smile: ).

Thanks guys!

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 8:27 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Sorry, had to revert this for now, according to Markus we have some hardcoded logic around this in our TC/EC clients, which might cause issues. Markus will fix it, and the re-apply the patch when he can.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:51 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Great! Thanks Morten

On Wed, May 11, 2016 at 5:48 AM, Morten Olav Hansen morten@dhis2.org wrote:

This is now fixed and backported down to 2.21, please give our servers some time to build new WAR files.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:39 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi,

I haven’t done this fix yet, but I think until we have a better solution I will set it to current date, saving it as null in the database is not a good option.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:37 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

many thanks for your quick answer. I think it is ok to default to current date. (or at least I can not think in why not?)

Would it be possible to have it backported to 2.22 as well? It is a bit urgent and important for us :slight_smile: (otherwise we may have some issues with our android apps)

Thanks guys

Jose

On Tue, May 10, 2016 at 6:09 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Yes, I see that we actually allow null for eventDates (and we don’t default to anything).

Maybe it would make sense to default to current date? we do that for dueDate, Abyot you agree?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, May 10, 2016 at 10:46 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

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

Hi Morten,

the problem is not related to the TC, but with a custom android app that we are implementing (using the DHIS2-SDK).

···

On Thu, May 12, 2016 at 12:13 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Could you pinpoint where in the TC app this is required? according to Markus, it shouldn’t be…

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Thu, May 12, 2016 at 4:59 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Ok, thanks Morten,

Looking forward for that patch (it is a bit urgent for us :slight_smile: ).

Thanks guys!

On Wed, May 11, 2016 at 8:27 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Sorry, had to revert this for now, according to Markus we have some hardcoded logic around this in our TC/EC clients, which might cause issues. Markus will fix it, and the re-apply the patch when he can.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:51 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Great! Thanks Morten

On Wed, May 11, 2016 at 5:48 AM, Morten Olav Hansen morten@dhis2.org wrote:

This is now fixed and backported down to 2.21, please give our servers some time to build new WAR files.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:39 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi,

I haven’t done this fix yet, but I think until we have a better solution I will set it to current date, saving it as null in the database is not a good option.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:37 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

many thanks for your quick answer. I think it is ok to default to current date. (or at least I can not think in why not?)

Would it be possible to have it backported to 2.22 as well? It is a bit urgent and important for us :slight_smile: (otherwise we may have some issues with our android apps)

Thanks guys

Jose

On Tue, May 10, 2016 at 6:09 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Yes, I see that we actually allow null for eventDates (and we don’t default to anything).

Maybe it would make sense to default to current date? we do that for dueDate, Abyot you agree?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, May 10, 2016 at 10:46 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

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

Oh ok, because nulls should be allowed from what I heard, but I will allow Markus to fill in the blanks. :slight_smile:

···

On Thu, May 12, 2016 at 5:17 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

the problem is not related to the TC, but with a custom android app that we are implementing (using the DHIS2-SDK).

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Thu, May 12, 2016 at 12:13 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Could you pinpoint where in the TC app this is required? according to Markus, it shouldn’t be…

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Thu, May 12, 2016 at 4:59 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Ok, thanks Morten,

Looking forward for that patch (it is a bit urgent for us :slight_smile: ).

Thanks guys!

On Wed, May 11, 2016 at 8:27 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Sorry, had to revert this for now, according to Markus we have some hardcoded logic around this in our TC/EC clients, which might cause issues. Markus will fix it, and the re-apply the patch when he can.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:51 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Great! Thanks Morten

On Wed, May 11, 2016 at 5:48 AM, Morten Olav Hansen morten@dhis2.org wrote:

This is now fixed and backported down to 2.21, please give our servers some time to build new WAR files.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:39 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi,

I haven’t done this fix yet, but I think until we have a better solution I will set it to current date, saving it as null in the database is not a good option.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, May 11, 2016 at 10:37 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

many thanks for your quick answer. I think it is ok to default to current date. (or at least I can not think in why not?)

Would it be possible to have it backported to 2.22 as well? It is a bit urgent and important for us :slight_smile: (otherwise we may have some issues with our android apps)

Thanks guys

Jose

On Tue, May 10, 2016 at 6:09 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jose

Yes, I see that we actually allow null for eventDates (and we don’t default to anything).

Maybe it would make sense to default to current date? we do that for dueDate, Abyot you agree?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, May 10, 2016 at 10:46 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi devs,

At least in the 2.22 it is possible to send events to DHIS2 without the eventDate in the payload. As this is not allowed using the web interface, would it be possible to avoid this bahaviour as well when we use the API? (so no events can be sents without date)

Thanks!

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