[Still in Progress] Offer long-term event #3355
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description
This PR modifies our event feature so that users can create so-called long-term events in future.
Proposed changes
end
of modelEvent
toblank=True
, add new fieldonly_weekdays
is_long_term
to event form (see 3. Changes in validation)MAX_EVENT_DURATION
is_long_term = False
To Dos
Side effects
The largest change for technical aspect is that the input field for end date is not shown (and no value handed over) from the form if user is eiding on the tab "One-time and recurrent". This resulted in the following changes:
One-time: start date == end date, no recurrence rule
recurrent: start date == end date, with recurrence rule
long-term: start date == end date *
Migration
** We will have then events with length <=28 days as long-term. This is partially not matching with the original motivation for "long-term" event (events with Duration > 28 days). Should we take a risk of more complicated migration?
Changes in validation:
is_long_term
to record in which tab user was editing at the moment of "saving"(Default to
False
, initialized asTrue
if start date != end date when opening an existing event, toggled whenever users switche the tab)is_long_term = False
, set the end date equal to start date before savingResolved issues
Fixes: #3070
Pull Request Review Guidelines