Problem/Motivation

We have some missing formats for number_integer. It also seems that we have extra formats that I can't find declared anywhere?

Expected formats: http://cgit.drupalcode.org/cck/tree/modules/number/number.module?h=6.x-3...

and their associated types: http://cgit.drupalcode.org/cck/tree/modules/number/number.module?h=6.x-3...

This seems to have been introduced in #2368349: Entity view and form display configuration schemas are too verbose / key ones missing where the us_0 formats where removed in favour of 3, i'm not sure why that happened, i've pinged Gabor.

Proposed resolution

Fix the number types which then exposes a schema issue with the field type settings which needs to be mapped per field type and not per field module. Two fail patches attached to show both issues.

Remaining tasks

Write a patch.

User interface changes

n/a

API changes

us_3, be_3 and fr_3 are no longer supported. I think they were added incorrectly.

CommentFileSizeAuthor
#3 2404955-3.patch7.82 KBbenjy
field-map-FAIL.patch580 bytesbenjy
field-map-FAIL-2.patch864 bytesbenjy

Comments

The last submitted patch, field-map-FAIL-2.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, field-map-FAIL.patch, failed testing.

benjy’s picture

Status: Needs work » Needs review
Related issues: +#2348875: Improving our dump files
StatusFileSize
new7.82 KB

Moved the number mapping to the process plugin. This issue is blocking #2348875: Improving our dump files

benjy’s picture

The second fail patch didn't show the issue I wanted it too. You can see that the changes are correct for the number type by looking at core.entity.schema.yml

field.formatter.settings.number_decimal:
  type: mapping
  label: 'Number decimal display format settings'
  mapping:
    thousand_separator:
      type: string
      label: 'Thousand marker'
    decimal_separator:
      type: string
      label: 'Decimal marker'
    scale:
      type: integer
      label: 'Scale'
    prefix_suffix:
      type: boolean
      label: 'Display prefix and suffix.'

field.formatter.settings.number_integer:
  type: mapping
  label: 'Number interger display format settings'
  mapping:
    thousand_separator:
      type: string
      label: 'Thousand marker'
    prefix_suffix:
      type: boolean
      label: 'Display prefix and suffix.'
chx’s picture

Status: Needs review » Reviewed & tested by the community

Nothing regarding CCK is nice. It's a fact of life. We do what we can.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Migrate changes are not frozen during beta. Committed d3e7bdb and pushed to 8.0.x. Thanks!

  • alexpott committed d3e7bdb on 8.0.x
    Issue #2404955 by benjy: Field Formatter settings have incorrect...
gábor hojtsy’s picture

So the original change was made in #2368349-69: Entity view and form display configuration schemas are too verbose / key ones missing because migrate attempted to use properties 'scale' and 'decimal_separator' for a field type where those two were not available (number_integer). The fix seems to provide different values for the different formats based on whether its a decimal or integer number, so it looks fine. There are missing function docs and typos, but its already committed :D

Status: Fixed » Closed (fixed)

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