Skip to content

feat: replace enterprise support enrollment imports with filter call - #39083

Draft
brobro10000 wants to merge 1 commit into
openedx:masterfrom
brobro10000:brobro10000/ENT-11574-enrollment
Draft

brobro10000 wants to merge 1 commit into
openedx:masterfrom
brobro10000:brobro10000/ENT-11574-enrollment

Conversation

@brobro10000

@brobro10000 brobro10000 commented Sep 8, 2026

Copy link
Copy Markdown
Member

ENT-11574

Companion PR to the already-open support-contact-tag PR set (openedx-filters#390,
edx-enterprise#2688, openedx-platform#39076, edx-platform#455) — this one covers the
other half of ENT-11574's acceptance criteria: enterprise enrollment data for the support
enrollment view.

Removes the direct openedx.features.enterprise_support imports and the
_enterprise_course_enrollments_by_course_id helper from EnrollmentSupportListView,
replacing them with a call to the new SupportEnrollmentDataRequested openedx-filter. No
settings changes in this PR: OPEN_EDX_FILTERS_CONFIG registration for the pipeline step
lives entirely in edx-enterprise's own plugin_settings() (enterprise/settings/common.py),
per the ENT-11830 ownership handoff — already merged in this repo (#38634) well before this
branch existed.

lms/djangoapps/support/views/contact_us.py is untouched — this PR is scoped to the
enrollment filter only.

Shape corrected

Code review flagged that passing an empty placeholder dict to the filter (and zipping the
results back onto enrollments via a for-loop in the call site) left a non-enterprise
pipeline-step implementer nothing real to augment, and that the resulting for-loop should be
deleted by having the filter make in-place changes to enrollments instead
(comment,
comment). Since
openedx-filters#393 and edx-enterprise#2690 were already merged/released, the fix landed
as new PRs:

Update: this PR's call site is now updated ahead of those two merging/releasing, on the
assumption they'll land as designed. The call site now reads enrollments, _ = SupportEnrollmentDataRequested.run_filter(enrollments=enrollments, user=user) with the
zip-back for-loop deleted entirely — zero "enterprise" mentions remain in
enrollments.py. See the CI note below for the resulting interim test failure.

Related PRs

Merge order (per the enterprise plugin ticket runbook)

This PR merges LAST, only after:

  1. openedx-filters and edx-enterprise are merged and released.
  2. The edx/edx-platform sibling PR is merged, deployed to stage, tested, deployed to prod, and
    confirmed working.
  3. This PR is rebased and any stage/prod fixes are cherry-picked in.

CI note

test_get_enrollments in lms/djangoapps/support/tests/test_views.py is expected to fail
until openedx-filters#396 and edx-enterprise#2693 are merged and released: it exercises the
real (unmocked) filter pipeline, and the currently-released edx-enterprise 8.12.0's
SupportEnterpriseEnrollmentDataInjector.run_filter still has the old
(enrollment_data, user) signature, so calling it with the new enrollments= kwarg raises
TypeError. Same situation as the sibling contact-tag PR (openedx-platform#39076) previously
hit while waiting on its own dependency release. This self-resolves once both companion PRs
release and this repo's requirements/edx/base.txt pins are bumped to match (follow-up
commit, tracked separately). Do not merge this PR until that follow-up lands and CI is
green.

Testing

New: SupportEnrollmentDataRequested.run_filter is mocked at the call site in
lms/djangoapps/support/tests/test_views.py — the pipeline-step behavior itself is covered
by edx-enterprise's own test suite.

Local devstack integration testing (with the openedx-filters, edx-enterprise, and edx-platform
branches checked out together) is required before any of these PRs merge.

Removes the direct openedx.features.enterprise_support imports and the
_enterprise_course_enrollments_by_course_id helper from
EnrollmentSupportListView, replacing them with a call to the
SupportEnrollmentDataRequested openedx-filter.

Bumps openedx-filters to 3.13.0 and edx-enterprise to 8.13.0, now that
both are released and contain the enrollments_data shape correction
this call site relies on.

ENT-11574
@brobro10000
brobro10000 force-pushed the brobro10000/ENT-11574-enrollment branch from 9d44e13 to f37a741 Compare September 17, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant