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

Allow caller to decide if to use stock filter for configurable product children collection #34459

Open
wants to merge 6 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

fredden
Copy link
Member

@fredden fredden commented Oct 27, 2021

Description

Sometimes a merchant wants to show all possible options for a configurable product, including those which are currently out of stock. Currently there is no option for a developer to get this list with existing functionality. This pull request adds a parameter to allow developers to make this decision. The default value for this new parameter matches existing behaviour.

Related Pull Requests

None

Fixed Issues (if relevant)

None yet, please create if required.

Manual testing scenarios

  1. No changes should be witnessed after merging this pull request as the default functionality is being maintained.
  2. A developer may now list children of a configurable product which are not available for sale.

Questions or comments

None

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Oct 27, 2021

Hi @fredden. Thank you for your contribution
Here are 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
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, 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, 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

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@sidolov sidolov added Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. and removed Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. labels Oct 28, 2021
@sidolov sidolov added the Priority: P3 May be fixed according to the position in the backlog. label Oct 28, 2021
@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@Priyakshic Priyakshic added the Project: Community Picked PRs upvoted by the community label Feb 12, 2025
@engcom-Hotel
Copy link
Contributor

@magento run all tests

Copy link
Contributor

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

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

Hello @fredden,

Thanks for the contribution!

Please fix the failed static test and add an automated test in accordance to DOD.

Thanks

@fredden
Copy link
Member Author

fredden commented Feb 22, 2025

@magento run all tests

@fredden
Copy link
Member Author

fredden commented Feb 22, 2025

@engcom-Hotel I have updated this pull request. I am sure that the tests passed when I opened this more than three years ago.

Copy link
Contributor

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

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

Hello @fredden,

Thanks for updating the PR!

We are still having some static test failures on the PR, please fix those and also add an automated test for this fix.

Thanks

@fredden
Copy link
Member Author

fredden commented Feb 24, 2025

@engcom-Hotel it is not my place to change copyright information. It's also out of scope for this pull request. If you require the copyright information to be different, please adjust this in a separate pull request.

@engcom-Hotel
Copy link
Contributor

Hello @fredden,

I agree with your concern but in order to process the PR, we need a green build. And for the copyright static test failure, you just need to make the below changes in the file:

Copyright [year code created] Adobe 
All Rights Reserved.

So please do the needful and also please add the automated test.

Thanks

@fredden
Copy link
Member Author

fredden commented Mar 1, 2025

Changing copyright is out of scope for this pull request. I do not represent neither Magento Inc nor Adobe; changing the copyright between these two companies is not something that I'm willing to do. @engcom-Hotel, please raise a separate pull request to address this change if it's important to you.

I have looked at the existing unit tests for this class. From what I can tell, the getSalableUsedProducts method has no tests and the getUsedProducts method has only the most basic test and does not have proper / full coverage of the existing behaviour. @engcom-Hotel, I recommend that you raise a new issue in your internal Jira instance asking for tests to be reviewed for this class. If you can offer a suggestion for how you would like the functionality being added here to be tested, please do share that here and we can review if such a change is feasible / within the scope of this pull request. Rewriting all the tests for this class is not in scope here.

@engcom-Charlie
Copy link
Contributor

Hi @fredden,

Thank you for your contribution!

In order to proceed further on this PR, we need a green build and currently the static test is failing for the copyright issue. As per the process, we have to provide the fix in the same PR. Can we go ahead and do the needful. We will look into the review comments and the test failures too in the same PR.

Please let us know, till then moving this PR to On Hold.

@engcom-Charlie engcom-Charlie self-assigned this Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ConfigurableProduct Partner: Fisheye partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: needs update Project: Community Picked PRs upvoted by the community Release Line: 2.4
Projects
Status: On Hold
Development

Successfully merging this pull request may close these issues.

6 participants