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

[Still in Progress] Offer long-term event #3355

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

MizukiTemma
Copy link
Member

@MizukiTemma MizukiTemma commented Jan 21, 2025

Short description

This PR modifies our event feature so that users can create so-called long-term events in future.

Proposed changes

  • Introduce two tabs in the box "Date and Time" in the event form
  • Set end of model Event to blank=True, add new field only_weekdays
  • Migration (find detail at 2. Migration below)
  • Add is_long_term to event form (see 3. Changes in validation)
  • Remove the restriction of MAX_EVENT_DURATION
  • Set start date == end date, if is_long_term = False
  • New type "Long-term" in the column "Recurrence" in the event list (currently only "One time", "Weekly", "Monthly"...)

To Dos

  • Adjustment of appearance (alignment etc)
  • Modification of display of recurrence rule (from pull-down to check boxes, etc)
  • Check if validation is covering all possible cases
  • Adapt filter function to consider the change with end date
  • Check if the new implementation is compatible with import functionality (external calendar)
  • Show in the list end date of recurrence instead of end date of event as end date?

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:

  1. New Definition of Event types
    One-time: start date == end date, no recurrence rule
    recurrent: start date == end date, with recurrence rule
    long-term: start date == end date *
  • Potentially they can have a recurrence rule, for example if they were once a recurrent event and changed to long-term. We can remove the related recurrence rule in such case if we decide for that.
  1. Migration

    • start date == end date & no recurrence rule: No Change (valid as one-time event)
    • start date == end date & has recurrence rule: No Change (valid as recurrent event)
    • start date != end date & no recurrence rule: No Change (become long-term event)**
    • start date != end date & has recurrence rule: Set end of recurrence to end date, then end date equal to start date (become recurreing event)
      ** 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?
  2. Changes in validation:

    • Add to event form is_long_term to record in which tab user was editing at the moment of "saving"
      (Default to False, initialized as True if start date != end date when opening an existing event, toggled whenever users switche the tab)
    • If is_long_term = False, set the end date equal to start date before saving
    • Remove validation of event duration < MAX_EVENT_DURATION (=28)

Resolved issues

Fixes: #3070


Pull Request Review Guidelines

@MizukiTemma MizukiTemma marked this pull request as draft January 21, 2025 10:29
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.

Change event creation settings to offer single events and Dauerveranstaltungen
1 participant