smbjorklund / elmcip_config

0 stars 0 forks source link

Event date with end date is not correctly configured and migrated to Drupal 9 #14

Closed steinmb closed 2 years ago

steinmb commented 3 years ago

ELMCIP D7 allow us to optional set a end date. This is not configured in Drupal 9 and the end date is not migrated.

Optional end date is not implemented in Drupal core. Have a look at this core issue though there is a 3-part module that extends core current date implementation. https://www.drupal.org/project/optional_end_date

There is no Drupal 9.2.x support for these types though solution rolled into 9.3.x.

Data structures

Drupal 7 - Event

    value (String, 19 characters ) 2021-07-02T00:00:00
    value2 (String, 19 characters ) 2021-07-04T00:00:00
    timezone (String, 11 characters ) Europe/Oslo
    timezone_db (String, 11 characters ) Europe/Oslo
    date_type (String, 4 characters ) date | (Callback) date();

Suggested fix

steinmb commented 3 years ago

Checked all other date fields. Event is the only one where we collect a end date (range)

steinmb commented 2 years ago

commit 5b1c5850a5cfd9aa3fe19f0d263dba106caaf4d0 (HEAD -> main, origin/main) Author: Stein Magne Bjorklund steinmb@smbjorklund.com Date: Fri Nov 12 10:59:18 2021 +0100

New Drupal module drupal/optional_end_date
steinmb commented 2 years ago

Test run partly failed:

 ../vendor/bin/drush -l elmcip-d9.local migrate:import uib_node_complete_event
 [notice] Processed 956 items (140 created, 0 updated, 816 failed, 0 ignored) - done with 'uib_node_complete_event'

In MigrateToolsCommands.php line 866:

  uib_node_complete_event Migration - 816 failed.

../vendor/bin/drush -l elmcip-d9.local migrate:status uib_node_complete_event
 ------------------------- ------------------------- -------- ------- ---------- ------------- ---------------------
  Group                     Migration ID              Status   Total   Imported   Unprocessed   Last Imported
 ------------------------- ------------------------- -------- ------- ---------- ------------- ---------------------
  UiB content (uib_nodes)   uib_node_complete_event   Idle     956     140        0             2021-11-12 10:03:36
 ------------------------- ------------------------- -------- ------- ---------- ------------- ---------------------
steinmb commented 2 years ago

These changes looks like it makes the date migration work. Needs more manual testing though.

commit smbjorklund/uib_humanists@e9a3619e5ac431a7851914878ca869cb41733252 (HEAD -> elmcip, origin/elmcip) Author: Stein Magne Bjorklund steinmb@smbjorklund.com Date: Fri Nov 12 12:59:13 2021 +0100

Issue 14 Include todate in a daterange date field

commit 44ad2bd4f7724181a6031931da5d46ded6ce9f9f (HEAD -> main, origin/main) Author: Stein Magne Bjorklund steinmb@smbjorklund.com Date: Fri Nov 12 13:00:42 2021 +0100

Issue 14 Event field_date changed to optional date range

Allowing us to store events that have or have not
from and to dates.
steinmb commented 2 years ago

Look OK