Skip to content

fix: properly update studio search index when tags are deleted - #38495

Merged
bradenmacdonald merged 1 commit into
openedx:release/verawoodfrom
mgwozdz-unicon:mgwozdz/tag-delete-updates-meilisearch
May 4, 2026
Merged

bradenmacdonald merged 1 commit into
openedx:release/verawoodfrom
mgwozdz-unicon:mgwozdz/tag-delete-updates-meilisearch

Conversation

@mgwozdz-unicon

@mgwozdz-unicon mgwozdz-unicon commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor

[ Backport of #38477 to Verawood]

(cherry picked from commit 8bcdd46)

Description

This PR in conjunction with the openedx-core PR (openedx/openedx-core#571) is the backend component for openedx/modular-learning#260. The openedx-core PR (openedx/openedx-core#571) ensures that when a tag and its descendants are deleted that CONTENT_OBJECT_ASSOCIATIONS_CHANGED events take place. This PR ensures that once those events happen, the Meilisearch index is properly updated to remove the deleted tags. Without this PR, those events were only leading to a partial update of the document, which was sufficient to update renamed tags but not sufficient to remove deleted tags from the search index.

Goal:
When a Course Author deletes a tag that is associated to Library content, they should be able to return to the Library page and not see those tags in the tag search filter.

Supporting information

Github Issue: openedx/modular-learning#260

Testing instructions

  1. Go to Taxonomies and select a taxonomy
  2. Add new tags to this taxonomy that you plan to delete. (I have been adding a subtag (e.g. Wind1) with 2 sibbling children (W1.1 and W1.2) for my testing.)
  3. Go to a Library and create 2 new pieces of content.
  4. For one piece of content, associate the parent subtag (e.g. Wind1) and click Save.
  5. For the other piece of content, associate a child (e.g. W1.2) and click Save.
  6. Click on the tag search filter button and note that Wind1 and W1.2 appear in the tag search filter.
  7. Return to the taxonomy and delete the subtag Wind1.
  8. It should disappear from the taxonomy and a toast should display indicating what was deleted.
  9. Go back to the Library and refresh the page in the browser.
  10. The pieces of content you previously associated those tags to should now display that 0 tags are associated to them.
  11. Click on the tag search filter button and note that Wind1 and W1.2 no longer appear in the tag search filter.

Deadline

This PR missed the Verawood code cut, and without it, there is a bug in the delete tags functionality.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 30, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @mgwozdz-unicon!

This repository is currently maintained by @openedx/wg-maintenance-openedx-platform.

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.

@feanil
feanil force-pushed the mgwozdz/tag-delete-updates-meilisearch branch from 8fc22cc to 8abdebd Compare May 1, 2026 16:43
@bradenmacdonald

Copy link
Copy Markdown
Contributor

@mgwozdz-unicon I edited you description slightly to mention that this is a backport and link to the PR, instead of just the merge commit. Normally that's all you'd need to include in a backport PR, and people can get the remaining info by clicking on the link to the original PR. It's totally fine to include it here too, though, if you want.

@bradenmacdonald bradenmacdonald left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested and it fixes the issue, just like on master. Thanks!

@bradenmacdonald
bradenmacdonald merged commit 02e5a44 into openedx:release/verawood May 4, 2026
40 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in Contributions May 4, 2026
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

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants