Problem/Motivation

In #2931294: Timestamp field type misses schema for value we added the schema for timestamp field values. Unfortunately, we didn't check if the timestamp scalar data type is defined in core.data_types.schema.yml. This breaks any test that is trying to import a field.field.*.* configuration for a timestamp field. The attached "test only" test proves this bug.

Proposed resolution

Add the timestamp scalar data type is defined in core.data_types.schema.yml.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Status: Active » Needs review
StatusFileSize
new3.43 KB
new2.9 KB

Patches

Status: Needs review » Needs work

The last submitted patch, 2: 2938799-2.test-only.patch, failed testing. View results

tstoeckler’s picture

Status: Needs work » Reviewed & tested by the community

Yup, totally makes sense. Thanks!

For reference, here's the hunk that #2931294: Timestamp field type misses schema for value introduced and that is currently broken because type: timestamp doesn't exist.

field.value.timestamp:
  type: mapping
  label: 'Timestamp value'
  mapping:
    value:
      type: timestamp
      label: 'Value'
catch’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/tests/Drupal/KernelTests/Core/Datetime/TimestampSchemaTest.php
@@ -0,0 +1,28 @@
+
+  /**
+   *
+   */

These either needs a comment, or no comment, but not an empty comment - DrupalCS doesn't like the empty comment.

claudiu.cristea’s picture

Status: Needs work » Needs review
StatusFileSize
new3.48 KB
new659 bytes

@catch, true. Simply forgot that :)

mpdonadio’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#2933548: [META] Find all fields with missing/improper schemas

Nice catch. LGTM.

  • catch committed e15fce6 on 8.6.x
    Issue #2938799 by claudiu.cristea: Provide the timestamp scalar data...

  • catch committed 1b33730 on 8.5.x
    Issue #2938799 by claudiu.cristea: Provide the timestamp scalar data...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.6.x and cherry-picked to 8.5.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.