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

Fix #6310 - Changing products 'this item has weight' using 'Update Attributes' is not possible #26075

Conversation

Bartlomiejsz
Copy link
Contributor

@Bartlomiejsz Bartlomiejsz commented Dec 17, 2019

Description (*)

This is fix for #6310

Related Pull Requests

https://github.com/magento/partners-magento2ee/pull/150

Fixed Issues (if relevant)

  1. Changing products 'this item has weight' using 'Update Attributes' is not possible #6310: Changing products 'this item has weight' using 'Update Attributes' is not possible

Manual testing scenarios (*)

  1. Select a couple of virtual products in the product grid in the backend
  2. Choose 'Update Attributes' in the 'Actions' dropdown
  3. Search for the weight field, you'll find it
  4. Search for the 'Does this has a weight?', you should be able to find it and use to change multiple products type at once

Questions or comments

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 are green)

@m2-assistant
Copy link

m2-assistant bot commented Dec 17, 2019

Hi @Bartlomiejsz. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@Bartlomiejsz Bartlomiejsz force-pushed the feature/fix_6310_this_item_has_weight_update_attributes branch 2 times, most recently from 4fb9caf to bfe493b Compare December 18, 2019 11:23
@Bartlomiejsz Bartlomiejsz added Partner: Fast White Cat partners-contribution Pull Request is created by Magento Partner labels Jan 6, 2020
@Bartlomiejsz Bartlomiejsz force-pushed the feature/fix_6310_this_item_has_weight_update_attributes branch from bfe493b to 166c7ac Compare February 10, 2020 14:11
@Bartlomiejsz Bartlomiejsz force-pushed the feature/fix_6310_this_item_has_weight_update_attributes branch 4 times, most recently from e41e289 to 84efcec Compare February 27, 2020 15:52
@Bartlomiejsz Bartlomiejsz force-pushed the feature/fix_6310_this_item_has_weight_update_attributes branch from 84efcec to 2506c08 Compare February 27, 2020 19:22
@sivaschenko
Copy link
Member

@magento run all tests

@Bartlomiejsz Bartlomiejsz requested a review from hostep March 4, 2020 15:21
lenaorobei
lenaorobei previously approved these changes Mar 19, 2020
@magento-engcom-team
Copy link
Contributor

Hi @lenaorobei, thank you for the review.
ENGCOM-7151 has been created to process this Pull Request

@engcom-Bravo engcom-Bravo self-assigned this Mar 20, 2020
@magento-engcom-team
Copy link
Contributor

Hi @lenaorobei, thank you for the review.
ENGCOM-7151 has been created to process this Pull Request

@engcom-Bravo
Copy link
Contributor

✔️ QA Passed

@engcom-Echo
Copy link
Contributor

@magento run all tests

@engcom-Echo
Copy link
Contributor

@magento run all tests

if (!$this->getForm()->getDataObject()->getTypeInstance()->hasWeight()) {
$this->weightSwitcher->setValue(WeightResolver::HAS_NO_WEIGHT);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I think in this case you need to do the check opposite.

if ($this->getForm()->getDataObject()->getTypeInstance()->hasWeight()) {
$this->weightSwitcher->setValue(WeightResolver::HAS_WEIGHT);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

This check should be

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right @engcom-Echo, sorry for that. I restored this check

@engcom-Echo
Copy link
Contributor

@magento run all tests

@engcom-Echo
Copy link
Contributor

Failed functional tests not related to the changes in this PR

@m2-assistant
Copy link

m2-assistant bot commented Mar 28, 2020

Hi @Bartlomiejsz, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@Bartlomiejsz Bartlomiejsz deleted the feature/fix_6310_this_item_has_weight_update_attributes branch May 28, 2020 22:24
@sdzhepa sdzhepa mentioned this pull request May 9, 2022
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.

Changing products 'this item has weight' using 'Update Attributes' is not possible
6 participants