More details on error "DUE must not be < DTSTART"

0

If there is a task with DUE < START, an Exception with message "DUE must not be < DTSTART" is thrown. It would be very helpful, if the message would include more information about the respective task (e.g. the title). This would ease fixing the invalid tasks, since finding affected tasks could be very difficult.

0

At the moment, the only way to find out the questionable task is to enable verbose logs and have a look at them.

This is not very comfortable, but DAVdroid is intended as sync adapter and not as a tool to fix corrupt iCalendars.

Temporal relations are not necessarily causal relations.

0

That's rather complicated and time-consuming, since this error message does not concerns debugging the app itself. Instead, it's an information for end-users in their everyday workflow (comparable to "wrong password"). Therefore, I would (at least) extend the message of the IllegalArgumentException with the specific title of the respective task.

Btw.: why do you enforce this constraint? Is there anything more than "RFC 5545 told it"?

0

@korelstar said in More details on error "DUE must not be < DTSTART":

That's rather complicated and time-consuming, since this error message does not concerns debugging the app itself. Instead, it's an information for end-users in their everyday workflow (comparable to "wrong password").

A wrong password doesn't violate a standard.

Therefore, I would (at least) extend the message of the IllegalArgumentException with the specific title of the respective task.

Thanks for the suggestion. I'll have a look at that. I guess we would need another try/catch block for IllegalArgumentException (which is not generated by DAVdroid/ical4android, see below) and wrap it into another exception. Wouldn't the UID be more useful? SUMMARY is optional.

Btw.: why do you enforce this constraint? Is there anything more than "RFC 5545 told it"?

  1. In my opinion, it would be enough reason that RFC 5545 tells it.
  2. DAVdroid/ical4android doesn't enforce this constraint. If you have a look on the stack trace, you can see that the exception comes from the content provider client, which receives it from the OpenTasks content provider. So, it would be better to ask the OpenTasks developer(s) about details.

Temporal relations are not necessarily causal relations.

0

Thanks for the suggestion. I'll have a look at that. I guess we would need another try/catch block for IllegalArgumentException (which is not generated by DAVdroid/ical4android, see below) and wrap it into another exception. Wouldn't the UID be more useful? SUMMARY is optional.

I think the typical user will be confused by the UID. The SUMMARY would be more helpful and, in practice, it is likely that the SUMMARY is set.

DAVdroid/ical4android doesn't enforce this constraint. If you have a look on the stack trace, you can see that the exception comes from the content provider client, which receives it from the OpenTasks content provider. So, it would be better to ask the OpenTasks developer(s) about details.

Thanks for the hint! You're right, this issue should be discussed there. I will do that!

0

@korelstar In case of a public discussion, please post a link here, so that we can follow it. However, I support enforcing this constraint, because other clients will expect it, too. In my opinion, the real problem are clients which create invalid tasks, and those should be fixed (thanks for reporting the bug).

Temporal relations are not necessarily causal relations.

0

In future DAVdroid versions, ical4android will ignore invalid DUE < DTSTART values.

Please keep in mind that this is a dirty workaround. If you want to put efforts in this problem, please fix the clients which create invalid tasks.

Temporal relations are not necessarily causal relations.

0

Has been implemented with DAVdroid 1.3.3, so I'm setting this to solved.

Temporal relations are not necessarily causal relations.

0

@rfc2822 said in More details on error "DUE must not be < DTSTART":

In future DAVdroid versions, ical4android will ignore invalid DUE < DTSTART values.

Nice! Thanks for your effort! However, I think it would be better, if dtstart is set to null in this case, and not due. Typically, the due is much more important than the start time. Important deadlines could be missed due to this automatic modification.

Please keep in mind that this is a dirty workaround. If you want to put efforts in this problem, please fix the clients which create invalid tasks.

Yes, I know. I've created that issue there, and I think I will have to fix this on my own in the owncloud/nextcloud task app. It's on my todo list. But there may be other applications, which could produce such erroneous data.

0

@korelstar Thanks, I have merged it (and rebased the two commits into one).

Temporal relations are not necessarily causal relations.

1

In the meanwhile, I've provided a patch for the Nextcloud Tasks app which ensures, that DUE<DTSTART: https://github.com/nextcloud/tasks/commit/24b381d46a8e7fb1cf993f5ea8be618760b0f402
It is part of the latest release v0.9.4 which is published in both app-stores from ownCloud and from Nextcloud.
🙂

Log in to reply

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.