Oliver Davies
6d9ecd8df0
Rather than the custom event sorting plugin being based on the `created` value, this change adds a new `field_event_date` field to the talk node type and uses this for the sorting instead. This commit also adds a new `TalkDateUpdater` service that extracts either the next event date if there is a future date, or the last past event date if there is no future date, from `field_events` for each talk and saves it into the event date field. For consistency, and to ensure that the results are ordered correctly, the talk date updater converts the date from a date string (e.g. `2020-08-24`) into a UNIX timestamp, and the timestamp is saved in the event date field. This can be changed at a later date if needed. The talks view has been updated to use the updated sort plugin, and the existing tests have been updated to use the new field. References #204
21 lines
361 B
YAML
21 lines
361 B
YAML
uuid: 86aec221-e3cb-4da3-90b5-522b661c6313
|
|
langcode: en
|
|
status: true
|
|
dependencies:
|
|
module:
|
|
- node
|
|
id: node.field_event_date
|
|
field_name: field_event_date
|
|
entity_type: node
|
|
type: integer
|
|
settings:
|
|
unsigned: false
|
|
size: normal
|
|
module: core
|
|
locked: false
|
|
cardinality: 1
|
|
translatable: true
|
|
indexes: { }
|
|
persist_with_no_fields: false
|
|
custom_storage: false
|