Postponed on #3247281: Add views_migration to Drupal core

Problem/Motivation

There is no migration for views.

Steps to reproduce

Proposed resolution

Integrate views migration with drupal 9

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3211276

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

Jeya sundhar created an issue. See original summary.

sundhar’s picture

Version: 9.1.x-dev » 9.2.x-dev
cilefen’s picture

Component: views.module » migration system
Category: Support request » Feature request
sundhar’s picture

Status: Active » Needs review
StatusFileSize
new22.07 KB
sundhar’s picture

StatusFileSize
new22.07 KB

Status: Needs review » Needs work

The last submitted patch, 5: Views_migration-3211276-5.patch, failed testing. View results

sundhar’s picture

StatusFileSize
new721 bytes
sundhar’s picture

StatusFileSize
new22.51 KB

State views.migrate_drupal.yml added

vsujeetkumar’s picture

Status: Needs work » Needs review
StatusFileSize
new22.18 KB
new314 bytes

Fixing fail tests, Added module 'Views' in StateFileExists file, Please have a look.

huzooka’s picture

This is my very rough review (of #10):

  1. +++ b/core/modules/views/src/Plugin/migrate/destination/ViewsMigration.php
    @@ -0,0 +1,30 @@
    +<?php
    +
    +namespace Drupal\views\Plugin\migrate\destination;
    +
    +use Drupal\migrate\Plugin\migrate\destination\EntityConfigBase;
    +use Drupal\migrate\Row;
    +
    +/**
    + * Drupal 8 views destination.
    + *
    + * @MigrateDestination(
    + *   id = "entity:view"
    + * )
    + */
    +class ViewsMigration extends EntityConfigBase {
    +
    +  /**
    +   * ViewsMigration import.
    +   *
    +   * @param Drupal\migrate\Row $row
    +   *   The views migration row.
    +   * @param array $old_destination_id_values
    +   *   Old destination id values.
    +   */
    +  public function import(Row $row, array $old_destination_id_values = []) {
    +    $entity_ids = parent::import($row, $old_destination_id_values);
    +    return $entity_ids;
    +  }
    +
    +}
    

    This destination plugin is now completely redundant.

  2. +++ b/core/modules/views/src/Plugin/migrate/source/d7/ViewsMigration.php
    @@ -0,0 +1,534 @@
    + *   id = "d7_views",
    + *   source_module = "views"
    

    I miss the core annotation. And I'm almost sure that we'll need a mimimum schema version.

  3. +++ b/core/modules/views/src/Plugin/migrate/source/d7/ViewsMigration.php
    @@ -0,0 +1,534 @@
    +class ViewsMigration extends FieldableEntity {
    

    This isn't using anything from FieldableEntity – let's extend DrupalSqlBase instead!

    Imho the source plugin should be named as "Views" instead of ViewsMigration".

Status: Needs review » Needs work

The last submitted patch, 10: 3211276-10.patch, failed testing. View results

sundhar’s picture

StatusFileSize
new23.88 KB
sundhar’s picture

StatusFileSize
new23.88 KB

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

heddn’s picture

As core sub-system maintainers for migrate, Michael Lutz (mikelutz), Benji Fisher (benjifisher), Vicki Spagnolo (quietone), and me (heddn) had some discussions recently about this proposal. Our suggestion is as follows and goes in line with how features as impactful as this are typically accepted into core these days.

To start, know that a migration path for views goes against the stream. For example, we already discussed this in #2500547: Upgrade path for Views from Drupal 6 and 7 and decided to punt. Getting it into core will be hard, mainly because it will be a lot of work.

Here's the greatest chance at success if you really want to get this into Drupal core:

  • Open an ideas issue queue issue and start a sandbox or contrib project. It looks like the 2nd part of this is already done (see https://www.drupal.org/project/views_migration). We just need the first part. See https://www.drupal.org/project/ideas for more ideas on this process.
  • Focus on improvements in contrib. You'll be able to move a _lot_ faster and get a lot of benefit for a lot of people in contrib.
  • Make sure there is ample test coverage. If this is core-bound, testing is sometimes the hardest gate. So start out well in contrib.
  • Once the module is hugely successful, then consider at that point if it makes sense to move into core.
  • In the meantime, there's nothing stopping us from mentioning and promoting the module in drupal migration guides and blog posts.
  • If there is areas you would value assistance from the migrate sub-system maintainers during this journey, don't hesitate to reach out.
quietone’s picture

Issue summary: View changes
sundhar’s picture

Assigned: sundhar » Unassigned
sundhar’s picture

Issue summary: View changes

#17, Idea added to drupal ideas #3247281: Add views_migration to Drupal core

quietone’s picture

Title: Views migration from Drupal 7 to Drupal 9 » Views migration from Drupal 7 to Drupal 9
Issue summary: View changes
Status: Needs work » Postponed
Related issues: +#3247281: Add views_migration to Drupal core

@Jeya sundhar, thank you for opening an issue in the ideas project. And if you ever need review or testing in the Views migration from Drupal 6 or 7 to Drupal 9 project, ping me in #migration.

Postponing this on #3247281: Add views_migration to Drupal core.

sundhar’s picture

:+1 yes @quietone

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

nwom’s picture

StatusFileSize
new23.04 KB

Patch #15 no longer applied against 9.4.8. Here is a re-roll.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Postponed » Closed (won't fix)

Migrate Drupal and Migrate Drupal UI have been approved for removal from core so this is now a won't fix. People wanting this functionality should look at the contrib project. The issue discussing the removal is #3371229: [Policy] Migrate Drupal and Migrate Drupal UI after Drupal 7 EOL