Skip to content

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

Merged
brobro10000 merged 1 commit into
release-ulmofrom
brobro10000/ENT-11574-enrollment
Sep 18, 2026
Merged

brobro10000 merged 1 commit into
release-ulmofrom
brobro10000/ENT-11574-enrollment

Conversation

@brobro10000

@brobro10000 brobro10000 commented Sep 8, 2026

Copy link
Copy Markdown

ENT-11574

Sibling of the openedx/openedx-platform PR of the same name, carrying the same call-site
change to this deployable fork so it can go through stage/prod ahead of the upstream merge,
per the enterprise plugin ticket runbook. Devstack only boots this repo (not
openedx/openedx-platform), so this is also the branch used for local integration testing.

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 (#281) 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 here) 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, which have since merged and released:

Follow-up review also asked for the argument to keep its _data suffix
(enrollments_data, not enrollments) and for a documented example payload — both addressed
in the same two PRs above before they merged.

The call site here reads enrollments, _ = SupportEnrollmentDataRequested.run_filter(enrollments_data=enrollments, user=user) with the
zip-back for-loop deleted entirely — zero "enterprise" mentions remain in enrollments.py.

Dependency pins updated

Now that both companion PRs are released, this PR's openedx-filters/edx-enterprise pins are
bumped to match (3.13.0 / 8.13.0) in requirements/constraints.txt and the compiled
requirements files — verified locally against the real released packages that
SupportEnrollmentDataRequested.run_filter(enrollments_data=..., user=...) returns the
expected (enrollments, user) tuple.

Stale test assertion removed

With the real released packages installed, CI surfaced a genuine bug: test_get_enrollments
(which exercises the real, unmocked filter — no pipeline step configured in this repo's test
settings) asserted data[0]['enterprise_course_enrollments'] == []. That key is only ever added
by a configured pipeline step; with none configured here, run_pipeline is a no-op and the key
is never added at all — the assertion raised KeyError, not a failed equality check. Removed the
stale assertion; test_get_enrollments_with_enterprise_filter (which mocks the pipeline step)
already covers the case where the key is actually populated.

Related PRs

Merge order (per the enterprise plugin ticket runbook)

Merge this after local devstack testing and before the openedx/openedx-platform PR.
Auto-deploys to stage on merge — test in stage, then deploy to prod and confirm working, before
the openedx-platform PR is rebased and merged.

Testing

Same test change as the openedx-platform PR: 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 this branch
checked out together) is required before merging — see
devstack-validate-ENT-11574-enrollment-filter.md.

Comment thread lms/djangoapps/support/views/enrollments.py Outdated
Comment thread lms/djangoapps/support/views/enrollments.py Outdated
Comment thread lms/djangoapps/support/tests/test_views.py Outdated
@brobro10000
brobro10000 force-pushed the brobro10000/ENT-11574-enrollment branch 3 times, most recently from e49bd8a to 1255d87 Compare September 17, 2026 16:39
@brobro10000
brobro10000 marked this pull request as ready for review September 17, 2026 16:47
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.

ENT-11574
@brobro10000
brobro10000 force-pushed the brobro10000/ENT-11574-enrollment branch from 1255d87 to 7edbe25 Compare September 18, 2026 11:40
@brobro10000
brobro10000 enabled auto-merge (squash) September 18, 2026 11:45
@brobro10000
brobro10000 merged commit e54814a into release-ulmo Sep 18, 2026
63 checks passed
@brobro10000
brobro10000 deleted the brobro10000/ENT-11574-enrollment branch September 18, 2026 12:01
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.

2 participants