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

Events with RRULE BYDAY set to day are repeated on day of DTSTART #89

Open
6 tasks done
HappyLer opened this issue Jan 22, 2024 · 2 comments
Open
6 tasks done

Events with RRULE BYDAY set to day are repeated on day of DTSTART #89

HappyLer opened this issue Jan 22, 2024 · 2 comments
Labels
bug Something is not working

Comments

@HappyLer
Copy link

HappyLer commented Jan 22, 2024

Checklist

  • I can reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Describe the bug
When importing an ICS event, which has DTSTART on a thursday for example and RRULE BYDAY is set to wednesday, the event will repeat on thursdays.

To Reproduce
Steps to reproduce the behavior:
Such ICS entries can be created using Thunderbird for example and a few calendar apps and programs I tested by hand did not show this behavior. The following event can be used to replicate the issue:

CREATED:20231005T154908Z
LAST-MODIFIED:20231005T155000Z
DTSTAMP:20231005T155000Z
UID:e9185ea1-94b7-45d3-94d5-6fc9b571d734
SUMMARY:StartTHrepWE
RRULE:FREQ=MONTHLY;BYDAY=1WE
DTSTART;TZID=Europe/Berlin:20231005T180000
DTEND;TZID=Europe/Berlin:20231005T190000
TRANSP:OPAQUE
END:VEVENT

Expected behavior
The repeated events should be placed where RRULE points to and not to the first day it happened.

Device info (please complete the following information):

  • Model: Samsung Galaxy S10e
  • OS: Android 13 (Lineage with MicroG)
  • App version 1.0.2

Additional context
I think the issue lies in Parser.kt in line 178, where day is set to the day of the event start timestamp instead of the day from the RRULE. https://github.com/FossifyOrg/Calendar/blob/4363adce4b0d36d44b8fc4de2f87fcb5ba074ef2/app/src/main/kotlin/org/fossify/calendar/helpers/Parser.kt#L180C1-L180C57

@HappyLer HappyLer added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Jan 22, 2024
@HappyLer HappyLer changed the title Events with RRULE BYDAY set to day are repeated on day of DTSTART #2225 Events with RRULE BYDAY set to day are repeated on day of DTSTART Jan 22, 2024
@Aga-C Aga-C removed the needs triage Issue is not yet ready for PR authors to take up label Jan 22, 2024
@Aga-C
Copy link
Member

Aga-C commented Jan 22, 2024

Can you fix formatting of code snippet? You added ``` without the line break before :)

Also, this issue is valid, however I don't know if it will be done before adding the support for such case while creating events. Now, while creating recurring events, there is no way to set a different day for monthly occurrences.

@HappyLer
Copy link
Author

I edited the linebreaks, thanks for the hint.

In my case, the events get synced from an ics calendar.

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

No branches or pull requests

2 participants