Problem/Motivation

Currently there is no way to enable creating revisions by default when creating/editing Event Instances and Series.

Steps to reproduce

Go to /admin/structure/events/series/types/eventseries_type/default/edit or /admin/structure/events/series/types/eventseries_type/default/edit and see there is no way to enable "Create new revision".

Proposed resolution

Add new_revision to schema and eventseries/eventinstance type forms

User interface changes

API changes

Data model changes

Config schemas add "new_revision" boolean.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    1 hidden branch
  • 3532699-revision Comparecompare
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kducharm created an issue. See original summary.

kducharm changed the visibility of the branch 3532699-revision to hidden.

kducharm’s picture

Project: Entity Reference Revisions » Recurring Events
Component: Code » Recurring Events (Main module)

kducharm’s picture

dmundra’s picture

Status: Active » Needs review

Thank you @kducharm

pfrenssen’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Needs review » Needs work

I had a quick look at the code but didn't try it out. This looks like a great addition, thanks for starting it! I have a few thoughts:

  1. Since this uses Drupal 10+ attributes the MR should be rerolled against 3.0.x. The current 2.0.x still supports Drupal 9.3 so the code will not work on older sites that didn't update to Drupal 10 yet.
  2. The code looks good as far as I can see. I compared it with how the node module does it and the approach looks the same.
  3. I am not sure whether we should enable the creation of new revisions by default. At the moment this is not the case AFAIK. If we change this to be enabled, then we need an update hook that disables the revisions for each bundle of the event series and bundles. Then existing sites can decide whether they want to enable it or not.
  4. Would be nice to have a small test, but that is not a hard requirement. We are mostly relying on core functionality.
muriqui’s picture

Version: 2.0.x-dev » 3.0.x-dev

muriqui’s picture

Status: Needs work » Needs review

Created a new MR against 3.x as requested, and addressed all of pfrenssen's review comments.

eric.napier’s picture

Status: Needs review » Reviewed & tested by the community

Tested in an integration environment with Recurring Events enabled. Fix works as expected. As a bonus, PHPUnit tests were also added for test coverage of Recurring Event Revisions. Code reviewed for standards / best practice.

  • muriqui committed 318bb586 on 3.0.x
    feat: #3532699 Option to create new revisions missing on Event Instance/...
muriqui’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.