Skip to content

fix UserCredential filters in django admin #2760

Open

Description

@deborahgu

the various sidebar filters in django admin no longer are working.

Steps to reproduce

  1. Go to: https://your_credentials_url/admin/credentials/usercredential/
  2. Click "Awarded" under "Filter By status" in the sidebar.
  3. Note that all revoked certs are still in there.

Acceptance criteria

  1. all of the various sidebar filters actually filter the page results
  2. the page doesn't load noticeably slower than it previously did

Activity

  1. added
    good first issueA good task for a newcomer to start with
    help wantedReady to be picked up by anyone in the community
    on May 1, 2025
  2. moved this to Help Wanted in Aperture-Maintainedon May 1, 2025
  3. mohsenakbari79 commented on Jun 21, 2025

    @mohsenakbari79

    Hi @openedx @deborahgu,

    I’d like to work on issue #2760 (Fix UserCredential filters in Django Admin). Is it available? Please share any guidance or requirements.

    Thanks

  4. deborahgu commented on Jun 30, 2025

    @deborahgu
    MemberAuthor

    this would be a great one for you to work on, definitely.

  5. self-assigned this
    on Jul 4, 2025
  6. mohsenakbari79 commented on Jul 5, 2025

    @mohsenakbari79

    Hi @deborahgu,

    I attempted to reproduce issue #2760 in my local environment using Tutor (version: 20.0.0), with the credentials service running at credentials.local.openedx.io. Here are the steps I followed:

    1. Set up a local instance of the credentials service and accessed the Django admin at:
      http://credentials.local.openedx.io/admin/credentials/usercredential/

    2. Created test UserCredential records:

      • testuser1: status="awarded", credential_content_type=CourseCertificate
      • testuser2: status="revoked", credential_content_type=CourseCertificate
      • testuser3: status="awarded", credential_content_type=ProgramCertificate
    3. Used the sidebar filters:

      • Selecting "Awarded" correctly showed only testuser1 and testuser3.
      • Selecting "Revoked" correctly showed only testuser2.
      • (Screenshots attached below.)
    4. I also monitored the page load time using browser DevTools and found no noticeable slowness.

    Based on the above, I was not able to reproduce the issue where revoked certificates appear when using the "Awarded" filter. Everything seems to work as expected in this setup.

    Would you mind sharing a few more details to help narrow this down?

    • The Open edX release or commit hash you're using
    • Any local modifications to settings.py, admin.py, or the UserCredentialAdmin config
    • Sample data that triggers the problem on your end

    Thanks!

  7. mubbsharanwar commented on Jul 8, 2025

    @mubbsharanwar
    Contributor

    Hi,
    Thank you @mohsenakbari79 for sharing these details. I have also tried to reproduce it locally with the colima but unable to reproduce it.
    I created 3 test user credentials two with revoked and one with awarded status.

    Image By clicking on revoked two records are filtered out. Image

    And for awarded one record is filtered out.
    Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issueA good task for a newcomer to start withhelp wantedReady to be picked up by anyone in the community

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions