-
Notifications
You must be signed in to change notification settings - Fork 35
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
Correctly represent the last week in rrules Part 2 #3026
base: develop
Are you sure you want to change the base?
Conversation
…f the month using negative numbers
Code Climate has analyzed commit c8caf43 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 75.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 83.4% (0.2% change). View more on Code Climate. |
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.
I think this will not fix our issue, because I think the actual bug is on the frontend, as I commented here: #3022 (comment)
@PeterNerlich Could you please try to verify this?
Still, this pr fixes another bug, so it would still be worth merging, just with a lower prio
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.
Assuming that this is not a critical fix anymore, our manual iter_after
implementation seems error-prone and hard to maintain to me. Also it appears that dateutil library that we are already using has support for exactly the same functionality. So it seems like we could just replace this whole code with a simple self.to_ical_rrule().xafter()
oneliner: https://dateutil.readthedocs.io/en/stable/rrule.html#dateutil.rrule.rrule.xafter
Could you try if that could work for our usecase?
I think this would also close #2094 |
Short description
#2992 Found and fixed a bug in rendering out recurring events to iCal format. However, our function to internally generate the next event instances using the recurrence rule was still broken.
This PR attempts to fix the implementation of that function and add tests to it which seemed to be entirely missing until now.
Proposed changes
5
to select the number of occurrence of the weekday in the month is still valid, but will now really only mean months with enough days to have a fifth e.g. Friday. Months too short will be skipped and not produce these events. This is however not selectable through the UI but something the system in theory supports but which we won't expose to users at this moment in time.5
to a value of-1
-2
under the option of Second last week.iter_after()
function. It seems like onlyto_ical_rrule()
was being tested until now.Side effects
Resolved issues
Fixes: #3022, #2989
Pull Request Review Guidelines