-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
Description
Preconditions
- Magento ver. 2.3.0-dev
Steps to reproduce
\Magento\Ui\Component\MassAction\Filter::getCollection
The main goal of this class is obtaining entity ids from request for mass actions
Expected result
- Contract without dependency on AbstractDb $collection
- Logic based on extra query is removed
Actual result
- Parameter is AbstractDb $collection. But it is a redundant dependency. We need to provide ids, and for this action collection is not required.
Also, it is violation of SPR, LSP principles, and CQS - In this way we have a double loading of the same date (entities ids). After performing
{code}$idsArray = $this->getFilterIds();{code} we already have entity ids (obtained from data provider). But we apply a new filter to a collection based on these ids. So we need to do one more query which is reloading existing data.
Metadata
Metadata
Assignees
Labels
Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release