Skip to content

[Issue] Make getDataProvider to reduce export duplicate code #39976

Open
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #39966: Make getDataProvider to reduce export duplicate code


Description (*)

This PR makes getDataProvider on the massaction public.
Why do we want this? To reduce unnecessary duplicate code. In the updated files you can see i've been able to remove prepareComponent.

This is because getDataProvider literally calls that when called and no dataProvider has been cached yet.

The call under there applySelectionOnTargetProvider actually calls getDataProvider as well. This means before this PR prepareComponent was always called twice during an export. Simply because we couldn't call getDataProvider and be sure prepareComponent was called.

Manual testing scenarios (*)

  1. Run an export from the Magento backend with filters and selections on/off, check if it still works as expected.

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: ready for confirmationPriority: P3May be fixed according to the position in the backlog.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    Status

    Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions