Skip to content

fix for ambigous column user_id in where clause #31205

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

Conversation

dorupetruc
Copy link
Contributor

@dorupetruc dorupetruc commented Dec 8, 2020

Magento\Users\Model\ResourceModel\User\Collection addFilterToMap for user_id

Description (*)

When filtering Magento\Users\Model\ResourceModel\Users\Collection by user_id , it throws an SQL exception ( ambigous user_id in where condition )

Manual testing scenarios (*)

  1. go to Backend > System > Permissions > All users grid
  2. filter the grid by ID
  3. expected result : grid filtered by ID
    actual result: first time it redirects to dashboard & subsequent access of All Users grid throws the aabove exception.

Resolved issues:

  1. resolves [Issue] fix for ambigous column user_id in where clause #31216: fix for ambigous column user_id in where clause

…\User\Collection addFilterToMap for user_id )
@m2-assistant
Copy link

m2-assistant bot commented Dec 8, 2020

Hi @dorupetruc. 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

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

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

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@sidolov sidolov added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Dec 8, 2020
@sidolov
Copy link
Contributor

sidolov commented Dec 8, 2020

@magento create issue

@danielrussob
Copy link

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @danielrussob. Thank you for your request. I'm working on Magento instance for you.

@danielrussob
Copy link

@magento give me test instance

@magento-deployment-service
Copy link

Hi @danielrussob. Thank you for your request. I'm working on Magento instance for you.

@danielrussob
Copy link

@magento run all tests

@danielrussob
Copy link

Hello, @dorupetruc
thanks for your contribution! 💯

As: https://github.com/magento/magento2/pull/31205/checks?check_run_id=1517247098
Please sign "Adobe CLA Signed"

Tell me if you have some problems 👍

@magento-deployment-service
Copy link

@danielrussob
Copy link

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @danielrussob. Thank you for your request. I'm working on Magento instance for you.

@danielrussob
Copy link

Hello @dorupetruc,
we (CC: @aleron75) are not able to reproduce the issue on vanilla Magento 2.4 Instance

Can you confirm that the only steps to reproduce the issue are the following:

go to Backend > System > Permissions > All users grid
filter the grid by ID
expected result: grid filtered by ID
actual result: the first time it redirects to dashboard & subsequent access of All Users grid throws the above exception.

Can you try with:

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @danielrussob. Thank you for your request. I'm working on Magento instance for you.

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Case 1.

Manual testing scenario:

  1. Add the code from the attached file
    Code_to_reproduce_31205.zip
  2. Run in console: php bin/magento setup:upgrade;
  3. Log in to the admin panel;
  4. open URL /admin/column;

Before: ✖️ 2 exceptions occur

Screenshot from 2021-02-02 15-26-29

After: ✔️ No exceptions

Screenshot from 2021-02-02 16-08-03

Case 2.

Manual testing scenario:

  1. Go to Admin -> System -> Permissions -> All users grid;
  2. Filter the grid by ID;

After: ✔️ The grid filtered by ID correctly
Peek 2021-02-03 09-24

@magento-engcom-team
Copy link
Contributor

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

@m2-assistant
Copy link

m2-assistant bot commented Feb 18, 2021

Hi @dorupetruc, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: User Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] fix for ambigous column user_id in where clause
7 participants