| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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
| Back | FazBrowse Home | New Git URL |
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, 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 pyproject.toml, uv.lock, 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
openedx-platform#39076, edx-platform#455 (support-contact-tag)
Merge order (per the enterprise plugin ticket runbook)
This PR merges LAST, only after:
confirmed working.
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 — see
devstack-validate-ENT-11574-enrollment-filter.md.