Problem/Motivation

When running a site migration from D7 to D8 it isn't clear why d7_node_title_label might only show a few records processed.

Steps to reproduce

Run the d7_node_title_label migration from a D7 site.

Proposed resolution

Document in d7_node_title_label.yml what the migration does, make it clear that there may only be a few records migrated and that this is ok.

Remaining tasks

Documentation.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

n/a

CommentFileSizeAuthor
#3 drupal-n3161696-3.patch1.02 KBdamienmckenna

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Assigned: Unassigned » damienmckenna
damienmckenna’s picture

Assigned: damienmckenna » Unassigned
Status: Active » Needs review
StatusFileSize
new1.02 KB

For consideration.

davidhernandez’s picture

Status: Needs review » Needs work
+# Migrate Drupal 7's node title label

Should this have a period?

...changing the node title field's label using...

This is a difficult read for me. Would it be better as "node title's field label" ?

but only actually migrate

"actually" can probably be removed here to shorten up the sentence. It is a bit run on at the moment.

Source contains five content types, three have "title_label" set to "Title",
+#   two have custom strings.

This should be written as a more proper sentence. Beginning with "The" and having an "and" after the second comma.

I otherwise pass no judgement on whether this should be included. I trust Damian's opinion on its necessity.

quietone’s picture

@DamienMcKenna, thanks for making a patch. It really helps to see what docs you would like to see.

By chance I saw this issue. I would prefer this in the migration system component so that migrate maintainers will see it. That is, we review what is in the migration system component. Thinking about that for the moment.

On my first look at the patch I wondered why it was necessary at all, it is clear what the skip_on_empty is doing. Then I realized that I'm quite familiar with reading core pipelines so I should ignore that thought. Plus, adding documentation is almost always a good idea. So, moving on.

Then again, why this skip_on_empty and this migration? What makes this skip_on_empty different from the other 103 instances of skip_on_empty with a method of 'row' in core. Just thinking out loud.

  1. +++ b/core/modules/node/migrations/d7_node_title_label.yml
    @@ -1,3 +1,19 @@
    +# Migrate Drupal 7's node title label
    

    I don't think this is necessary. The first two lines of the migration inform the reader that this is a migration for the Node title label for Drupal 7.

  2. +++ b/core/modules/node/migrations/d7_node_title_label.yml
    @@ -1,3 +1,19 @@
    +# Drupal 7 allowed changing the node title field's label using a custom string
    +# stored in the "title_label" column in the "node_type" table. The default
    +# string is "Title".
    +#
    +# When this migration runs it will identify all of the "node_type" records as
    +# the total number of records to migrate, but only actually migrate records
    +# where the string is not equal to "Title".
    

    Can we shorten this? Something like, 'Migrate the title_label only for node types where the title_label is not the default value, 'Title'.

    And what do think about putting this in the pipeline just before 'label:'? I ask because I can't think of any migration yml that has a documentation block at the top, it is usually it is the pipeline and sometime the source or destination section.

  3. +++ b/core/modules/node/migrations/d7_node_title_label.yml
    @@ -1,3 +1,19 @@
    +# Example scenario:
    

    Granted it is implied in the suggested description above, but I don't think an example is necessary.

quietone’s picture

Issue tags: +migrate-d7-d8

Adding tag.

damienmckenna’s picture

Component: documentation » migration system

Thank you both for your reviews!

As quietone points out, this was a prelude to wondering if all migration templates should have included documentation explaining how they work. There's no point in fixing just one file if there are also a hundred more to fix ;-)

I was aiming to follow the standard class format - start with an initial single sentence description, then proceed with additional details in further paragraphs.

I'll work on an improved patch for this file tomorrow.

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

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

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.

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.

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: Needs work » Postponed

The Migrate Drupal Module was approved for removal in #3371229: [Policy] Migrate Drupal and Migrate Drupal UI after Drupal 7 EOL.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3522602: [meta] Tasks to remove Migrate Drupal module and the removal work in #3522602: [meta] Tasks to remove Migrate Drupal module.

Migrate Drupal will not be moved to a contributed project. It will be removed from core after the Drupal 12.x branch is open.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Postponed » Closed (won't fix)

The Migrate Drupal Module and Migrate Drupal UI are deprecated and they are not in Drupal 12.0.0.

Issues for these modules should now be on the 11.x branch. And the changes are limited to critical and major bug fixes. Other changes are allowed at the discretion of the core Release Managers in consultation with the Migrate subsystem maintainers.

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.