Skip to content

'shipping_method' column in sales_order and quote_address table size limit inconsistent/too small #6475

@reztierk

Description

@reztierk

The size of the column 'shipping_method' in the sales_order and quote_address tables are too small and inconsistent. This may cause an issue with a custom carriers methods as some may have larger method codes ( ie Purolator has a method with a code of 'PurolatorExpressInternationalEnvelope10:30AM' )which will become truncated upon saving and make the order return errors when creating a shipment. It is also noteworthy that the column length on the quote_address table is 40 while on the sales_order table it is 32. This will also cause issues with core Fedex module as some of the methods supported already exceed the lengths available (ie 'EUROPE_FIRST_INTERNATIONAL_PRIORITY'), prior to adding the carrier code which is appended to the method code when saving (ie the intended field value would be 'fedex_EUROPE_FIRST_INTERNATIONAL_PRIORITY').

Preconditions

  1. Magento version(s) 2.1, 2.0

Steps to reproduce

  1. Place an order using a shipping method where the carrier code combined with the method code length exceeds 32 characters.
  2. Create shipment for order with packing label.

Expected result

  1. Shipment is created successfully

Actual result

  1. Shipment creation fails due to mismatch of Method Code.

My recommendation would be to use the same value for the field length that was used in Magento 1 of 255.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions