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

Don't Reset next_occurrence For Cloned Objects #108

Merged

Conversation

tylerneu
Copy link
Contributor

@tylerneu tylerneu commented Jan 30, 2024

Clones via clone_with_day_offset have a next_occurrence of the source object's first date +/- the offset. This requires these clones to be immediately handled and ignored until next_occurrence is greater than now.

These changes amend the logic determining if object is new by considering last_occurrence so that these cloned objects will not be treated as new and have their next_occurrence reset to the first date in the series. clone_with_day_offset has been expanded to copy of the source object's next_occurrence, with offset, so that cloned object will not have to processed stale next_occurrence dates to 'catch up'. Added test to flex.

…nce so that cloned objects will not be treated as new and have their next_occurrence reset to the first date in the series. Expanded clone_with_day_offset to copy of the source object's next_occurrence, with offset, so that cloned object will not have to processed stale next_occurrence dates to 'catch up'. Added test to flex.
Copy link

@monroeclinton monroeclinton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be okay for coaching and goals, but I wonder about A-Team @somewes.

@somewes
Copy link
Collaborator

somewes commented Feb 5, 2024

it is going to take me a minute to refresh myself on why some of this behaves the way it does and whether or not that will be a problem

@somewes
Copy link
Collaborator

somewes commented Feb 5, 2024

i can't think of anywhere we are duplicating an rrule, and i don't see any rrule duplicate code in our domain. if there is any logic specific to testing duplicated rrules, ideally we will have some tests to catch that in the actual app. you can always publish this (or a beta version) and run tests on the main project just to double check nothing fails.

@tylerneu tylerneu merged commit 936cc00 into ambitioninc:develop Feb 5, 2024
9 checks passed
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

Successfully merging this pull request may close these issues.

3 participants