Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Description:
- In Drupal 8.2.x through 8.4.x, the Datetime Range module's fields did not use the same views integration as core datetime fields. This meant that they did not support features like year- or month-only formats for Views fields, regular expressions for Views filters, and so on.
- In Drupal 8.5.x, the Views integration for Datetime Range fields is updated to extend that of other datetime fields.
- You are affected by this change if you have a Views that configure a field, filter criteria, or sort criteria for a Datetime Range field, or if you have a module that extends the Views integration for Datetime Range fields. When you update to Drupal 8.5.0, existing views that contain Datetime Range fields, filters, or sorts will be automatically updated to use datetime fields instead by running database updates.
- Important upgrade information
- Although the automatic updates will take care of the migration between the old plugin format to the new one, site builders and developers should check the Views still list the expected results.
- As a site builder / developer
- At the end of the database updates a message will list the modified Views names/id, if any. [we can add the screenshot https://www.drupal.org/files/issues/datetime_range_update_info.png]
- Modules containing on its default configuration any Views using the old Datetime Range plugins types will benefit of the automatic migration on installing the module or - better - on saving the Views. If you are the maintainer of the module you must re-export the Views configuration with the new plugins types, as the automatic update on saving Views will be removed before 9.0.0 .
- As a developer
- As the operators between old (string/standard) and new (datetime) plugins are different, we take some assumption you may want to review. The update will map existing datetime_range views string plugins operators/values according with this list:
- = maps to =, value is unchanged
- != maps to !=, value is unchanged
- not maps to !=, value is unchanged
- starts maps to regular_expression, value is prefixed with '^'
- ends maps to regular_expression, value is suffixed with '$'
- any other operator (contains, word, allwords, not_starts, not_ends, shorterthan, longerthan, regular_expression) maps to regular_expression, value is unchanged if not empty otherwise *. is used
- UI changes:
- There are no new UI elements. Existing Views filter and sort plugins against datetime_range fileds will now use the datetime widgets. The change is automatic, site-builders and developers don't need to do any action.
- See the example below of how the UI will change for a Views filter plugin against a datetime_range field:
- [screenshots]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement