Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

magento/magento2#7279 bill-to name and ship-to name truncated to 20 chars #9654

Merged
merged 2 commits into from
May 27, 2017

Conversation

SolsWebdesign
Copy link
Contributor

@SolsWebdesign SolsWebdesign commented May 16, 2017

Bill-to Name and Ship-to Name truncated to 20 characters in backend

The firstname, middlename and lastname in table "quote_address" were set to a length of 20.
I compared the lengths of firstname, middlename and lastname of table "quote_address" with those of "quote" (255, 40 and 255 resp.) and of "sales_order_address" (255, 255 and 255) and with sales_order (128, 128 and 128) and choose to go with 255, 40 and 255 since these are used in "quote" as well and these are the values I know from Magento 1.9 as well. The other values seem a bit inconsistent.

Description

In Magento\Quote\Setup\UpgradeSchema.php there was already a repair for street so I added the repairs for the lengths of firstname, lastname and middlename in the same way and tested.

Fixed Issues (if relevant)

#7279 : bill-to name and ship-to name truncated to 20 chars

Manual testing scenarios

Use composer install from the develop branch and after composer install, update the new Magento\Quote\Setup\UpgradeSchema.php. Go through the steps to install Magento further and when done, check the database table "quote_address". The columns firstname, middlename and lastname are now 255, 40 and 255 in length.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Bill-to Name and Ship-to Name trancated to 20 characters in backend
Compared the lengths of firstname, middlename and lastname of table "quote_address" with those of "quote" (255, 40 and 255 resp.) and of "sales_order_address" (255, 255 and 255) and with sales_order (128, 128 and 128) and choose to go with 255, 40 and 255 since these are used in "quote" as well and these are the values I know from Magento 1.9 as well. The other values are a bit inconsistent. Tested.
@ishakhsuvarov ishakhsuvarov self-assigned this May 16, 2017
@ishakhsuvarov ishakhsuvarov added this to the May 2017 milestone May 16, 2017
Copy link
Contributor

@ishakhsuvarov ishakhsuvarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may update the setup version of the Quote module in Quote/etc/module.xml to 2.0.5 and introduce the upgrades for that version constraint.

@@ -46,6 +46,43 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
]
);
}

if (version_compare($context->getVersion(), '2.0.2', '<')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may move all the updates into a single if statement

Bill-to Name and Ship-to Name trancated to 20 characters in backend
Compared the lengths of firstname, middlename and lastname of table "quote_address" with those of "quote" (255, 40 and 255 resp.) and of "sales_order_address" (255, 255 and 255) and with sales_order (128, 128 and 128) and choose to go with 255, 40 and 255 since these are used in "quote" as well and these are the values I know from Magento 1.9 as well. The other values are a bit inconsistent. Tested. Updated setup version of the Quote module to 2.0.5, moved all updates into a single if statement.
@SolsWebdesign
Copy link
Contributor Author

All updates are now moved into one if statement (and placed after the last update if statement) and the setup version of the Quote module is now 2.0.5

@magento-team magento-team merged commit 3140cdf into magento:develop May 27, 2017
magento-team pushed a commit that referenced this pull request May 27, 2017
magento-team pushed a commit that referenced this pull request May 27, 2017
[EngCom] Public Pull Requests
 - MAGETWO-69379 use payment method name to make checkbox of agreements more unique #6207 #9717
 - MAGETWO-69378 #4272: v2.0.4 Credit memos with adjustment fees cannot be fully refunded with a second credit memo #9715
 - MAGETWO-69375 Can't delete last item in cart if Minimum Order is Enable #6151 #9714
 - MAGETWO-69230 #7279 bill-to name and ship-to name truncated to 20 chars #9654
 - MAGETWO-69155 Fix coding standard in Magento AdminNotification module #9627
@magento-team
Copy link
Contributor

@SolsWebdesign thank you for your contribution to Magento 2 project

1 similar comment
@magento-team
Copy link
Contributor

@SolsWebdesign thank you for your contribution to Magento 2 project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants