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 multiple conditions for expired quotes collection #24821

Conversation

p-bystritsky
Copy link
Contributor

@p-bystritsky p-bystritsky commented Oct 2, 2019

Description (*)

This is a refactoring of #20777

With Magento\Sales\Cron\CleanExpiredQuotes::setExpireQuotesAdditionalFilterFields() assigning values directly to the attribute and getExpireQuotesAdditionalFilterFields() being protected isn't callable outside the class, hence unable to add more to the existing condition, rather they end up being replaced with the new ones.

Fixed Issues (if relevant)

Manual testing scenarios (*)

Questions or comments

EE code should also be adapted.

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)

@p-bystritsky p-bystritsky requested a review from YevSent as a code owner October 2, 2019 09:50
@m2-assistant
Copy link

m2-assistant bot commented Oct 2, 2019

Hi @p-bystritsky. 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.3-develop instance - deploy vanilla Magento instance

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

@ghost
Copy link

ghost commented Oct 2, 2019

@p-bystritsky unfortunately, only members of the maintainers team are allowed to assign developers to the pull request

@engcom-Foxtrot engcom-Foxtrot self-assigned this Oct 2, 2019
@sivaschenko
Copy link
Member

@p-bystritsky can you please sign the CLA

@filmaj filmaj closed this Oct 2, 2019
@m2-assistant
Copy link

m2-assistant bot commented Oct 2, 2019

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

@filmaj filmaj reopened this Oct 2, 2019
@ghost ghost unassigned engcom-Foxtrot Oct 2, 2019
@swnsma swnsma self-requested a review October 4, 2019 08:58
Copy link
Contributor

@swnsma swnsma left a comment

Choose a reason for hiding this comment

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

Hi @p-bystritsky,
Thank you for you review!
Lets discuss your solution under my comment in the code.

/**
* Provides expire quotes filter fields.
*/
class ExpireQuotesFilterFieldsProvider
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you really believe that we need to have a separated class to collect the filters?
Or could we just add filters as array parameter to the app/code/Magento/Sales/Model/ResourceModel/Collection/ExpiredQuotesCollection.php ?
I can not come with real case when we need a new class.

@ghost ghost assigned swnsma Oct 4, 2019
@p-bystritsky
Copy link
Contributor Author

Closing this PR due to creation of #24858.

@m2-assistant
Copy link

m2-assistant bot commented Oct 4, 2019

Hi @p-bystritsky, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants