-
Notifications
You must be signed in to change notification settings - Fork 16
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
2901: Fix recurring dates yet again #2902
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works like a charm, thanks for fixing all this stuff! 💚
Code Climate has analyzed commit b2b7a35 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 74.0%. View more on Code Climate. |
Short description
When rewriting the recurrent dates a few weeks ago, I missed a test case: repeating an event every nth week of the month.
In that case, the recurrence rule gets the parameter
BYDAY=+3TH
. When parsing that, our packagerrule
turns that not into the parameterbyweekday
but into the parameterbynweekday
(the n stands for nth weekday). When turning the parameterbynweekday
back into a string, we get the parameterBYNWEEKDAY=3,+3
, which doesn't seem to be a valid parameter.So I decided to stick to the string of the recurrence rule as the source of truth and not the recurrence rule object from our
rrule
package.You can also see some fun workarounds in this issue: jkbrzt/rrule#326
Proposed changes
Side effects
Testing
Run the tests in your environment
Check particularly that events repeating every nth day (e.g. every 4th Friday) are showing correctly http://localhost:9000/testumgebung/de/events/test-monthly
Any other repeating event combinations that you can think of
Resolved issues
Fixes: #2901