Skip to content

Tbain/253 add tags count#506

Open
tbain wants to merge 1 commit intoopenedx:mainfrom
tbain:tbain/253_add_tags_count_rebased
Open

Tbain/253 add tags count#506
tbain wants to merge 1 commit intoopenedx:mainfrom
tbain:tbain/253_add_tags_count_rebased

Conversation

@tbain
Copy link

@tbain tbain commented Mar 18, 2026

Description

This implements openedx/modular-learning#253 , the task to add tag usage counts to the tags table under the taxonomies table. The frontend piece is where the results of this aggregation work is displayed is part of a separate pr to openedx/frontend-app-authoring. This change adds a recursive SQL subquery annotation onto the django query for retrieving tags. The original implementation of the counts for tags only counted raw usage of each tag, rather than aggregate sum of any tag and child tag usage as specified in the AC for the issue above, so it was replaced with this recursive counts that sums across tag usage based on various courses, sections, modules, and libraries that might use a tag.

Supporting information

Github issue with AC: openedx/modular-learning#253

Testing instructions

Refer to the AC in the Github Issue. Steps to verify this is implemented and working via UX (Note, depends on the frontend part of this ticket):

  1. Navigate to the "Studio home" page
  2. Navigate into an existing Course (or create a course and navigate into it)
  3. In the "Course Outline" page, add tag(s) from an existing taxonomy to the course, module, or section. Ensure at least one of the tags you add is a sub-tag of a root tag.
  4. Navigate back to the "Studio home" page
  5. Click the "Taxonomies" tab to navigate to the Taxonomies page
  6. Navigate into the Taxonomy that corresponds to the tag you added in step 3
  7. Observe that, if a tag is used, there is now an additional column on the table named "Usage Count" that is populated with bubbles that display the count of tags usages, if applicable
  8. Ensure that the tag you added in Step 3 properly associates the incremented count from its usage, and ensure that the usage count properly aggregates up the lineage based on the sub tag you selected in step 3

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
    • this ticket is backwards compatible with the current implementation in frontend-app-authoring, since by default the frontend does not request the counts.
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
    • none at this time

@openedx-webhooks
Copy link

Thanks for the pull request, @tbain!

This repository is currently maintained by @axim-engineering.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 18, 2026
@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Mar 18, 2026
Copy link

@jesperhodge jesperhodge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seem to be changes missing. For example, src/taxonomy/data/api.ts.
Could you

  • review this PR and make sure that all necessary changes are in this branch? Compare to the open Unicon PR.
  • review discussions in the Unicon PR and either resolve them or copy them here to be addressed here.
  • fix any pipeline errors
    ?

@mgwozdz-unicon
Copy link
Contributor

Since we're no longer using recursive SQL for this, is it possible to update the PR description for accuracy?

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

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

4 participants