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

Specify the table when adding field in massAction filter #17864

Closed
wants to merge 1 commit into from
Closed

Specify the table when adding field in massAction filter #17864

wants to merge 1 commit into from

Conversation

adaudenthun
Copy link
Contributor

@adaudenthun adaudenthun commented Aug 30, 2018

Hi!
About the MassAction in admin Grid. When have a custom grid and apply custom \Magento\Sales\Model\ResourceModel\Order\Grid\Collection and override _initSelect for add join group etc ...
So, when we join some tables, we have the error 'ambiguous column name'.

Fixed Issues (if relevant)

  1. Specify the table when adding field when applySelectionOnTargetProvider() in Magento\Ui\Component\MassAction\Filter.php #17863: Specify the table when adding field when applySelectionOnTargetProvider() in Magento\Ui\Component\MassAction\Filter.php

Manual testing scenarios

  1. Have a custom collection grid like :
    class Collection extends \Magento\Sales\Model\ResourceModel\Order\Grid\Collection { protected function _initSelect() { parent::_initSelect(); $this->getSelect() ->join('XXXXXX') ->group("XXXXX"); return $this; } }
  2. Try to apply a mass action

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)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Aug 30, 2018

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @adaudenthun. 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-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@adaudenthun adaudenthun reopened this Aug 30, 2018
@sidolov
Copy link
Contributor

sidolov commented Aug 30, 2018

Hi @adaudenthun , looks like email from commit is different than in your GitHub profile, please, add email from commit to your Github profile and sign CLA, otherwise we can't proceed with your PR.
Thank you!

@adaudenthun
Copy link
Contributor Author

adaudenthun commented Aug 30, 2018

Hi @sidolov ,

Normaly now it's ok , i add this.

thanks

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

@adaudenthun thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@sidolov
Copy link
Contributor

sidolov commented Sep 6, 2018

Hi @adaudenthun , we found an issue with the provided solution, just try to apply mass action on the Catalog -> Products page. We received an exception:
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid attribute name: main_table.entity_id
Looks like that generic fix affects all grids in Magento and may cause unexpected behavior.

@sidolov
Copy link
Contributor

sidolov commented Sep 20, 2018

Hi @adaudenthun , I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for the collaboration!

@sidolov sidolov closed this Sep 20, 2018
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.

4 participants