Can add exclusions but not inclusions (RDATE)

Created on 27 February 2024, 9 months ago
Updated 29 February 2024, 9 months ago

Problem/Motivation

As an example, we have an event that should repeat every Monday through a certain end, except Memorial Day - that week, it should happen on Tuesday instead. The date_recur_interactive module apparently provided this, and it was possible in D7 as well, but not with date_recur_modular.

Steps to reproduce

Create an event, repeat to some date in the future on a weekly basis, and exclude a date. Try to set a replacement date for the day after the excluded date - no option exists.

Proposed resolution

Definitely a code issue; not sure where to start.

User interface changes

Additional fields for replacement dates (possibly an "add more" sort of thing?).

API changes

Unknown.

Data model changes

Unknown.

✨ Feature request
Status

Closed: works as designed

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States seanr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @seanr
  • πŸ‡ΊπŸ‡ΈUnited States seanr
  • πŸ‡ΊπŸ‡ΈUnited States seanr
  • Status changed to Closed: works as designed 9 months ago
  • πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

    This is simply not an explicit feature of this project.

    There are just too many options in the spec, to implement everything.

    Typically the way of achieving this is to make your DR field multicardinality. The combined values of the DR fields become your 'inclusions'.

  • πŸ‡ΊπŸ‡ΈUnited States seanr

    seanr β†’ changed the visibility of the branch 3424198-can-add-exclusions to hidden.

  • Merge request !9Add RDATE functionality to Sierra widget β†’ (Open) created by seanr
  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 8
    last update 9 months ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΈUnited States seanr

    @dpi, I respectfully ask you to reconsider. I've created a working MR. The multicardinality option is insufficient - already tried that, but it doesn't set the right values (it actually creates separate calendar items which is incompatible with situations where one or more dates in a sequence is different, i.e. to avoid a holiday). This actually came out of a client request as the functionality actually existed on their old D7 site. This patch/MR should follow the spec and accomplish the goals:

    https://git.drupalcode.org/project/date_recur_modular/-/merge_requests/9...

  • πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

    The project is intended to built upon with custom functionality, you may choose to copy code into your own public/private fork.

    The scope of the project will otherwise spiral out of control, just like it did with Date Recur Interactive. Nobody wants/wanted to touch that code after so many years of neglect.

    The multicardinality option is something I've personally used, particularly for https://www.drupal.org/project/oh β†’ , it works as expected.

    If your calendar or event system doesnt work with this, then I'd suggest tweaking the model.

  • πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

    Again not to discount your work. I'm sure its viable for your use case. I even maintain private client-specific customisations of these widgets.

    But for example, I wouldnt want to overwhelm my clients with additional add data options, when extra field items is the intended approach. Excludes on the other hand, are required since theres no way to take away field items intelligently/sanely.

  • πŸ‡ΊπŸ‡ΈUnited States seanr

    OK, thanks. Looks like we are going to split it out into our own widget though we're using the patch for now for the sake of expediency (launch imminent!). I plan, perhaps over the weekend to break this out into its own project and release it.

Production build 0.71.5 2024