Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recurring rule: COUNT=0 added to endless custom rules #2158

Closed
grisumedia opened this issue Mar 1, 2023 · 5 comments
Closed

Recurring rule: COUNT=0 added to endless custom rules #2158

grisumedia opened this issue Mar 1, 2023 · 5 comments

Comments

@grisumedia
Copy link

If you define a custom recurrence rule like "every week on Wednesday, forever", the recurrence rule created by tasks will contain COUNT=0, which creates problems with other consumers like the ICAL.NET library that check for COUNT>=1.

BEGIN:VTODO
DTSTAMP:20230301T105803Z
UID:922187406211724545
CREATED:20230301T105234Z
LAST-MODIFIED:20230301T105759Z
SUMMARY:Weekly on Wed
PRIORITY:5
RRULE:FREQ=WEEKLY;COUNT=0;INTERVAL=1;BYDAY=WE
X-APPLE-SORT-ORDER:625234142
DUE;VALUE=DATE:20230301
DTSTART;VALUE=DATE:20230301
BEGIN:VALARM
TRIGGER;RELATED=END:PT0S
ACTION:DISPLAY
DESCRIPTION:Default Tasks.org description
END:VALARM
END:VTODO

The problem is quite easy to solve by leaving COUNT=0 out.
I'm not absolutely sure if COUNT=0 is really forbidden, as RFC 5545 says

       recur-rule-part = ( "FREQ" "=" freq )
                       / ( "UNTIL" "=" enddate )
                       / ( "COUNT" "=" 1*DIGIT )

Checked with Tasks 13.1.1

@grisumedia
Copy link
Author

By the way, Thunderbird with Lightning seems to entirely remove the faulty recurrence rule:

RRULE:FREQ=WEEKLY;COUNT=0;INTERVAL=1;BYDAY=FR
X-LIC-ERROR;X-LIC-ERRORTYPE=VALUE-PARSE-ERROR:Can't parse as RECUR value in
  RRULE property. Removing entire property: FREQ=WEEKLY\;COUNT=0\;INTERVAL=
 1\;BYDAY=SA

Which leads to recurring events not being recurrent any more and so they are gone once they are done.

@abaker
Copy link
Member

abaker commented Mar 15, 2023

Thanks for bringing this to my attention. Tasks previously used google's rfc-2445 library for processing recurrence rules, and I think COUNT=0 was a hack to get it to play nice with iCal4j recurrence. I removed the rfc-2445 library long ago, but didn't remove this hack

32eed65

@abaker abaker closed this as completed Mar 15, 2023
@andrewrothman
Copy link

I am seeing similar today, synced via DAVx5.

I am able to reliably reproduce the issue by deleting the task and creating another.

Let me know if there is any other information or assistance I can provide. Thanks!

Tasks v13.1.2 on a Samsung Galaxy s10e, Android 12, One UI 4.1

HTTP REQUEST
Request{method=PUT, url=REDACTED, headers=[If-None-Match:*, User-Agent:DAVx5/4.3.5.2-gplay (2023/08/07; dav4jvm; okhttp/4.11.0) Android/12, Accept-Language:en-US, en;q=0.7, *;q=0.5]}
BEGIN:VCALENDAR
VERSION:2.0
PRODID:DAVx5/4.3.5.2-gplay ical4j/3.2.11 (org.tasks)
BEGIN:VTODO
DTSTAMP:20230825T195744Z
UID:315556882140164719
CREATED:20230825T195729Z
LAST-MODIFIED:20230825T195729Z
SUMMARY:Example recurring task
STATUS:NEEDS-ACTION
RRULE:FREQ=WEEKLY;COUNT=0;INTERVAL=1;BYDAY=FR
X-APPLE-SORT-ORDER:709724834
END:VTODO
END:VCALENDAR


HTTP RESPONSE
Response{protocol=http/1.1, code=403, message=Forbidden, url=REDACTED
<?xml version="1.0" encoding="utf-8"?>
<D:error xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <C:valid-calendar-data/>
  <D:responsedescription>Can't parse as RECUR value in RRULE property. Removing entire property: FREQ=WEEKLY;COUNT=0;INTERVAL=1;BYDAY=FR</D:responsedescription>
</D:error>

Screenshot_20230825-131146_Tasks

@abaker
Copy link
Member

abaker commented Aug 25, 2023

Can you update your app? This fix went into v13.2, and the latest version is v13.5.1

@andrewrothman
Copy link

Nevermind. I checked and realized that F-Droid wasn't updating Tasks.org. I am no longer seeing the above issue on v13.5.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants